Advertisement
Guest User

PKGBUILD-git.proto

a guest
Mar 25th, 2012
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.26 KB | None | 0 0
  1. # This is an example PKGBUILD file. Use this as a start to creating your own,
  2. # and remove these comments. For more information, see 'man PKGBUILD'.
  3. # NOTE: Please fill out the license field for your package! If it is unknown,
  4. # then please put 'unknown'.
  5.  
  6. # See http://wiki.archlinux.org/index.php/VCS_PKGBUILD_Guidelines
  7. # for more information on packaging from GIT sources.
  8.  
  9. # Maintainer: Your Name <youremail@domain.com>
  10. pkgname=NAME-git
  11. pkgver=VERSION
  12. pkgrel=1
  13. pkgdesc=""
  14. arch=()
  15. url=""
  16. license=('GPL')
  17. groups=()
  18. depends=()
  19. makedepends=('git')
  20. provides=()
  21. conflicts=()
  22. replaces=()
  23. backup=()
  24. options=()
  25. install=
  26. source=()
  27. noextract=()
  28. md5sums=() #generate with 'makepkg -g'
  29.  
  30. _gitroot=GITURL
  31. _gitname=MODENAME
  32.  
  33. build() {
  34.   cd "$srcdir"
  35.   msg "Connecting to GIT server...."
  36.  
  37.   if [[ -d "$_gitname" ]]; then
  38.     cd "$_gitname"
  39.     git reset --hard
  40.     git clean -dxf
  41.     git pull origin
  42.     msg "The local files are updated."
  43.   else
  44.     git clone "$_gitroot" "$_gitname"
  45.   fi
  46.  
  47.   msg "GIT checkout done or server timeout"
  48.   msg "Starting build..."
  49.  
  50.   #
  51.   # BUILD HERE
  52.   #
  53.   ./autogen.sh
  54.   ./configure --prefix=/usr
  55.   make
  56. }
  57.  
  58. package() {
  59.   cd "$srcdir/$_gitname-build"
  60.   make DESTDIR="$pkgdir/" install
  61. }
  62.  
  63. # vim:set ts=2 sw=2 et:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement