aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--testing/sword/APKBUILD11
-rwxr-xr-xtesting/sword/sword.pre-install3
2 files changed, 12 insertions, 2 deletions
diff --git a/testing/sword/APKBUILD b/testing/sword/APKBUILD
index 468fae2c38..10611e6b73 100644
--- a/testing/sword/APKBUILD
+++ b/testing/sword/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: Isaac Dunham <ibid.ag@gmail.com>
pkgname=sword
pkgver=1.7.3
-pkgrel=0
+pkgrel=1
pkgdesc="Library for free Bible software"
url="http://www.crosswire.org/sword/"
arch="all"
@@ -18,7 +18,8 @@ depends=""
# curl-dev is needed for standard packages.
depends_dev="zlib-dev icu-dev curl-dev clucene-dev"
makedepends="$depends_dev"
-install=""
+pkggroups="sword"
+install="$pkgname.pre-install"
subpackages="$pkgname-dev $pkgname-doc $pkgname-lang $pkgname-utils"
source="http://www.crosswire.org/ftpmirror/pub/sword/source/v1.7/sword-$pkgver.tar.gz
00-fflush.patch
@@ -55,6 +56,12 @@ build() {
package() {
cd "$_builddir"
make DESTDIR="$pkgdir" install || return 1
+ mkdir -p -m775 "$pkgdir/var/lib/sword/modules" && \
+ mv "$pkgdir/usr/share/sword/mods.d" "$pkgdir/var/lib/sword/" && \
+ chown root:sword "$pkgdir"/var/lib/sword/mod* && \
+ chmod -R 0775 "$pkgdir/var/lib/sword/mods.d" && \
+ sed -e 's|\(DataPath=\).*|\1/var/lib/sword/|g' \
+ -i "$pkgdir/etc/sword.conf" || return 1
rm -f "$pkgdir"/usr/lib/*.la
install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING
for i in INSTALL README ChangeLog; do
diff --git a/testing/sword/sword.pre-install b/testing/sword/sword.pre-install
new file mode 100755
index 0000000000..0ab0d715bf
--- /dev/null
+++ b/testing/sword/sword.pre-install
@@ -0,0 +1,3 @@
+#!/bin/sh
+echo "Adding 'sword' group for installing SWORD modules systemwide"
+addgroup sword 2>/dev/null >&2 || true