ports/opt (2.4): nss: Cleanup Pkgfile (Thanks to Danny Rawlins).
commit 5e3b79d1e6844bb64e4024a1bc2e35ca27626b90 Author: Brett Goulder <predatorfreak@dcaf-security.org> Date: Thu Mar 6 06:46:01 2008 -0500 nss: Cleanup Pkgfile (Thanks to Danny Rawlins). diff --git a/nss/.footprint b/nss/.footprint index 86d8348..468e109 100644 --- a/nss/.footprint +++ b/nss/.footprint @@ -161,19 +161,19 @@ drwxr-xr-x root/root usr/lib/ -rw-r--r-- root/root usr/lib/libcrmf.a -rw-r--r-- root/root usr/lib/libfreebl3.chk -rw-r--r-- root/root usr/lib/libfreebl3.so --rwxr-xr-x root/root usr/lib/libnspr4.a +-rw-r--r-- root/root usr/lib/libnspr4.a lrwxrwxrwx root/root usr/lib/libnspr4.so -> libnspr4.so.7 --rwxr-xr-x root/root usr/lib/libnspr4.so.7 +-rw-r--r-- root/root usr/lib/libnspr4.so.7 -rw-r--r-- root/root usr/lib/libnss3.so -rw-r--r-- root/root usr/lib/libnssb.a -rw-r--r-- root/root usr/lib/libnssckbi.so -rw-r--r-- root/root usr/lib/libnssckfw.a --rwxr-xr-x root/root usr/lib/libplc4.a +-rw-r--r-- root/root usr/lib/libplc4.a lrwxrwxrwx root/root usr/lib/libplc4.so -> libplc4.so.7 --rwxr-xr-x root/root usr/lib/libplc4.so.7 --rwxr-xr-x root/root usr/lib/libplds4.a +-rw-r--r-- root/root usr/lib/libplc4.so.7 +-rw-r--r-- root/root usr/lib/libplds4.a lrwxrwxrwx root/root usr/lib/libplds4.so -> libplds4.so.7 --rwxr-xr-x root/root usr/lib/libplds4.so.7 +-rw-r--r-- root/root usr/lib/libplds4.so.7 -rw-r--r-- root/root usr/lib/libsmime3.so -rw-r--r-- root/root usr/lib/libsoftokn3.chk -rw-r--r-- root/root usr/lib/libsoftokn3.so @@ -183,5 +183,3 @@ lrwxrwxrwx root/root usr/lib/pkgconfig/mozilla-nspr.pc -> nspr.pc lrwxrwxrwx root/root usr/lib/pkgconfig/mozilla-nss.pc -> nss.pc -rw-r--r-- root/root usr/lib/pkgconfig/nspr.pc -rw-r--r-- root/root usr/lib/pkgconfig/nss.pc -drwxr-xr-x root/root usr/share/ -drwxr-xr-x root/root usr/share/aclocal/ diff --git a/nss/Pkgfile b/nss/Pkgfile index 8bf8326..c6748a2 100644 --- a/nss/Pkgfile +++ b/nss/Pkgfile @@ -1,108 +1,124 @@ # Description: Mozilla Network Security Services (NSS) -# URL: http://www.mozilla.org/projects/security/pki/nss -# Packager: Brett Goulder, predatorfreak at dcaf-security dot org -# Maintainer: Brett Goulder, predatorfreak at dcaf-security dot org +# URL: http://www.mozilla.org/projects/security/pki/nss/ +# Maintainer: Danny Rawlins, romster at shortcircuit dot net dot au +# Packager: Simone Rota, sip at varlock dot com name=nss version=3.11.9 +nspr_version=4.7 release=2 -source=(ftp://ftp.mozilla.org/pub/mozilla.org/security/$name/releases/NSS_3_11_9_RTM/src/$name-$version.tar.gz \ -ftp://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v4.7/src/nspr-4.7.tar.gz -nspr.pc.in -nss.pc.in -nss-config.in) +source=(ftp://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_11_9_RTM/src/nss-$version.tar.gz \ + ftp://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v$nspr_version/src/nspr-$nspr_version.tar.gz \ + nspr.pc.in nss.pc.in nss-config.in) build() { - export BUILD_OPT=1 - export XCFLAGS=${CFLAGS} + local file files NSPR_LIBS NSPR_CFLAGS NSPR_VERSION \ + NSS_VMAJOR NSS_VMINOR NSS_VPATCH + export PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 export PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 - cd $name-$version - mv $SRC/nspr-4.7/mozilla/* mozilla/ + cd nss-$version + mv $SRC/nspr-$nspr_version/mozilla/* mozilla/ + ./mozilla/nsprpub/configure \ --prefix=/usr \ --libdir=/usr/lib \ --includedir=/usr/include/nspr \ - --enable-optimize="${CFLAGS}" \ + --enable-optimize="$CFLAGS" \ --disable-debug + make - export MINOR_VERSION=7 + export MINOR_VERSION=7 make DESTDIR=$PKG install - cd $PKG/usr/lib + + pushd $PKG/usr/lib for file in *.so; do - mv ${file} ${file}.${MINOR_VERSION} - ln -s ${file}.${MINOR_VERSION} ${file} + mv $file "$file.$MINOR_VERSION" + ln -s "$file.$MINOR_VERSION" $file done - cd $SRC/$name-$version + popd export NSPR_INCLUDE_DIR="$SRC/nss-$version/dist/include/nspr" export NSPR_LIB_DIR="$SRC/nss-$version/dist/lib" - NSPR_LIBS=`./config/nspr-config --libs` - NSPR_CFLAGS=`./config/nspr-config --cflags` - NSPR_VERSION=`./config/nspr-config --version` - mkdir -p $PKG/usr/lib/pkgconfig - sed $SRC/nspr.pc.in -e "s,%libdir%,/usr/lib," \ - -e "s,%prefix%,/usr," \ - -e "s,%exec_prefix%,/usr/bin," \ - -e "s,%includedir%,/usr/include/nspr," \ - -e "s,%NSPR_VERSION%,${NSPR_VERSION}," \ - -e "s,%FULL_NSPR_LIBS%,${NSPR_LIBS}," \ - -e "s,%FULL_NSPR_CFLAGS%,${NSPR_CFLAGS}," > $PKG/usr/lib/pkgconfig/nspr.pc - ln -sf nspr.pc $PKG/usr/lib/pkgconfig/mozilla-nspr.pc - install -d $PKG/usr/bin - install -m755 config/nspr-config $PKG/usr/bin/nspr-config + NSPR_LIBS="`./config/nspr-config --libs`" + NSPR_CFLAGS="`./config/nspr-config --cflags`" + NSPR_VERSION="`./config/nspr-config --version`" + + install -d $PKG/usr/lib/pkgconfig + + sed $SRC/nspr.pc.in \ + -e "s,@libdir@,/usr/lib," \ + -e "s,@prefix@,/usr," \ + -e "s,@exec_prefix@,/usr/bin," \ + -e "s,@includedir@,/usr/include/nspr," \ + -e "s,@NSPR_VERSION@,$NSPR_VERSION," \ + -e "s,@FULL_NSPR_LIBS@,$NSPR_LIBS," \ + -e "s,@FULL_NSPR_CFLAGS@,$NSPR_CFLAGS," > \ + $PKG/usr/lib/pkgconfig/nspr.pc + + pushd $PKG/usr/lib/pkgconfig + ln -s nspr.pc mozilla-nspr.pc + popd + install -D -m 0755 config/nspr-config $PKG/usr/bin/nspr-config make -j 1 BUILD_OPT=1 XCFLAGS="$CFLAGS" -C mozilla/security/coreconf make -j 1 BUILD_OPT=1 XCFLAGS="$CFLAGS" -C mozilla/security/dbm make -j 1 BUILD_OPT=1 XCFLAGS="$CFLAGS" -C mozilla/security/nss + find $PKG/usr/lib/ -type f -exec chmod a-x {} \; install -d $PKG/usr/include/nss - - NSS_VMAJOR=`grep "#define.*NSS_VMAJOR" mozilla/security/nss/lib/nss/nss.h | awk '{print $3}'` - NSS_VMINOR=`grep "#define.*NSS_VMINOR" mozilla/security/nss/lib/nss/nss.h | awk '{print $3}'` - NSS_VPATCH=`grep "#define.*NSS_VPATCH" mozilla/security/nss/lib/nss/nss.h | awk '{print $3}'` - - sed $SRC/nss.pc.in -e "s,%libdir%,/usr/lib,g" \ - -e "s,%prefix%,/usr,g" \ - -e "s,%exec_prefix%,/usr/bin,g" \ - -e "s,%includedir%,/usr/include/nss,g" \ - -e "s,%NSPR_VERSION%,4.6.7,g" \ - -e "s,%NSS_VERSION%,3.11.7,g" > \ + file='mozilla/security/nss/lib/nss/nss.h' + NSS_VMAJOR="`grep "#define.*NSS_VMAJOR" $file | awk '{print $3}'`" + NSS_VMINOR="`grep "#define.*NSS_VMINOR" $file | awk '{print $3}'`" + NSS_VPATCH="`grep "#define.*NSS_VPATCH" $file | awk '{print $3}'`" + + sed $SRC/nss.pc.in \ + -e "s,@libdir@,/usr/lib,g" \ + -e "s,@prefix@,/usr,g" \ + -e "s,@exec_prefix@,/usr/bin,g" \ + -e "s,@includedir@,/usr/include/nss,g" \ + -e "s,@NSPR_VERSION@,4.6.7,g" \ + -e "s,@NSS_VERSION@,3.11.7,g" > \ $PKG/usr/lib/pkgconfig/nss.pc ln -sf nss.pc $PKG/usr/lib/pkgconfig/mozilla-nss.pc - chmod 644 $PKG/usr/lib/pkgconfig/*.pc + chmod 0644 $PKG/usr/lib/pkgconfig/*.pc - sed $SRC/nss-config.in -e "s,@libdir@,/usr/lib,g" \ + sed $SRC/nss-config.in \ + -e "s,@libdir@,/usr/lib,g" \ -e "s,@prefix@,/usr/bin,g" \ -e "s,@exec_prefix@,/usr/bin,g" \ -e "s,@includedir@,/usr/include/nss,g" \ - -e "s,@MOD_MAJOR_VERSION@,${NSS_VMAJOR},g" \ - -e "s,@MOD_MINOR_VERSION@,${NSS_VMINOR},g" \ - -e "s,@MOD_PATCH_VERSION@,${NSS_VPATCH},g" \ + -e "s,@MOD_MAJOR_VERSION@,$NSS_VMAJOR,g" \ + -e "s,@MOD_MINOR_VERSION@,$NSS_VMINOR,g" \ + -e "s,@MOD_PATCH_VERSION@,$NSS_VPATCH,g" \ > $PKG/usr/bin/nss-config - chmod 755 $PKG/usr/bin/nss-config - for file in libnss3.so libssl3.so libsmime3.so \ - libsoftokn3.so libsoftokn3.chk libnssckbi.so \ - libfreebl3.so libfreebl3.chk; do - install -m644 mozilla/dist/*.OBJ/lib/${file} $PKG/usr/lib/ - done + chmod 0755 $PKG/usr/bin/nss-config - for file in libcrmf.a libnssb.a libnssckfw.a; do - install -m644 mozilla/dist/*.OBJ/lib/${file} $PKG/usr/lib/ + files="libnss3.so libssl3.so libsmime3.so libsoftokn3.so \ + libsoftokn3.chk libnssckbi.so libfreebl3.so libfreebl3.chk \ + libcrmf.a libnssb.a libnssckfw.a" + + for file in $files; do + install -m 0644 mozilla/dist/*.OBJ/lib/$file $PKG/usr/lib/ done for file in certutil modutil pk12util signtool ssltap; do - install -m755 mozilla/dist/*.OBJ/bin/${file} $PKG/usr/bin/ + install -m 0755 mozilla/dist/*.OBJ/bin/$file $PKG/usr/bin/ done - install -m644 mozilla/dist/public/nss/*.h $PKG/usr/include/nss/ + install -m 0644 mozilla/dist/public/nss/*.h $PKG/usr/include/nss/ - rm -rf $PKG/usr/bin/compile-et.pl \ + rm \ + $PKG/usr/bin/compile-et.pl \ $PKG/usr/bin/prerr.properties \ - $PKG/usr/share/aclocal/nspr.m4 \ - $PKG/usr/include/nspr/md + $PKG/usr/share/aclocal/nspr.m4 + + rm -r \ + $PKG/usr/include/nspr/md \ + $PKG/usr/share } +
participants (1)
-
crux@crux.nu