############################################################################### # IPFire.org - An Open Source Firewall Solution # # Copyright (C) - IPFire Development Team # ############################################################################### name = nspr version = 4.8.9 release = 2 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 = ftp://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v%{version}/src/ 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 if "%{DISTRO_ARCH}" == "x86_64" configure_options += \ --enable-64bit end if "%{DISTRO_ARCH}" == "armv7hl" configure_options += \ --enable-thumb2 end configure_options += \ --includedir=/usr/include/nspr4 \ --enable-optimize="%{CFLAGS}" \ --disable-debug build %{DIR_APP}/mozilla/nsprpub/configure \ %{configure_options} make end install_cmds mkdir -pv %{BUILDROOT}/usr/{bin,%{lib}} mkdir -pv %{BUILDROOT}%{libdir}/pkgconfig cp -vf %{DIR_APP}/config/nspr-config-pc \ %{BUILDROOT}/usr/bin/nspr-config sed \ -e "s,%libdir%,%{libdir},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%{libdir} -lnspr4 -lplc4 -lplds4 -ldl -lpthread,g" \ -e "s,%FULL_NSPR_CFLAGS%,-I/usr/include/nspr4,g" \ < %{DIR_SOURCE}/nspr.pc.in \ > %{BUILDROOT}%{libdir}/pkgconfig/nspr.pc # 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 # libs are not versioned. files += !%{libdir}/*.so end package %{name}-debuginfo template DEBUGINFO end end