[arch-projects] [ABS] [PATCH 1/2] Update bzr, git, hg and svn protos for pacman 4.1
Signed-off-by: Maxime Gauduin <alucryd@gmail.com> --- prototypes/PKGBUILD-bzr.proto | 29 +++++------------------------ prototypes/PKGBUILD-git.proto | 29 +++++------------------------ prototypes/PKGBUILD-hg.proto | 30 +++++------------------------- prototypes/PKGBUILD-svn.proto | 28 +++++----------------------- 4 files changed, 20 insertions(+), 96 deletions(-) diff --git a/prototypes/PKGBUILD-bzr.proto b/prototypes/PKGBUILD-bzr.proto index 81f145f..414d9fa 100644 --- a/prototypes/PKGBUILD-bzr.proto +++ b/prototypes/PKGBUILD-bzr.proto @@ -17,37 +17,18 @@ license=('GPL') groups=() depends=() makedepends=('bzr') -provides=() -conflicts=() +provides=("${pkgname%-bzr}") +conflicts=("${pkgname%-bzr}") replaces=() backup=() options=() install= -source=() +source=('FOLDER::bzr+REPO_URL#FRAGMENT') # FRAGMENT is a revision (optional) noextract=() -md5sums=() #generate with 'makepkg -g' - -_bzrtrunk=BZRURL -_bzrmod=MODNAME +md5sums=() # Generate with 'makepkg -g' 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 # @@ -57,7 +38,7 @@ build() { } package() { - cd "$srcdir/$_bzrmod-build" + cd "$srcdir" make DESTDIR="$pkgdir/" install } diff --git a/prototypes/PKGBUILD-git.proto b/prototypes/PKGBUILD-git.proto index 05b721b..30737ad 100644 --- a/prototypes/PKGBUILD-git.proto +++ b/prototypes/PKGBUILD-git.proto @@ -17,37 +17,18 @@ license=('GPL') groups=() depends=() makedepends=('git') -provides=() -conflicts=() +provides=("${pkgname%-git}") +conflicts=("${pkgname%-git}") replaces=() backup=() options=() install= -source=() +source=('FOLDER::git+REPO_URL#FRAGMENT') # FRAGMENT is a branch, commit, or tag (optional) noextract=() -md5sums=() #generate with 'makepkg -g' - -_gitroot=GITURL -_gitname=MODENAME +md5sums=() # Generate with 'makepkg -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 # @@ -57,7 +38,7 @@ build() { } package() { - cd "$srcdir/$_gitname-build" + cd "$srcdir" make DESTDIR="$pkgdir/" install } diff --git a/prototypes/PKGBUILD-hg.proto b/prototypes/PKGBUILD-hg.proto index 8474533..bba5e26 100644 --- a/prototypes/PKGBUILD-hg.proto +++ b/prototypes/PKGBUILD-hg.proto @@ -17,38 +17,18 @@ license=('GPL') groups=() depends=() makedepends=('mercurial') -provides=() -conflicts=() +provides=("${pkgname%-hg}") +conflicts=("${pkgname%-hg}") replaces=() backup=() options=() install= -source=() +source=('FOLDER::hg+REPO_URL#FRAGMENT') # FRAGMENT is a branch, revision or tag (optional) noextract=() -md5sums=() #generate with 'makepkg -g' - -_hgroot=HGURL -_hgrepo=REPONAME +md5sums=() # Generate with 'makepkg -g' 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 # @@ -58,7 +38,7 @@ build() { } package() { - cd "$srcdir/$_hgrepo-build" + cd "$srcdir" make DESTDIR="$pkgdir/" install } diff --git a/prototypes/PKGBUILD-svn.proto b/prototypes/PKGBUILD-svn.proto index aff5ca9..4554070 100644 --- a/prototypes/PKGBUILD-svn.proto +++ b/prototypes/PKGBUILD-svn.proto @@ -17,36 +17,18 @@ license=('GPL') groups=() depends=() makedepends=('subversion') -provides=() -conflicts=() +provides=("${pkgname%-svn}") +conflicts=("${pkgname%-svn}") replaces=() backup=() options=() install= -source=() +source=('FOLDER::svn+REPO_URL#FRAGMENT') # FRAGMENT is a revision (optional) noextract=() -md5sums=() #generate with 'makepkg -g' - -_svntrunk=SVNURL -_svnmod=MODNAME +md5sums=() # Generate with 'makepkg -g' 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 # @@ -56,7 +38,7 @@ build() { } package() { - cd "$srcdir/$_svnmod-build" + cd "$srcdir" make DESTDIR="$pkgdir/" install } -- 1.8.4
On 08/10/13 18:59, Maxime Gauduin wrote:
Signed-off-by: Maxime Gauduin <alucryd@gmail.com>
Not sure if anyone is actually dealing with ABS patches these days, but I would prefer just removing these prototypes altogether. VCS packages are not particularly special these days.
--- prototypes/PKGBUILD-bzr.proto | 29 +++++------------------------ prototypes/PKGBUILD-git.proto | 29 +++++------------------------ prototypes/PKGBUILD-hg.proto | 30 +++++------------------------- prototypes/PKGBUILD-svn.proto | 28 +++++----------------------- 4 files changed, 20 insertions(+), 96 deletions(-)
diff --git a/prototypes/PKGBUILD-bzr.proto b/prototypes/PKGBUILD-bzr.proto index 81f145f..414d9fa 100644 --- a/prototypes/PKGBUILD-bzr.proto +++ b/prototypes/PKGBUILD-bzr.proto @@ -17,37 +17,18 @@ license=('GPL') groups=() depends=() makedepends=('bzr') -provides=() -conflicts=() +provides=("${pkgname%-bzr}") +conflicts=("${pkgname%-bzr}") replaces=() backup=() options=() install= -source=() +source=('FOLDER::bzr+REPO_URL#FRAGMENT') # FRAGMENT is a revision (optional) noextract=() -md5sums=() #generate with 'makepkg -g' - -_bzrtrunk=BZRURL -_bzrmod=MODNAME +md5sums=() # Generate with 'makepkg -g'
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 # @@ -57,7 +38,7 @@ build() { }
package() { - cd "$srcdir/$_bzrmod-build" + cd "$srcdir" make DESTDIR="$pkgdir/" install }
diff --git a/prototypes/PKGBUILD-git.proto b/prototypes/PKGBUILD-git.proto index 05b721b..30737ad 100644 --- a/prototypes/PKGBUILD-git.proto +++ b/prototypes/PKGBUILD-git.proto @@ -17,37 +17,18 @@ license=('GPL') groups=() depends=() makedepends=('git') -provides=() -conflicts=() +provides=("${pkgname%-git}") +conflicts=("${pkgname%-git}") replaces=() backup=() options=() install= -source=() +source=('FOLDER::git+REPO_URL#FRAGMENT') # FRAGMENT is a branch, commit, or tag (optional) noextract=() -md5sums=() #generate with 'makepkg -g' - -_gitroot=GITURL -_gitname=MODENAME +md5sums=() # Generate with 'makepkg -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 # @@ -57,7 +38,7 @@ build() { }
package() { - cd "$srcdir/$_gitname-build" + cd "$srcdir" make DESTDIR="$pkgdir/" install }
diff --git a/prototypes/PKGBUILD-hg.proto b/prototypes/PKGBUILD-hg.proto index 8474533..bba5e26 100644 --- a/prototypes/PKGBUILD-hg.proto +++ b/prototypes/PKGBUILD-hg.proto @@ -17,38 +17,18 @@ license=('GPL') groups=() depends=() makedepends=('mercurial') -provides=() -conflicts=() +provides=("${pkgname%-hg}") +conflicts=("${pkgname%-hg}") replaces=() backup=() options=() install= -source=() +source=('FOLDER::hg+REPO_URL#FRAGMENT') # FRAGMENT is a branch, revision or tag (optional) noextract=() -md5sums=() #generate with 'makepkg -g' - -_hgroot=HGURL -_hgrepo=REPONAME +md5sums=() # Generate with 'makepkg -g'
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 # @@ -58,7 +38,7 @@ build() { }
package() { - cd "$srcdir/$_hgrepo-build" + cd "$srcdir" make DESTDIR="$pkgdir/" install }
diff --git a/prototypes/PKGBUILD-svn.proto b/prototypes/PKGBUILD-svn.proto index aff5ca9..4554070 100644 --- a/prototypes/PKGBUILD-svn.proto +++ b/prototypes/PKGBUILD-svn.proto @@ -17,36 +17,18 @@ license=('GPL') groups=() depends=() makedepends=('subversion') -provides=() -conflicts=() +provides=("${pkgname%-svn}") +conflicts=("${pkgname%-svn}") replaces=() backup=() options=() install= -source=() +source=('FOLDER::svn+REPO_URL#FRAGMENT') # FRAGMENT is a revision (optional) noextract=() -md5sums=() #generate with 'makepkg -g' - -_svntrunk=SVNURL -_svnmod=MODNAME +md5sums=() # Generate with 'makepkg -g'
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 # @@ -56,7 +38,7 @@ build() { }
package() { - cd "$srcdir/$_svnmod-build" + cd "$srcdir" make DESTDIR="$pkgdir/" install }
Am 08.10.2013 11:03, schrieb Allan McRae:
Not sure if anyone is actually dealing with ABS patches these days, but I would prefer just removing these prototypes altogether. VCS packages are not particularly special these days.
And yet, people are still submitting PKGBUILDs to AUR based on the old broken prototypes. And there is a lack of examples.
On Tue, 2013-10-08 at 11:11 +0200, Thomas Bächler wrote:
Am 08.10.2013 11:03, schrieb Allan McRae:
Not sure if anyone is actually dealing with ABS patches these days, but I would prefer just removing these prototypes altogether. VCS packages are not particularly special these days.
And yet, people are still submitting PKGBUILDs to AUR based on the old broken prototypes. And there is a lack of examples.
It's true they are not much different from regular PKGBUILDs now. The new source array capabilities and pkgver() function (just realized I forgot to add the pkgver line in the protos, will correct that if we keep those protos) are well documented on [1]. Maybe we could drop the bzr, git, hg and svn protos and keep only cvs and darcs until they are supported in pacman as well. [1] https://wiki.archlinux.org/index.php/VCS_PKGBUILD_Guidelines -- Maxime
Am 08.10.2013 11:40, schrieb Maxime Gauduin:
On Tue, 2013-10-08 at 11:11 +0200, Thomas Bächler wrote:
Am 08.10.2013 11:03, schrieb Allan McRae:
Not sure if anyone is actually dealing with ABS patches these days, but I would prefer just removing these prototypes altogether. VCS packages are not particularly special these days.
And yet, people are still submitting PKGBUILDs to AUR based on the old broken prototypes. And there is a lack of examples.
It's true they are not much different from regular PKGBUILDs now. The new source array capabilities and pkgver() function (just realized I forgot to add the pkgver line in the protos, will correct that if we keep those protos) are well documented on [1]. Maybe we could drop the bzr, git, hg and svn protos and keep only cvs and darcs until they are supported in pacman as well.
We could add a single prototype called PKGBUILD-everything.proto that contains examples for all special source array features in one prototype. That would make much more sense in my opinion.
On Tue, 2013-10-08 at 11:55 +0200, Thomas Bächler wrote:
Am 08.10.2013 11:40, schrieb Maxime Gauduin:
On Tue, 2013-10-08 at 11:11 +0200, Thomas Bächler wrote:
Am 08.10.2013 11:03, schrieb Allan McRae:
Not sure if anyone is actually dealing with ABS patches these days, but I would prefer just removing these prototypes altogether. VCS packages are not particularly special these days.
And yet, people are still submitting PKGBUILDs to AUR based on the old broken prototypes. And there is a lack of examples.
It's true they are not much different from regular PKGBUILDs now. The new source array capabilities and pkgver() function (just realized I forgot to add the pkgver line in the protos, will correct that if we keep those protos) are well documented on [1]. Maybe we could drop the bzr, git, hg and svn protos and keep only cvs and darcs until they are supported in pacman as well.
We could add a single prototype called PKGBUILD-everything.proto that contains examples for all special source array features in one prototype. That would make much more sense in my opinion.
Just PKGBUILD.proto may be a better choice. Either way, I'll compile the info on the VCS wiki and produce a new patch along those lines. -- Maxime
participants (3)
-
Allan McRae
-
Maxime Gauduin
-
Thomas Bächler