Signed-off-by: Maxime Gauduin <alucryd(a)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