5 Summary: Netscape Portable Runtime
6 Url: http://www.mozilla.org/projects/nspr/
8 Source: ftp://ftp.mozilla.org/pub/nspr/releases/v%{version}/src/nspr-%{version}.tar.bz2
11 Source1001: nspr.manifest
12 BuildRequires: gcc-c++
13 BuildRequires: pkg-config
14 BuildRoot: %{_tmppath}/%{name}-%{version}-build
17 NSPR provides platform independence for non-GUI operating system
18 facilities. These facilities include threads, thread synchronization,
19 normal file and network I/O, interval timing and calendar time, basic
20 memory management (malloc and free), and shared library linking.
23 Summary: Netscape Portable Runtime development files
24 Group: Base/Development
25 Requires: nspr = %{version}
28 NSPR provides platform independence for non-GUI operating system
29 facilities. These facilities include threads, thread synchronization,
30 normal file and network I/O, interval timing and calendar time, basic
31 memory management (malloc and free), and shared library linking.
34 %setup -n nspr-%{version} -q
38 # set buildtime to "last-modification-time"
39 modified="$(sed -n '/^----/n;s/ - .*$//;p;q' "%{_sourcedir}/%{name}.changes")"
40 BUILD_STRING="$(date -u -d "${modified}" "+%%F %%T")"
41 BUILD_TIME="$(date -u -d "${modified}" "+%%s000000")"
43 export CFLAGS="%{optflags}"
44 %configure --enable-optimize="$CFLAGS" \
48 --includedir=%{_includedir}/nspr4 \
50 make SH_DATE="$BUILD_STRING" SH_NOW="$BUILD_TIME" %{?_smp_mflags}
53 perl ./pr/tests/runtests.pl 2>&1 | tee output.log
54 TEST_FAILURES=`grep -c FAILED ./output.log` || :
55 if [ $TEST_FAILURES -ne 0 ]; then
56 echo "error: test suite returned failure(s)"
59 echo "test suite completed"
63 mkdir -p %{buildroot}%{_bindir}
64 mkdir -p %{buildroot}%{_libdir}/nspr
65 mkdir -p %{buildroot}%{_libdir}/pkgconfig
66 mkdir -p %{buildroot}%{_includedir}/nspr4
67 #cp nspr/config/nspr-config %{buildroot}%{_bindir}/
68 #cp nspr/config/nspr.pc %{buildroot}%{_libdir}/pkgconfig
69 #cp -L nspr/dist/lib/*.so %{buildroot}%{_libdir}
70 #cp -L nspr/dist/lib/*.a %{buildroot}%{_libdir}/nspr/
71 #cp -rL nspr/dist/include/nspr/* %{buildroot}%{_includedir}/nspr4/
72 cp config/nspr-config %{buildroot}%{_bindir}/
73 cp config/nspr.pc %{buildroot}%{_libdir}/pkgconfig
74 cp -L dist/lib/*.so %{buildroot}%{_libdir}
75 cp -L dist/lib/*.a %{buildroot}%{_libdir}/nspr/
76 cp -rL dist/include/nspr/* %{buildroot}%{_includedir}/nspr4/
78 chmod -x %{buildroot}%{_includedir}/nspr4/prvrsion.h
80 %post -p /sbin/ldconfig
82 %postun -p /sbin/ldconfig
85 %manifest %{name}.manifest
86 %defattr(-, root, root)
90 %manifest %{name}.manifest
91 %defattr(-, root, root)
92 %{_bindir}/nspr-config
93 %{_libdir}/pkgconfig/nspr.pc
95 %exclude %{_includedir}/nspr4/md/*