SHARE
TWEET

Untitled

a guest May 28th, 2010 172 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. # Contributor: 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=($pkgname-$pkgver.tar.gz)
  27. noextract=()
  28. md5sums=() #generate with 'makepkg -g'
  29.  
  30. _gitroot="GITURL"
  31. _gitname="MODENAME"
  32. _gitbranch="master"
  33.  
  34. build() {
  35.   cd "${srcdir}"
  36.   msg "Connecting to GIT server...."
  37.  
  38.   if [ -d ${_gitname} ] ; then
  39.     cd ${_gitname} && git pull origin
  40.     msg "The local files are updated."
  41.   else
  42.     git clone ${_gitroot} ${_gitname}
  43.   fi
  44.  
  45.   msg "GIT checkout done or server timeout"
  46.   msg "Starting make..."
  47.  
  48.   rm -rf "${srcdir}/${_gitname}-build"
  49.   cp -r "${srcdir}/${_gitname}" "${srcdir}/${_gitname}-build"
  50.  
  51.   cd "${srcdir}/${_gitname}-build"
  52.   git checkout --track -b ${_gitbranch} origin/${_gitbranch}
  53.  
  54.   #
  55.   # BUILD HERE
  56.   #
  57.  
  58.   ./autogen.sh
  59.   ./configure --prefix=/usr
  60.   make || return 1
  61.   make DESTDIR="$pkgdir/" install
  62. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top