sword 1.8 [skip-ci]

This commit is contained in:
almack 2018-06-24 22:49:32 +02:00
parent 4bec912831
commit 8b44606e97

View File

@ -1,30 +1,57 @@
# Maintainer: Francesco Marinucci <franzmari [at] chakra-project [dot] it>
pkgname=sword
pkgver=1.7.4
mainver=1.7
pkgrel=2
pkgdesc="SWORD libraries for Bible programs"
pkgbase=sword
pkgname=(sword python-sword python2-sword)
_mainver=1.8
pkgver=1.8.1
pkgrel=1
pkgdesc="Library for Bible study programs"
arch=('x86_64')
url="http://www.crosswire.org/sword/index.jsp"
url="http://www.crosswire.org/sword/"
license=('GPL')
depends=('icu' 'curl' 'clucene' 'swig')
makedepends=('cmake')
backup=('etc/sword.conf')
source=("http://www.crosswire.org/ftpmirror/pub/$pkgname/source/v$mainver/$pkgname-$pkgver.tar.gz")
md5sums=('1677f02a86cbf07713d4e1d4c39791e6')
makedepends=('curl' 'clucene' 'swig' 'cmake' 'python3' 'python2')
source=("http://www.crosswire.org/ftpmirror/pub/$pkgbase/source/v$_mainver/$pkgbase-$pkgver.tar.gz")
sha512sums=('5c08c070ea0c86b7d929bbf94c89730eb5a487986deb9edf01c08d1710356aecd1ab3bde4437a778e5fc1ceb05b63287612ec6161381c0986a36344c27d2ab36')
prepare() {
cd "$srcdir/$pkgbase-$pkgver"
mkdir build
}
build() {
cd "$srcdir/$pkgname-$pkgver"
cd "$srcdir/$pkgbase-$pkgver/build"
./configure --prefix=/usr --libdir=/usr/lib --sysconfdir=/etc
# http://site.icu-project.org/download/61#TOC-Migration-Issues
CXXFLAGS+=' -DU_USING_ICU_NAMESPACE=1'
#./configure --prefix=/usr --libdir=/usr/lib --sysconfdir=/etc
cmake .. -DLIBSWORD_LIBRARY_TYPE="Shared" -DSYSCONF_INSTALL_DIR='/etc' \
-DSWORD_BUILD_TESTS="Yes" -DSWORD_BINDINGS="Python" -DCMAKE_INSTALL_PREFIX=/usr
make
cp -a bindings/swig/python bindings/swig/python2
cd bindings/swig/python2
python2 setup.py build
}
package() {
cd "$srcdir/$pkgname-$pkgver"
package_sword() {
depends=('curl' 'clucene' 'swig' 'xz')
backup=('etc/sword.conf')
cd "$srcdir/$pkgbase-$pkgver/build"
make DESTDIR="$pkgdir" install
mkdir --parents "$pkgdir/etc"
make DESTDIR="$pkgdir" install_config
}
package_python-sword() {
depends=('sword' 'python3')
cd "$srcdir/$pkgbase-$pkgver/build/bindings/swig/python"
python3 setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build
}
package_python2-sword() {
depends=('sword' 'python2')
cd "$srcdir/$pkgbase-$pkgver/build/bindings/swig/python2"
python2 setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build
}