]> git.ipfire.org Git - people/ms/ipfire-3.x.git/blame - pkgs/nspr/nspr.nm
Change file layout of the makefiles.
[people/ms/ipfire-3.x.git] / pkgs / nspr / nspr.nm
CommitLineData
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
MT
6name = nspr
7version = 4.8.6
8release = 1
4b2af69a 9
802ea3af
MT
10groups = System/Libraries
11url = http://www.mozilla.org/projects/nspr/
12license = MPLv1.1 or GPLv2+ or LGPLv2+
13summary = Netscape Portable Runtime.
d615a5b0 14
802ea3af
MT
15description
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
20end
21
22source_dl =
23
24build
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 build
49 %{DIR_APP}/mozilla/nsprpub/configure \
50 %{configure_options} \
51 --libdir=/lib \
52 --includedir=/usr/include/nspr4 \
53 --enable-optimize="%{CFLAGS}" \
54 --disable-debug
55
56 make
57 end
58
59 install_cmds
60 mkdir -pv %{BUILDROOT}/usr/{bin,lib}
61 mkdir -pv %{BUILDROOT}/lib
62 mkdir -pv %{BUILDROOT}/usr/lib/pkgconfig
63
64 cp -vf %{DIR_APP}/config/nspr-config-pc \
65 %{BUILDROOT}/usr/bin/nspr-config
66
67 sed \
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
77
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
82
83 # Remove unneeded stuff
84 rm -rfv \
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
89 end
90end
91
92packages
93 package %{name}
94
95 package %{name}-devel
96 template DEVEL
97 end
98end