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

Last change on this file since 1036 was 1024, checked in by dmik, 9 years ago

spec: nspr: Release version 4.12.0-3.

File size: 5.0 KB
Line 
1# Note: this .spec is borrowed from nspr-4.12.0-1.fc24.src.rpm
2
3Summary: Netscape Portable Runtime
4Name: nspr
5Version: 4.12.0
6Release: 3%{?dist}
7License: MPLv2.0
8URL: http://www.mozilla.org/projects/nspr/
9Group: System Environment/Libraries
10Conflicts: filesystem < 3
11Vendor: bww bitwise works GmbH
12
13%scm_source svn http://svn.netlabs.org/repos/ports/nspr/trunk 2052
14
15BuildRequires: gcc make subversion zip
16
17# Sources available at ftp://ftp.mozilla.org/pub/mozilla.org/nspr/releases/
18# When hg tag based snapshots are being used, refer to hg documentation on
19# mozilla.org and check out subdirectory mozilla/nsprpub.
20#Source0: %{name}-%{version}.tar.gz
21
22Source1: nspr-config.xml
23
24# DEF files to create forwarders for the legacy package
25Source10: nspr4k.def
26Source11: plc4k.def
27Source12: plds4k.def
28
29%description
30NSPR provides platform independence for non-GUI operating system
31facilities. These facilities include threads, thread synchronization,
32normal file and network I/O, interval timing and calendar time, basic
33memory management (malloc and free) and shared library linking.
34
35%package devel
36Summary: Development libraries for the Netscape Portable Runtime
37Group: Development/Libraries
38Requires: nspr = %{version}-%{release}
39Requires: pkgconfig
40# @todo We don't have xmlto yet.
41#BuildRequires: xmlto
42Conflicts: filesystem < 3
43
44%description devel
45Header files for doing development with the Netscape Portable Runtime.
46
47%package legacy
48Summary: Legacy libraries for Netscape Portable Runtime
49Group: System Environment/Libraries
50Requires: nspr = %{version}-%{release}
51
52%description legacy
53NSPR rorwarder libraries with old DLL names ending with 'k'.
54
55%debug_package
56
57# Makes no sense to provide .dbg files for forwarder DLLs
58%define _strip_opts --debuginfo -x "*k.dll"
59
60%prep
61%scm_setup
62
63# Generate configure.
64autoconf
65
66%build
67
68%configure \
69 --prefix=%{_prefix} \
70 --libdir=%{_libdir} \
71 --includedir=%{_includedir}/nspr4 \
72 --enable-optimize="$RPM_OPT_FLAGS" \
73 --enable-debug-symbols \
74 --disable-debug
75
76# Disable MOZ_DEBUG_SYMBOLS to let debug_package do its work
77# (--enable-debug-symbols is still necessary to make sure -g is specified)
78sed -e 's/^MOZ_DEBUG_SYMBOLS = 1$/MOZ_DEBUG_SYMBOLS =/' -i ./config/autoconf.mk
79
80make %{?_smp_mflags}
81
82# @todo We don't have xmlto yet.
83#date +"%e %B %Y" | tr -d '\n' > date.xml
84#echo -n %{version} > version.xml
85#
86#for m in %{SOURCE1}; do
87# cp ${m} .
88#done
89#for m in nspr-config.xml; do
90# xmlto man ${m}
91#done
92
93# Generate forwarder DLLs.
94for m in %{SOURCE10} %{SOURCE11} %{SOURCE12}; do
95 cp ${m} .
96done
97for m in nspr4 plc4 plds4; do
98 gcc -Zomf -Zdll -nostdlib ${m}k.def -l./dist/lib/${m}.dll -lend -o ${m}k.dll
99done
100
101%check
102
103# Run test suite.
104# @todo Disable it since it fails so far.
105#perl ./pr/tests/runtests.pl 2>&1 | tee output.log
106#
107#TEST_FAILURES=`grep -c FAILED ./output.log` || :
108#if [ $TEST_FAILURES -ne 0 ]; then
109# echo "error: test suite returned failure(s)"
110# exit 1
111#fi
112#echo "test suite completed"
113
114%install
115
116%{__rm} -Rf $RPM_BUILD_ROOT
117
118DESTDIR=$RPM_BUILD_ROOT \
119 make install
120
121# Install forwarder DLLs.
122cp -p *.dll $RPM_BUILD_ROOT/%{_libdir}/
123
124# @todo We don't have xmlto yet.
125#mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1
126
127# Get rid of the things we don't want installed (per upstream)
128%{__rm} -rf \
129 $RPM_BUILD_ROOT/%{_bindir}/compile-et.pl \
130 $RPM_BUILD_ROOT/%{_bindir}/prerr.properties \
131 $RPM_BUILD_ROOT/%{_libdir}/libnspr4_s.a \
132 $RPM_BUILD_ROOT/%{_libdir}/libplc4_s.a \
133 $RPM_BUILD_ROOT/%{_libdir}/libplds4_s.a \
134 $RPM_BUILD_ROOT/%{_datadir}/aclocal/nspr.m4 \
135 $RPM_BUILD_ROOT/%{_includedir}/nspr4/md
136
137# Remove .xqs files (created because MOZ_DEBUG_SYMBOLS was disabled)
138%{__rm} -rf \
139 $RPM_BUILD_ROOT/%{_libdir}/*.xqs
140
141# @todo We don't have xmlto yet.
142#for f in nspr-config; do
143# install -c -m 644 ${f}.1 $RPM_BUILD_ROOT%{_mandir}/man1/${f}.1
144#done
145
146%clean
147%{__rm} -Rf $RPM_BUILD_ROOT
148
149%files
150%defattr(-,root,root)
151%{!?_licensedir:%global license %%doc}
152%license LICENSE
153%{_libdir}/nspr4.dll
154%{_libdir}/plc4.dll
155%{_libdir}/plds4.dll
156
157%files devel
158%defattr(-, root, root)
159%{_includedir}/nspr4
160%{_libdir}/pkgconfig/nspr.pc
161%{_libdir}/libnspr4.a
162%{_libdir}/libplc4.a
163%{_libdir}/libplds4.a
164%{_bindir}/nspr-config
165# @todo We don't have xmlto yet.
166#%{_mandir}/man*/*
167
168%files legacy
169%defattr(-,root,root)
170%{_libdir}/nspr4k.dll
171%{_libdir}/plc4k.dll
172%{_libdir}/plds4k.dll
173
174%changelog
175* Thu Feb 23 2017 Dmitriy Kuminov <coding@dmik.org> - 4.12.0-3
176- Generate more compact forwarder DLLs with better memory footprint.
177
178* Thu Feb 23 2017 Dmitriy Kuminov <coding@dmik.org> - 4.12.0-2
179- Use scm_source and friends.
180- Make PR_LoadLibrary and PR_UnloadLibrary kLIBC fork-friendly.
181
182* Fri Mar 25 2016 Dmitriy Kuminov <coding@dmik.org> 4.12.0-1
183- Update to version 4.12.
184- Import OS/2-specific NSPR fixes from Mozilla for OS/2 sources.
185- Rebuild with GCC 4.9.2 and LIBC 0.6.6.
186
187* Mon Jan 16 2012 yd
188- rebuild with libc 0.6.4 runtime.
Note: See TracBrowser for help on using the repository browser.