source: spec/trunk/SPECS/nspr.spec@ 689

Last change on this file since 689 was 283, checked in by Yuri Dario, 14 years ago

spec: nspr, nss, openssl, ncurses, readline, rebuild with libc 0.6.4 runtime.

File size: 4.4 KB
Line 
1Summary: Netscape Portable Runtime
2Name: nspr
3Version: 4.8.6
4Release: 3%{?dist}
5License: MPLv1.1 or GPLv2+ or LGPLv2+
6URL: http://www.mozilla.org/projects/nspr/
7Group: System Environment/Libraries
8BuildRoot: %{_tmppath}/%{name}-%{version}-root
9
10# Sources available at ftp://ftp.mozilla.org/pub/mozilla.org/nspr/releases/
11# When CVS tag based snapshots are being used, refer to CVS documentation on
12# mozilla.org and check out subdirectory mozilla/nsprpub.
13Source0: %{name}-%{version}.tar.gz
14Source1: nspr.pc.in
15#Source2: nspr-config-vars.in
16
17Patch0: nspr-os2.diff
18#Patch1: nspr-config-pc.patch
19
20%description
21NSPR provides platform independence for non-GUI operating system
22facilities. These facilities include threads, thread synchronization,
23normal file and network I/O, interval timing and calendar time, basic
24memory management (malloc and free) and shared library linking.
25
26%package devel
27Summary: Development libraries for the Netscape Portable Runtime
28Group: Development/Libraries
29Requires: nspr = %{version}-%{release}
30Requires: pkgconfig
31
32%description devel
33Header files for doing development with the Netscape Portable Runtime.
34
35%prep
36
37%setup -q
38
39# Original nspr-config is not suitable for our distribution,
40# because on different platforms it contains different dynamic content.
41# Therefore we produce an adjusted copy of nspr-config that will be
42# identical on all platforms.
43# However, we need to use original nspr-config to produce some variables
44# that go into nspr.pc for pkg-config.
45
46#cp ./mozilla/nsprpub/config/nspr-config.in ./mozilla/nsprpub/config/nspr-config-pc.in
47%patch0 -p1
48
49#cp %{SOURCE2} ./mozilla/nsprpub/config/
50
51%build
52
53cd mozilla/nsprpub
54/@unixroot/usr/bin/autoconf
55
56export CONFIG_SHELL="/@unixroot/usr/bin/sh.exe"
57export MAKESHELL="/@unixroot/usr/bin/sh.exe"
58export LDFLAGS="-Zbin-files -Zhigh-mem -Zomf -Zargs-wild -Zargs-resp"
59./configure \
60 --prefix=%{_prefix} \
61 --libdir=%{_libdir} \
62 --includedir=%{_includedir}/nspr4 \
63%ifarch x86_64 ppc64 ia64 s390x sparc64
64 --enable-64bit \
65%endif
66 --enable-optimize="$RPM_OPT_FLAGS" \
67 --disable-debug \
68 "--cache-file=%{_topdir}/cache/%{name}-%{_target_cpu}.cache"
69
70make
71
72%install
73
74%{__rm} -Rf $RPM_BUILD_ROOT
75
76cd mozilla/nsprpub
77
78DESTDIR=$RPM_BUILD_ROOT \
79 make install
80
81NSPR_LIBS=`./config/nspr-config --libs`
82NSPR_CFLAGS=`./config/nspr-config --cflags`
83NSPR_VERSION=`./config/nspr-config --version`
84%{__mkdir_p} $RPM_BUILD_ROOT/%{_libdir}/pkgconfig
85
86#cat ./config/nspr-config-vars > \
87# $RPM_BUILD_ROOT/%{_libdir}/pkgconfig/nspr.pc
88
89cat %{SOURCE1} | sed -e "s,%%libdir%%,%{_libdir},g" \
90 -e "s,%%prefix%%,%{_prefix},g" \
91 -e "s,%%exec_prefix%%,%{_prefix},g" \
92 -e "s,%%includedir%%,%{_includedir}/nspr4,g" \
93 -e "s,%%NSPR_VERSION%%,$NSPR_VERSION,g" \
94 -e "s,%%FULL_NSPR_LIBS%%,$NSPR_LIBS,g" \
95 -e "s,%%FULL_NSPR_CFLAGS%%,$NSPR_CFLAGS,g" >> \
96 $RPM_BUILD_ROOT/%{_libdir}/pkgconfig/nspr.pc
97
98%{__mkdir_p} $RPM_BUILD_ROOT/%{_bindir}
99#%{__mkdir_p} $RPM_BUILD_ROOT/%{_lib}
100#%{__cp} ./config/nspr-config-pc $RPM_BUILD_ROOT/%{_bindir}/nspr-config
101
102# Get rid of the things we don't want installed (per upstream)
103%{__rm} -rf \
104 $RPM_BUILD_ROOT/%{_bindir}/compile-et.pl \
105 $RPM_BUILD_ROOT/%{_bindir}/prerr.properties \
106 $RPM_BUILD_ROOT/%{_libdir}/libnspr4.a \
107 $RPM_BUILD_ROOT/%{_libdir}/libplc4.a \
108 $RPM_BUILD_ROOT/%{_libdir}/libplds4.a \
109 $RPM_BUILD_ROOT/%{_datadir}/aclocal/nspr.m4 \
110 $RPM_BUILD_ROOT/%{_includedir}/nspr4/md
111
112#for file in libnspr4.so libplc4.so libplds4.so
113#do
114# mv -f $RPM_BUILD_ROOT/%{_libdir}/$file $RPM_BUILD_ROOT/%{_lib}/$file
115# ln -sf ../../%{_lib}/$file $RPM_BUILD_ROOT/%{_libdir}/$file
116#done
117
118
119%clean
120%{__rm} -Rf $RPM_BUILD_ROOT
121
122#%post
123#/sbin/ldconfig >/dev/null 2>/dev/null
124
125#%postun
126#/sbin/ldconfig >/dev/null 2>/dev/null
127
128%files
129%defattr(-,root,root)
130/%{_libdir}/nspr4k.dll
131/%{_libdir}/plc4k.dll
132/%{_libdir}/plds4k.dll
133
134%files devel
135%defattr(-, root, root)
136%{_libdir}/nspr4k.dll
137%{_libdir}/plc4k.dll
138%{_libdir}/plds4k.dll
139%{_libdir}/*.a
140%{_includedir}/nspr4
141%{_libdir}/pkgconfig/nspr.pc
142%{_bindir}/nspr-config
143
144%changelog
145* Mon Jan 16 2012 yd
146- rebuild with libc 0.6.4 runtime.
Note: See TracBrowser for help on using the repository browser.