# This is an example PKGBUILD file. Use this as a start to creating your own, # and remove these comments. For more information, see 'man PKGBUILD'. # NOTE: Please fill out the license field for your package! If it is unknown, # then please put 'unknown'. # See http://wiki.archlinux.org/index.php/VCS_PKGBUILD_Guidelines # for more information on packaging from Mercurial(hg) sources. # Contributor: Your Name pkgname=NAME-hg pkgver=VERSION pkgrel=1 pkgdesc="" arch=() url="" license=('GPL') groups=() depends=() makedepends=('mercurial') provides=() conflicts=() replaces=() backup=() options=() install= source=($pkgname-$pkgver.tar.gz) noextract=() md5sums=() #generate with 'makepkg -g' _hgroot="HGURL" _hgrepo="MODENAME" build() { cd "$srcdir" msg "Connecting to Mercurial server...." if [ -d $_hgrepo ] ; then cd $_hgrepo hg pull -u || return 1 msg "The local files are updated." else hg clone $_hgroot $_hgrepo || return 1 fi msg "Mercurial checkout done or server timeout" msg "Starting make..." rm -rf "$srcdir/$_hgrepo-build" cp -r "$srcdir/$_hgrepo" "$srcdir/$_hgrepo-build" cd "$srcdir/$_hgrepo-build" # # BUILD HERE # ./autogen.sh ./configure --prefix=/usr make || return 1 make DESTDIR="$pkgdir/" install || return 1 }