diff options
author | root <root@rshg054.dnsready.net> | 2012-06-19 00:01:39 +0000 |
---|---|---|
committer | root <root@rshg054.dnsready.net> | 2012-06-19 00:01:39 +0000 |
commit | ca8fbff4eeda39b8a24515043ec4c8fdb95c23ee (patch) | |
tree | e31e0e223f205368e42e8f2378af9f8c76da0c0f /testing/nspr | |
parent | 014b5d0a1ee98ba0466f067f605b9637f2a14b2f (diff) |
Tue Jun 19 00:01:39 UTC 2012
Diffstat (limited to 'testing/nspr')
-rw-r--r-- | testing/nspr/PKGBUILD | 63 | ||||
-rw-r--r-- | testing/nspr/nspr.pc.in | 10 |
2 files changed, 73 insertions, 0 deletions
diff --git a/testing/nspr/PKGBUILD b/testing/nspr/PKGBUILD new file mode 100644 index 000000000..e5444b75c --- /dev/null +++ b/testing/nspr/PKGBUILD @@ -0,0 +1,63 @@ +# $Id: PKGBUILD 161981 2012-06-17 22:56:52Z ibiru $ +# Maintainer: Jan de Groot <jgc@archlinux.org> +# Contributor: Alexander Baldeck <alexander@archlinux.org> +pkgname=nspr +pkgver=4.9.1 +pkgrel=1 +pkgdesc="Netscape Portable Runtime" +arch=(i686 x86_64) +url="http://www.mozilla.org/projects/nspr/" +license=('MPL' 'GPL') +depends=('glibc') +makedepends=('zip') +options=(!emptydirs) +source=(ftp://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v${pkgver}/src/${pkgname}-${pkgver}.tar.gz + nspr.pc.in) +md5sums=('d36d7b65a38f5b43ebd50ad3ad227120' + 'bce1611f3117b53fc904cab549c09967') + +build() { + cd "${srcdir}/${pkgname}-${pkgver}" + if [ "$CARCH" = "x86_64" ]; then + confflags="--enable-64bit" + else + confflags="" + fi + + sed -e 's/\$(MKSHLIB) \$(OBJS)/\$(MKSHLIB) \$(LDFLAGS) \$(OBJS)/g' \ + -i mozilla/nsprpub/config/rules.mk + + ./mozilla/nsprpub/configure \ + --prefix=/usr \ + --libdir=/usr/lib \ + --includedir=/usr/include/nspr \ + --enable-optimize \ + --disable-debug ${confflags} + make +} + +package() { + cd "${srcdir}/${pkgname}-${pkgver}" + make DESTDIR="${pkgdir}" install + + NSPR_LIBS=`./config/nspr-config --libs` + NSPR_CFLAGS=`./config/nspr-config --cflags` + NSPR_VERSION=`./config/nspr-config --version` + install -m755 -d "${pkgdir}/usr/lib/pkgconfig" + sed "${srcdir}/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}," > "${pkgdir}/usr/lib/pkgconfig/nspr.pc" + chmod 644 "${pkgdir}/usr/lib/pkgconfig/nspr.pc" + ln -sf nspr.pc "${pkgdir}/usr/lib/pkgconfig/mozilla-nspr.pc" + + chmod 644 ${pkgdir}/usr/lib/*.a + + rm -rf "${pkgdir}/usr/bin/compile-et.pl" \ + "${pkgdir}/usr/bin/prerr.properties" \ + "${pkgdir}/usr/share/aclocal/nspr.m4" \ + "${pkgdir}/usr/include/nspr/md" +} diff --git a/testing/nspr/nspr.pc.in b/testing/nspr/nspr.pc.in new file mode 100644 index 000000000..1d8f4a0ca --- /dev/null +++ b/testing/nspr/nspr.pc.in @@ -0,0 +1,10 @@ +prefix=%prefix% +exec_prefix=%exec_prefix% +libdir=%libdir% +includedir=%includedir% + +Name: NSPR +Description: The Netscape Portable Runtime +Version: %NSPR_VERSION% +Libs: %FULL_NSPR_LIBS% +Cflags: %FULL_NSPR_CFLAGS% |