1 ###############################################################################
2 # IPFire.org - An Open Source Firewall Solution #
3 # Copyright (C) - IPFire Development Team <info@ipfire.org> #
4 ###############################################################################
10 groups = System/Libraries
11 url = http://www.mozilla.org/projects/nspr/
12 license = MPLv1.1 or GPLv2+ or LGPLv2+
13 summary = Netscape Portable Runtime.
16 NSPR provides platform independence for non-GUI operating system
17 facilities. These facilities include threads, thread synchronization,
18 normal file and network I/O, interval timing and calendar time, basic
19 memory management (malloc and free) and shared library linking.
29 # Original nspr-config is not suitable for our distribution,
30 # because on different platforms it contains different dynamic content.
31 # Therefore we produce an adjusted copy of nspr-config that will be
32 # identical on all platforms.
33 # However, we need to use original nspr-config to produce some variables
34 # that go into nspr.pc for pkg-config.
37 cd %{DIR_SRC} && %{MACRO_EXTRACT} %{DIR_DL}/%{sources}
39 cp -vf %{DIR_APP}/mozilla/nsprpub/config/nspr-config.in \
40 %{DIR_APP}/mozilla/nsprpub/config/nspr-config-pc.in
41 cp -vf %{DIR_SOURCE}/nspr-config-vars.in \
42 %{DIR_APP}/mozilla/nsprpub/config/
49 %{DIR_APP}/mozilla/nsprpub/configure \
50 %{configure_options} \
52 --includedir=/usr/include/nspr4 \
53 --enable-optimize="%{CFLAGS}" \
60 mkdir -pv %{BUILDROOT}/usr/{bin,lib}
61 mkdir -pv %{BUILDROOT}/lib
62 mkdir -pv %{BUILDROOT}/usr/lib/pkgconfig
64 cp -vf %{DIR_APP}/config/nspr-config-pc \
65 %{BUILDROOT}/usr/bin/nspr-config
68 -e "s,%libdir%,/usr/lib,g" \
69 -e "s,%prefix%,/usr,g" \
70 -e "s,%exec_prefix%,/usr,g" \
71 -e "s,%includedir%,/usr/include/nspr4,g" \
72 -e "s,%NSPR_VERSION%,%{version},g" \
73 -e "s,%FULL_NSPR_LIBS%,-L/usr/lib -lnspr4 -lplc4 -lplds4 -ldl -lpthread,g" \
74 -e "s,%FULL_NSPR_CFLAGS%,-I/usr/include/nspr4,g" \
75 < %{DIR_SOURCE}/nspr.pc.in \
76 > %{BUILDROOT}/usr/lib/pkgconfig/nspr.pc
78 #mv -v %{BUILDROOT}/usr/lib/lib{nspr,plc.plds}4.so %{BUILDROOT}/lib/
79 ln -svf ../../lib/libnspr4.so %{BUILDROOT}/usr/lib/libnspr4.so
80 ln -svf ../../lib/libplc4.so %{BUILDROOT}/usr/lib/libplc4.so
81 ln -svf ../../lib/libplds4.so %{BUILDROOT}/usr/lib/libplds4.so
83 # Remove unneeded stuff
85 %{BUILDROOT}/usr/bin/compile-et.pl \
86 %{BUILDROOT}/usr/bin/prerr.properties \
87 %{BUILDROOT}/usr/share/aclocal/nspr.m4 \
88 %{BUILDROOT}/usr/include/nspr4/md