############################################################################### # IPFire.org - An Open Source Firewall Solution # # Copyright (C) - IPFire Development Team # ############################################################################### name = nspr version = 4.8.6 release = 1 groups = System/Libraries url = http://www.mozilla.org/projects/nspr/ license = MPLv1.1 or GPLv2+ or LGPLv2+ summary = Netscape Portable Runtime. description NSPR provides platform independence for non-GUI operating system facilities. These facilities include threads, thread synchronization, normal file and network I/O, interval timing and calendar time, basic memory management (malloc and free) and shared library linking. end source_dl = build requires pkg-config end # Original nspr-config is not suitable for our distribution, # because on different platforms it contains different dynamic content. # Therefore we produce an adjusted copy of nspr-config that will be # identical on all platforms. # However, we need to use original nspr-config to produce some variables # that go into nspr.pc for pkg-config. prepare cd %{DIR_SRC} && %{MACRO_EXTRACT} %{DIR_DL}/%{sources} cp -vf %{DIR_APP}/mozilla/nsprpub/config/nspr-config.in \ %{DIR_APP}/mozilla/nsprpub/config/nspr-config-pc.in cp -vf %{DIR_SOURCE}/nspr-config-vars.in \ %{DIR_APP}/mozilla/nsprpub/config/ cd %{DIR_APP} %{MACRO_PATCHES} end build %{DIR_APP}/mozilla/nsprpub/configure \ %{configure_options} \ --libdir=/lib \ --includedir=/usr/include/nspr4 \ --enable-optimize="%{CFLAGS}" \ --disable-debug make end install_cmds mkdir -pv %{BUILDROOT}/usr/{bin,lib} mkdir -pv %{BUILDROOT}/lib mkdir -pv %{BUILDROOT}/usr/lib/pkgconfig cp -vf %{DIR_APP}/config/nspr-config-pc \ %{BUILDROOT}/usr/bin/nspr-config sed \ -e "s,%libdir%,/usr/lib,g" \ -e "s,%prefix%,/usr,g" \ -e "s,%exec_prefix%,/usr,g" \ -e "s,%includedir%,/usr/include/nspr4,g" \ -e "s,%NSPR_VERSION%,%{version},g" \ -e "s,%FULL_NSPR_LIBS%,-L/usr/lib -lnspr4 -lplc4 -lplds4 -ldl -lpthread,g" \ -e "s,%FULL_NSPR_CFLAGS%,-I/usr/include/nspr4,g" \ < %{DIR_SOURCE}/nspr.pc.in \ > %{BUILDROOT}/usr/lib/pkgconfig/nspr.pc #mv -v %{BUILDROOT}/usr/lib/lib{nspr,plc.plds}4.so %{BUILDROOT}/lib/ ln -svf ../../lib/libnspr4.so %{BUILDROOT}/usr/lib/libnspr4.so ln -svf ../../lib/libplc4.so %{BUILDROOT}/usr/lib/libplc4.so ln -svf ../../lib/libplds4.so %{BUILDROOT}/usr/lib/libplds4.so # Remove unneeded stuff rm -rfv \ %{BUILDROOT}/usr/bin/compile-et.pl \ %{BUILDROOT}/usr/bin/prerr.properties \ %{BUILDROOT}/usr/share/aclocal/nspr.m4 \ %{BUILDROOT}/usr/include/nspr4/md end end packages package %{name} package %{name}-devel template DEVEL end end