]>
Commit | Line | Data |
---|---|---|
4b2af69a | 1 | ############################################################################### |
802ea3af MT |
2 | # IPFire.org - An Open Source Firewall Solution # |
3 | # Copyright (C) - IPFire Development Team <info@ipfire.org> # | |
4b2af69a MT |
4 | ############################################################################### |
5 | ||
802ea3af | 6 | name = nspr |
245c78d6 | 7 | version = 4.8.9 |
59c988f9 | 8 | release = 2 |
4b2af69a | 9 | |
802ea3af MT |
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. | |
d615a5b0 | 14 | |
802ea3af MT |
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 | |
4b2af69a | 19 | memory management (malloc and free) and shared library linking. |
802ea3af MT |
20 | end |
21 | ||
245c78d6 | 22 | source_dl = ftp://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v%{version}/src/ |
802ea3af MT |
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 | ||
b90bd413 MT |
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 += \ | |
b90bd413 MT |
59 | --includedir=/usr/include/nspr4 \ |
60 | --enable-optimize="%{CFLAGS}" \ | |
61 | --disable-debug | |
62 | ||
802ea3af MT |
63 | build |
64 | %{DIR_APP}/mozilla/nsprpub/configure \ | |
b90bd413 | 65 | %{configure_options} |
802ea3af MT |
66 | |
67 | make | |
68 | end | |
69 | ||
70 | install_cmds | |
b90bd413 | 71 | mkdir -pv %{BUILDROOT}/usr/{bin,%{lib}} |
b90bd413 | 72 | mkdir -pv %{BUILDROOT}%{libdir}/pkgconfig |
802ea3af MT |
73 | |
74 | cp -vf %{DIR_APP}/config/nspr-config-pc \ | |
75 | %{BUILDROOT}/usr/bin/nspr-config | |
76 | ||
77 | sed \ | |
b90bd413 | 78 | -e "s,%libdir%,%{libdir},g" \ |
802ea3af MT |
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" \ | |
b90bd413 | 83 | -e "s,%FULL_NSPR_LIBS%,-L%{libdir} -lnspr4 -lplc4 -lplds4 -ldl -lpthread,g" \ |
802ea3af MT |
84 | -e "s,%FULL_NSPR_CFLAGS%,-I/usr/include/nspr4,g" \ |
85 | < %{DIR_SOURCE}/nspr.pc.in \ | |
b90bd413 | 86 | > %{BUILDROOT}%{libdir}/pkgconfig/nspr.pc |
802ea3af | 87 | |
802ea3af MT |
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 | |
59c988f9 MT |
102 | |
103 | # libs are not versioned. | |
104 | files += !%{libdir}/*.so | |
802ea3af | 105 | end |
1f9bc2f0 MT |
106 | |
107 | package %{name}-debuginfo | |
108 | template DEBUGINFO | |
109 | end | |
802ea3af | 110 | end |