diff -Naur prototypes/PKGBUILD-bzr.proto prototypes-new/PKGBUILD-bzr.proto --- prototypes/PKGBUILD-bzr.proto 2012-09-07 13:41:34.000000000 -0300 +++ prototypes-new/PKGBUILD-bzr.proto 2013-05-08 21:22:26.908503020 -0300 @@ -7,7 +7,8 @@ # for more information on packaging from Bazaar sources. # Maintainer: Your Name -pkgname=NAME-bzr +_bzrmod= +pkgname=$_bzrmod-bzr pkgver=VERSION pkgrel=1 pkgdesc="" @@ -17,48 +18,31 @@ groups=() depends=() makedepends=('bzr') -provides=() -conflicts=() +provides=($_bzrmod) +conflicts=($_bzrmod) replaces=() backup=() options=() install= -source=() +source=($_bzrmod::BZRURL) noextract=() -md5sums=() #generate with 'makepkg -g' +md5sums=('SKIP') -_bzrtrunk=BZRURL -_bzrmod=MODNAME +pkgver() { + cd $_bzrmod + bzr revno +} build() { - cd "$srcdir" - msg "Connecting to Bazaar server...." - - if [[ -d "$_bzrmod" ]]; then - cd "$_bzrmod" && bzr --no-plugins pull "$_bzrtrunk" -r "$pkgver" - msg "The local files are updated." - else - bzr --no-plugins branch "$_bzrtrunk" "$_bzrmod" -q -r "$pkgver" - fi - - msg "Bazaar checkout done or server timeout" - msg "Starting build..." - - rm -rf "$srcdir/$_bzrmod-build" - cp -r "$srcdir/$_bzrmod" "$srcdir/$_bzrmod-build" - cd "$srcdir/$_bzrmod-build" - - # - # BUILD HERE - # + cd $_bzrmod ./autogen.sh ./configure --prefix=/usr make } package() { - cd "$srcdir/$_bzrmod-build" - make DESTDIR="$pkgdir/" install + cd $_bzrmod + make DESTDIR="$pkgdir" install } # vim:set ts=2 sw=2 et: diff -Naur prototypes/PKGBUILD-git.proto prototypes-new/PKGBUILD-git.proto --- prototypes/PKGBUILD-git.proto 2012-09-07 13:41:34.000000000 -0300 +++ prototypes-new/PKGBUILD-git.proto 2013-05-08 21:21:35.855917340 -0300 @@ -7,7 +7,8 @@ # for more information on packaging from GIT sources. # Maintainer: Your Name -pkgname=NAME-git +_gitname= +pkgname=$_gitname-git pkgver=VERSION pkgrel=1 pkgdesc="" @@ -17,47 +18,30 @@ groups=() depends=() makedepends=('git') -provides=() -conflicts=() +provides=($_gitname) +conflicts=($_gitname) replaces=() backup=() options=() install= -source=() +source=(GITURL) noextract=() -md5sums=() #generate with 'makepkg -g' +md5sums=(SKIP) -_gitroot=GITURL -_gitname=MODENAME +pkgver() { + cd $_gitname + git describe --always | sed 's|-|.|g' +} build() { - cd "$srcdir" - msg "Connecting to GIT server...." - - if [[ -d "$_gitname" ]]; then - cd "$_gitname" && git pull origin - msg "The local files are updated." - else - git clone "$_gitroot" "$_gitname" - fi - - msg "GIT checkout done or server timeout" - msg "Starting build..." - - rm -rf "$srcdir/$_gitname-build" - git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build" - cd "$srcdir/$_gitname-build" - - # - # BUILD HERE - # + cd $_gitname ./autogen.sh ./configure --prefix=/usr make } package() { - cd "$srcdir/$_gitname-build" + cd $_gitname make DESTDIR="$pkgdir/" install } diff -Naur prototypes/PKGBUILD-hg.proto prototypes-new/PKGBUILD-hg.proto --- prototypes/PKGBUILD-hg.proto 2012-09-07 13:41:34.000000000 -0300 +++ prototypes-new/PKGBUILD-hg.proto 2013-05-08 21:22:00.755552230 -0300 @@ -7,7 +7,8 @@ # for more information on packaging from Mercurial(hg) sources. # Maintainer: Your Name -pkgname=NAME-hg +_hgrepo= +pkgname=$_hgrepo-hg pkgver=VERSION pkgrel=1 pkgdesc="" @@ -17,48 +18,30 @@ groups=() depends=() makedepends=('mercurial') -provides=() -conflicts=() +provides=($_hgrepo) +conflicts=($_hgrepo) replaces=() backup=() options=() install= -source=() +source=($_hgrepo::hg+HGURL) noextract=() -md5sums=() #generate with 'makepkg -g' +md5sums=('SKIP') -_hgroot=HGURL -_hgrepo=REPONAME +pkgver() { + cd $_hgrepo + echo $(hg identify -n).$(hg identify -i) +} build() { - cd "$srcdir" - msg "Connecting to Mercurial server...." - - if [[ -d "$_hgrepo" ]]; then - cd "$_hgrepo" - hg pull -u - msg "The local files are updated." - else - hg clone "$_hgroot" "$_hgrepo" - fi - - msg "Mercurial checkout done or server timeout" - msg "Starting build..." - - rm -rf "$srcdir/$_hgrepo-build" - cp -r "$srcdir/$_hgrepo" "$srcdir/$_hgrepo-build" - cd "$srcdir/$_hgrepo-build" - - # - # BUILD HERE - # + cd $_hgrepo ./autogen.sh ./configure --prefix=/usr make } package() { - cd "$srcdir/$_hgrepo-build" + cd $_hgrepo make DESTDIR="$pkgdir/" install } diff -Naur prototypes/PKGBUILD-svn.proto prototypes-new/PKGBUILD-svn.proto --- prototypes/PKGBUILD-svn.proto 2012-09-07 13:41:34.000000000 -0300 +++ prototypes-new/PKGBUILD-svn.proto 2013-05-08 21:22:42.624939803 -0300 @@ -7,7 +7,8 @@ # for more information on packaging from SVN sources. # Maintainer: Your Name -pkgname=NAME-svn +_svnmod= +pkgname=$_svnmod-svn pkgver=VERSION pkgrel=1 pkgdesc="" @@ -17,46 +18,30 @@ groups=() depends=() makedepends=('subversion') -provides=() -conflicts=() +provides=($_svnmod) +conflicts=($_svnmod) replaces=() backup=() options=() install= -source=() +source=($_svnmod::SVNURL) noextract=() -md5sums=() #generate with 'makepkg -g' +md5sums=('SKIP') -_svntrunk=SVNURL -_svnmod=MODNAME +pkgver() { + cd "${SRCDEST}"/$_svnmod + svnversion | tr -d [A-z] +} build() { - cd "$srcdir" - msg "Connecting to SVN server...." - - if [[ -d "$_svnmod/.svn" ]]; then - (cd "$_svnmod" && svn up -r "$pkgver") - else - svn co "$_svntrunk" --config-dir ./ -r "$pkgver" "$_svnmod" - fi - - msg "SVN checkout done or server timeout" - msg "Starting build..." - - rm -rf "$srcdir/$_svnmod-build" - svn export "$srcdir/$_svnmod" "$srcdir/$_svnmod-build" - cd "$srcdir/$_svnmod-build" - - # - # BUILD HERE - # + cd $_svnmod ./autogen.sh ./configure --prefix=/usr make } package() { - cd "$srcdir/$_svnmod-build" + cd $_svnmod make DESTDIR="$pkgdir/" install }