summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunchun Guan <junchunx.guan@intel.com>2014-07-16 11:28:29 +0800
committerMarkus Lehtonen <markus.lehtonen@linux.intel.com>2014-11-14 14:47:21 +0200
commita0d9b187a3a392fe001d2cb2b0060fc1d136602b (patch)
treed358b7cb280a0b2e5792d304d9cb9ff1763a234e
parentcc4c5dfecfd34dd26888d38b9fe58009b063220b (diff)
downloadgit-buildpackage-a0d9b187a3a392fe001d2cb2b0060fc1d136602b.tar.gz
git-buildpackage-a0d9b187a3a392fe001d2cb2b0060fc1d136602b.tar.bz2
git-buildpackage-a0d9b187a3a392fe001d2cb2b0060fc1d136602b.zip
Add PKGBUILD to support arch linux
Three split packages: git-buildpackage-{common,rpm,doc} Signed-off-by: Junchun Guan <junchunx.guan@intel.com>
-rw-r--r--packaging/PKGBUILD83
1 files changed, 83 insertions, 0 deletions
diff --git a/packaging/PKGBUILD b/packaging/PKGBUILD
new file mode 100644
index 00000000..dbe4b00b
--- /dev/null
+++ b/packaging/PKGBUILD
@@ -0,0 +1,83 @@
+pkgbase='git-buildpackage'
+pkgname=('git-buildpackage-rpm' 'git-buildpackage-common' 'git-buildpackage-doc')
+pkgver=0.6.15
+pkgrel=0
+pkgdesc="Tools from Debian to integrate the package build system with Git"
+arch=(any)
+url="https://honk.sigxcpu.org/piki/projects/git-buildpackage/"
+license=('GPLv2')
+conflicts=('git-buildpackage')
+provides=('git-buildpackage')
+makedepends=('python2-distribute' 'gtk-doc' 'docbook-sgml' 'docbook-utils')
+source=(git-buildpackage_${pkgver}.tar.gz)
+sha256sums=(SKIP)
+
+prepare()
+{
+ cd "$srcdir/$pkgbase-${pkgver}"
+ for patch_file in $(find ../../ -maxdepth 1 -name '*.patch' |sort)
+ do
+ patch -p1 -i $patch_file
+ done
+}
+
+build() {
+ cd $srcdir/$pkgbase-$pkgver
+ WITHOUT_NOSETESTS=1 \
+ python2 setup.py build
+
+# Prepare apidocs
+ epydoc -n git-buildpackage --no-sourcecode -o docs/apidocs/ \
+ gbp*.py git*.py gbp/
+
+# HTML docs
+ HAVE_SGML2X=0 make -C docs/
+}
+
+package_git-buildpackage-common() {
+ depends=('man-db'
+ 'python2'
+ 'git')
+ optdepends=('pristine-tar: regenerate pristine tarballs')
+ cd $srcdir/$pkgbase-$pkgver
+ WITHOUT_NOSETESTS=1 \
+ python2 setup.py install \
+ --root="$pkgdir" \
+ --prefix=/usr \
+ -O1
+ rm $pkgdir/usr/lib/python*/site-packages/*info -rf
+ rm $pkgdir/usr/bin/*rpm*
+ rm $pkgdir/usr/lib/python*/site-packages/gbp/rpm -rf
+ rm $pkgdir/usr/lib/python*/site-packages/gbp/scripts/*rpm*.py* -rf
+}
+
+package_git-buildpackage-rpm() {
+ depends=("git-buildpackage-common=$pkgver-$pkgrel" "rpm")
+ provides=("tizen-gbp-rpm=20140605")
+ cd $srcdir/$pkgbase-$pkgver
+ WITHOUT_NOSETESTS=1 \
+ python2 setup.py install \
+ --root="$pkgdir" \
+ --prefix=/usr \
+ -O1
+ rm $pkgdir/usr/lib/python*/site-packages/*info -rf
+ rm -rf $pkgdir/etc
+ find $pkgdir/usr/bin -mindepth 1 -maxdepth 1 ! -name '*rpm*' -delete
+ find $pkgdir/usr/lib/python*/site-packages/gbp -mindepth 1 -maxdepth 1 -type f -o -type d ! -name rpm -a ! -name scripts |xargs rm -rf
+ find $pkgdir/usr/lib/python*/site-packages/gbp/scripts -mindepth 1 -maxdepth 1 ! -name '*rpm*.py*' |xargs rm -rf
+}
+
+package_git-buildpackage-doc() {
+ cd $srcdir/$pkgbase-$pkgver
+# Install man pages
+ mandir=/usr/share/man
+ install -d ${pkgdir}/${mandir}/man1 ${pkgdir}/${mandir}/man5
+ install docs/*.1 ${pkgdir}/${mandir}/man1
+ install docs/*.5 ${pkgdir}/${mandir}/man5
+
+# Install html documentation
+ mkdir -p ${pkgdir}/${docdir}/${pkgbase}
+ cp -r docs/manual-html ${pkgdir}/${docdir}/${pkgbase}
+ cp -r docs/apidocs ${pkgdir}/${docdir}/${pkgbase}
+}
+# vim:set ts=2 sw=2 et: