[arch-commits] Commit in vigra/trunk (PKGBUILD)

Bruno Pagani archange at archlinux.org
Wed Dec 27 15:06:55 UTC 2017


    Date: Wednesday, December 27, 2017 @ 15:06:54
  Author: archange
Revision: 276247

Boost 1.66.0 rebuild

Also some PKGBUILD sanitizing

Modified:
  vigra/trunk/PKGBUILD

----------+
 PKGBUILD |   45 ++++++++++++++++++++++++++-------------------
 1 file changed, 26 insertions(+), 19 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2017-12-27 14:41:50 UTC (rev 276246)
+++ PKGBUILD	2017-12-27 15:06:54 UTC (rev 276247)
@@ -1,11 +1,13 @@
 # $Id$
-# Maintainer: AndyRTR <andyrtr at archlinux.org>
+# Maintainer: Bruno Pagani <archange at archlinux.org>
+# Contributor: AndyRTR <andyrtr at archlinux.org>
 # Contributor: Lukas Jirkovsky <l.jirkovsky at gmail.com>
 
 pkgbase=vigra
 pkgname=('vigra' 'vigra-doc')
 pkgver=1.11.1
-pkgrel=3
+pkgrel=4
+pkgdesc="Computer vision library"
 arch=('x86_64')
 url="https://ukoethe.github.io/vigra/"
 license=('custom:MIT')
@@ -13,23 +15,29 @@
              'libpng' 'libtiff' 'openexr' 'gcc-libs' 'sh' 'hdf5' 'fftw'
 	         # additional makedeps
              'cmake' 'python-nose' 'doxygen' 'python-sphinx' 'boost' 'python-numpy')
-source=(https://github.com/ukoethe/vigra/releases/download/Version-${pkgver//./-}/vigra-${pkgver}-src.tar.gz)
+source=("https://github.com/ukoethe/vigra/releases/download/Version-${pkgver//./-}/vigra-${pkgver}-src.tar.gz")
 sha256sums=('a5564e1083f6af6a885431c1ee718bad77d11f117198b277557f8558fa461aaf')
 
+prepare() {
+  mkdir -p build
+}
+
 build() {
-  cd "${srcdir}"/${pkgbase}-${pkgver}
-  cmake -DCMAKE_INSTALL_PREFIX=/usr \
+  cd build
+  cmake ../${pkgbase}-${pkgver} \
+      -DCMAKE_INSTALL_PREFIX=/usr \
       -DPYTHON_EXECUTABLE=/usr/bin/python \
       -DWITH_OPENEXR=true \
       -DWITH_VIGRANUMPY=1 \
+      -DDOCDIR=../build/doc \
       -DDOCINSTALL=share/doc
   make
 }
 
-#check() {
-#  cd "${srcdir}"/${pkgname}-${pkgver}
-#  make -j1 -k check #|| /bin/true # i686 fails
-#}
+check() {
+  cd build
+  make -j1 -k check || warning "Tests failed" # https://github.com/ukoethe/vigra/issues/409
+}
 
 package_vigra() {
   pkgdesc="Computer vision library"
@@ -37,25 +45,24 @@
   optdepends=('python: for python bindings'
               'boost-libs: for python bindings')
 
-  cd "${srcdir}"/${pkgbase}-${pkgver}
+  cd build
   make DESTDIR="${pkgdir}" install
-  # license
-  install -D -m644 LICENSE.txt "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
+
+  install -Dm644 ${srcdir}/${pkgbase}-${pkgver}/LICENSE.txt "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
   
-  # remove doc
+  # Remove doc
   rm -rf "${pkgdir}"/usr/share/doc
 }
 
 package_vigra-doc() {
   pkgdesc="Computer vision library - documentation and examples"
-  #depends=('vigra')
-  #arch=('any')
+  #arch=('any') # Not supported for now, maybe later
 
-  cd "${srcdir}"/${pkgbase}-${pkgver}
+  cd build
   make DESTDIR="${pkgdir}" install
-  # cleanup
+
+  # Remove vigra package content
   rm -rf "${pkgdir}"/usr/{bin,include,lib}
 
-  # license
-  install -D -m644 LICENSE.txt "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
+  install -Dm644 ${srcdir}/${pkgbase}-${pkgver}/LICENSE.txt "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
 }



More information about the arch-commits mailing list