diff options
author | Isaac Dunham <ibid.ag@gmail.com> | 2014-07-23 06:05:54 -0700 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2014-07-24 14:06:12 +0000 |
commit | 901c2c595c140eeaceea798d2d76f7ea4cb90f04 (patch) | |
tree | 51df71d97082f16b2e0b91e7f7eabdc4f206f15c /testing/sword | |
parent | d8082a70288f6eab5b538c2101be702a34d44158 (diff) | |
download | aports-901c2c595c140eeaceea798d2d76f7ea4cb90f04.tar.bz2 aports-901c2c595c140eeaceea798d2d76f7ea4cb90f04.tar.xz |
testing/sword: add sword group for installing modules systemwide.
installmgr was trying to install into /usr/share/sword without permissions,
resulting in great confusion.
This change lets all members of the 'sword' group install modules systemwide.
Diffstat (limited to 'testing/sword')
-rw-r--r-- | testing/sword/APKBUILD | 11 | ||||
-rwxr-xr-x | testing/sword/sword.pre-install | 3 |
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 |