[arch-commits] Commit in git-review/repos/extra-any (PKGBUILD PKGBUILD)

Felix Yan felixonmars at archlinux.org
Sun Nov 26 08:07:52 UTC 2017


    Date: Sunday, November 26, 2017 @ 08:07:51
  Author: felixonmars
Revision: 310936

archrelease: copy trunk to extra-any

Added:
  git-review/repos/extra-any/PKGBUILD
    (from rev 310935, git-review/trunk/PKGBUILD)
Deleted:
  git-review/repos/extra-any/PKGBUILD

----------+
 PKGBUILD |   82 ++++++++++++++++++++++++++++++++++++++++++-------------------
 1 file changed, 57 insertions(+), 25 deletions(-)

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2017-11-26 08:07:25 UTC (rev 310935)
+++ PKGBUILD	2017-11-26 08:07:51 UTC (rev 310936)
@@ -1,25 +0,0 @@
-# $Id$
-# Maintainer:  Bartłomiej Piotrowski <bpiotrowski at archlinux.org>
-# Contributor: Thomas Weißschuh <thomas t-8ch de>
-
-pkgname=git-review
-pkgver=1.25.0
-pkgrel=3
-pkgdesc='Tool to submit code to Gerrit'
-arch=('any')
-url='https://github.com/openstack-infra/git-review'
-license=('APACHE')
-depends=('python-requests' 'python-setuptools')
-source=(https://pypi.python.org/packages/source/g/$pkgname/$pkgname-$pkgver.tar.gz)
-md5sums=('0a061d0e23ee9b93c6212a3fe68fb7ab')
-
-build() {
-  cd $pkgname-$pkgver
-  python setup.py build
-}
-
-package() {
-  cd $pkgname-$pkgver
-  python setup.py install --optimize=1 --root="$pkgdir"
-  install -Dm644 git-review.1 "$pkgdir"/usr/share/man/man1/git-review.1
-}

Copied: git-review/repos/extra-any/PKGBUILD (from rev 310935, git-review/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2017-11-26 08:07:51 UTC (rev 310936)
@@ -0,0 +1,57 @@
+# $Id$
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+# Contributor: Bartłomiej Piotrowski <bpiotrowski at archlinux.org>
+# Contributor: Thomas Weißschuh <thomas t-8ch de>
+
+pkgname=git-review
+pkgver=1.26.0
+pkgrel=1
+pkgdesc='Tool to submit code to Gerrit'
+arch=('any')
+url='https://github.com/openstack-infra/git-review'
+license=('APACHE')
+depends=('git' 'python-requests')
+makedepends=('python-pbr')
+checkdepends=('java-runtime>=8' 'libcups' 'openssh' 'procps-ng' 'python-testrepository' 'python-mock')
+source=("$pkgname-$pkgver.tar.gz::https://github.com/openstack-infra/git-review/archive/$pkgver.tar.gz"
+        http://tarballs.openstack.org/ci/gerrit/gerrit-v2.11.4.13.cb9800e.war)
+sha512sums=('e99afdc812fb30d07d0fe84e5ff3ac866c295cac3e5c06410a0b58e6d1d5462e2bc149fa55deca19f2c357c25289611f1f1f3505b0f7202557ff437b67edb8f2'
+            '764388dc0ee381e2f05f5aaef9fc4156b4659a329eaf815ad7beb0b2a924a8d171444b8824ea9aad6b8aa7a3cc0b60bf8daa9d483298e6226cb692ea1caafa7f')
+
+prepare() {
+  export PBR_VERSION=$pkgver
+  mkdir -p $pkgname-$pkgver/.gerrit
+  cp gerrit-v2.11.4.13.cb9800e.war $pkgname-$pkgver/.gerrit/
+
+  cd $pkgname-$pkgver
+
+  # Remove the su - part
+  sed -i '/f.write(GOLDEN_SITE_VER)/a \        utils.run_cmd("sed", "-i", "s/su - $GERRIT_USER -s//", self._dir("gsite", "bin", "gerrit.sh"))' git_review/tests/__init__.py
+
+  # gerrit doesn't work without some additional config :/
+  sed -i '/listenUrl/a [gc]\n    interval = 2d\n    startTime = Fri 12:00\n[gitweb]\n    cgi = /usr/share/gitweb/gitweb.cgi' git_review/tests/utils.py
+
+  # git version differences?
+  sed -e "s/'Branch test_branch set up to track remote'/\"Branch 'test_branch' set up to track remote\"/" \
+      -e "s/' branch maint from origin.'/\" branch 'maint' from 'origin'.\"/" \
+      -i git_review/tests/test_git_review.py
+}
+
+build() {
+  cd $pkgname-$pkgver
+  python setup.py build
+}
+
+check() {
+  cd $pkgname-$pkgver
+  python setup.py install --root="$PWD/tmp_install" --optimize=1
+
+  python -m git_review.tests.prepare
+  PYTHONPATH="$PWD/tmp_install/usr/lib/python3.6/site-packages:$PYTHONPATH" PATH="$PWD/tmp_install/usr/bin:$PATH" python setup.py testr --testr-args='--concurrency=2' || warning "Tests failed"
+}
+
+package() {
+  cd $pkgname-$pkgver
+  python setup.py install --optimize=1 --root="$pkgdir"
+  install -Dm644 git-review.1 "$pkgdir"/usr/share/man/man1/git-review.1
+}


More information about the arch-commits mailing list