diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2017-03-22 16:52:22 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2017-03-22 16:52:40 +0000 |
commit | e1e2b1f4f69db61e49d09b346bd686f9dbcca782 (patch) | |
tree | 5d98285ab97578434010f0a98978e8a711f43ece /main/nss | |
parent | c23a77f715fad5b3abf5bac4674d977fe46aaca2 (diff) | |
download | aports-e1e2b1f4f69db61e49d09b346bd686f9dbcca782.tar.bz2 aports-e1e2b1f4f69db61e49d09b346bd686f9dbcca782.tar.xz |
main/nss: clean up and add -static subpackage
Diffstat (limited to 'main/nss')
-rw-r--r-- | main/nss/APKBUILD | 60 |
1 files changed, 24 insertions, 36 deletions
diff --git a/main/nss/APKBUILD b/main/nss/APKBUILD index 072ce047bd..d856660c2b 100644 --- a/main/nss/APKBUILD +++ b/main/nss/APKBUILD @@ -2,40 +2,35 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=nss pkgver=3.30 -_ver=${pkgver//./_} -pkgrel=0 +pkgrel=1 pkgdesc="Mozilla Network Security Services" url="http://www.mozilla.org/projects/security/pki/nss/" arch="all" license="MPL GPL" +options="!check" depends= +depends_dev="nspr-dev" makedepends="nspr-dev sqlite-dev zlib-dev perl bsd-compat-headers" -subpackages="$pkgname-dev $pkgname-tools" -source="http://ftp.mozilla.org/pub/security/$pkgname/releases/NSS_${_ver}_RTM/src/$pkgname-$pkgver.tar.gz +subpackages="$pkgname-static $pkgname-dev $pkgname-tools" +source="http://ftp.mozilla.org/pub/security/$pkgname/releases/NSS_${pkgver//./_}_RTM/src/$pkgname-$pkgver.tar.gz nss.pc.in nss-util.pc.in nss-softokn.pc.in nss-config.in add_spi+cacert_ca_certs.patch " -depends_dev="nspr-dev" +builddir="$srcdir/$pkgname-$pkgver" -_builddir="$srcdir"/$pkgname-$pkgver prepare() { - cd "$_builddir" - for i in $source; do - case $i in - *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; - esac - done + default_prepare || return 1 # Respect LDFLAGS sed -i -e 's/\$(MKSHLIB) -o/\$(MKSHLIB) \$(LDFLAGS) -o/g' \ - nss/coreconf/rules.mk + "$builddir"/nss/coreconf/rules.mk } build() { - cd "$_builddir" + cd "$builddir" unset CFLAGS unset CXXFLAGS export BUILD_OPT=1 @@ -57,7 +52,7 @@ build() { package() { replaces="nss-dev libnss" - cd "$_builddir" + cd "$builddir" install -m755 -d "$pkgdir"/usr/lib/pkgconfig install -m755 -d "$pkgdir"/usr/bin @@ -98,13 +93,12 @@ package() { chmod 755 "$pkgdir"/usr/bin/nss-config || return 1 local minor=${pkgver#*.} minor=${minor%.*} - for file in libsoftokn3.so libfreebl3.so libnss3.so libnssutil3.so \ - libssl3.so libsmime3.so libnssckbi.so libnssdbm3.so; do - install -m755 dist/*.OBJ/lib/${file} \ - "$pkgdir"/usr/lib/${file}.$minor || return 1 - ln -s $file.$minor "$pkgdir"/usr/lib/$file + for file in $(find dist/*.OBJ/lib -name "*.so"); do + install -m755 $file \ + "$pkgdir"/usr/lib/${file##*/}.$minor || return 1 + ln -s ${file##*/}.$minor "$pkgdir"/usr/lib/${file##*/} done - install -m644 dist/*.OBJ/lib/libcrmf.a dist/*.OBJ/lib/libfreebl.a "$pkgdir"/usr/lib/ \ + install -m644 dist/*.OBJ/lib/*.a "$pkgdir"/usr/lib/ \ || return 1 install -m644 dist/*.OBJ/lib/*.chk "$pkgdir"/usr/lib/ \ || return 1 @@ -120,22 +114,16 @@ package() { || return 1 } -dev() { - local i= j= - depends="$pkgname $depends_dev" - - mkdir -p "$subpkgdir"/usr/bin - mv "$pkgdir"/usr/bin/nss-config "$subpkgdir"/usr/bin +static() { + pkgdesc="Static libraries for nss" + mkdir -p "$subpkgdir"/usr/lib + mv "$pkgdir"/usr/lib/*.a "$subpkgdir"/usr/lib/ +} - cd "$pkgdir" || return 0 - for i in usr/include usr/lib/pkgconfig usr/lib/*.a; do - if [ -e "$pkgdir/$i" ] || [ -L "$pkgdir/$i" ]; then - d="$subpkgdir/${i%/*}" # dirname $i - mkdir -p "$d" - mv "$pkgdir/$i" "$d" - rmdir "$pkgdir/${i%/*}" 2>/dev/null || true - fi - done +dev() { + default_dev || return 1 + mv "$pkgdir"/usr/lib/libgtest1.* "$pkgdir"/usr/lib/libnsssysinit.* \ + "$subpkgdir"/usr/lib } tools() { |