]> git.ipfire.org Git - people/amarx/ipfire-3.x.git/blob - nspr/nspr.nm
Merge remote-tracking branch 'stevee/openvswitch-systemd'
[people/amarx/ipfire-3.x.git] / nspr / nspr.nm
1 ###############################################################################
2 # IPFire.org - An Open Source Firewall Solution #
3 # Copyright (C) - IPFire Development Team <info@ipfire.org> #
4 ###############################################################################
5
6 name = nspr
7 version = 4.8.9
8 release = 2
9
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.
14
15 description
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.
20 end
21
22 source_dl = ftp://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v%{version}/src/
23
24 build
25 requires
26 pkg-config
27 end
28
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.
35
36 prepare
37 cd %{DIR_SRC} && %{MACRO_EXTRACT} %{DIR_DL}/%{sources}
38
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/
43 cd %{DIR_APP}
44
45 %{MACRO_PATCHES}
46 end
47
48 if "%{DISTRO_ARCH}" == "x86_64"
49 configure_options += \
50 --enable-64bit
51 end
52
53 if "%{DISTRO_ARCH}" == "armv7hl"
54 configure_options += \
55 --enable-thumb2
56 end
57
58 configure_options += \
59 --includedir=/usr/include/nspr4 \
60 --enable-optimize="%{CFLAGS}" \
61 --disable-debug
62
63 build
64 %{DIR_APP}/mozilla/nsprpub/configure \
65 %{configure_options}
66
67 make
68 end
69
70 install_cmds
71 mkdir -pv %{BUILDROOT}/usr/{bin,%{lib}}
72 mkdir -pv %{BUILDROOT}%{libdir}/pkgconfig
73
74 cp -vf %{DIR_APP}/config/nspr-config-pc \
75 %{BUILDROOT}/usr/bin/nspr-config
76
77 sed \
78 -e "s,%libdir%,%{libdir},g" \
79 -e "s,%prefix%,/usr,g" \
80 -e "s,%exec_prefix%,/usr,g" \
81 -e "s,%includedir%,/usr/include/nspr4,g" \
82 -e "s,%NSPR_VERSION%,%{version},g" \
83 -e "s,%FULL_NSPR_LIBS%,-L%{libdir} -lnspr4 -lplc4 -lplds4 -ldl -lpthread,g" \
84 -e "s,%FULL_NSPR_CFLAGS%,-I/usr/include/nspr4,g" \
85 < %{DIR_SOURCE}/nspr.pc.in \
86 > %{BUILDROOT}%{libdir}/pkgconfig/nspr.pc
87
88 # Remove unneeded stuff
89 rm -rfv \
90 %{BUILDROOT}/usr/bin/compile-et.pl \
91 %{BUILDROOT}/usr/bin/prerr.properties \
92 %{BUILDROOT}/usr/share/aclocal/nspr.m4 \
93 %{BUILDROOT}/usr/include/nspr4/md
94 end
95 end
96
97 packages
98 package %{name}
99
100 package %{name}-devel
101 template DEVEL
102
103 # libs are not versioned.
104 files += !%{libdir}/*.so
105 end
106
107 package %{name}-debuginfo
108 template DEBUGINFO
109 end
110 end