mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-01-23 18:14:51 +08:00
58 lines
1.7 KiB
Bash
58 lines
1.7 KiB
Bash
# Maintainer: Francesco Marinucci <franzmari [at] chakra-project [dot] it>
|
|
|
|
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/"
|
|
license=('GPL')
|
|
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/$pkgbase-$pkgver/build"
|
|
|
|
# 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_sword() {
|
|
depends=('curl' 'clucene' 'swig' 'xz')
|
|
backup=('etc/sword.conf')
|
|
|
|
cd "$srcdir/$pkgbase-$pkgver/build"
|
|
make DESTDIR="$pkgdir" install
|
|
}
|
|
|
|
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
|
|
}
|