| 1 | # Note: this .spec is borrowed from nspr-4.12.0-1.fc24.src.rpm
|
|---|
| 2 |
|
|---|
| 3 | Summary: Netscape Portable Runtime
|
|---|
| 4 | Name: nspr
|
|---|
| 5 | Version: 4.12.0
|
|---|
| 6 | Release: 3%{?dist}
|
|---|
| 7 | License: MPLv2.0
|
|---|
| 8 | URL: http://www.mozilla.org/projects/nspr/
|
|---|
| 9 | Group: System Environment/Libraries
|
|---|
| 10 | Conflicts: filesystem < 3
|
|---|
| 11 | Vendor: bww bitwise works GmbH
|
|---|
| 12 |
|
|---|
| 13 | %scm_source svn http://svn.netlabs.org/repos/ports/nspr/trunk 2052
|
|---|
| 14 |
|
|---|
| 15 | BuildRequires: 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 |
|
|---|
| 22 | Source1: nspr-config.xml
|
|---|
| 23 |
|
|---|
| 24 | # DEF files to create forwarders for the legacy package
|
|---|
| 25 | Source10: nspr4k.def
|
|---|
| 26 | Source11: plc4k.def
|
|---|
| 27 | Source12: plds4k.def
|
|---|
| 28 |
|
|---|
| 29 | %description
|
|---|
| 30 | NSPR provides platform independence for non-GUI operating system
|
|---|
| 31 | facilities. These facilities include threads, thread synchronization,
|
|---|
| 32 | normal file and network I/O, interval timing and calendar time, basic
|
|---|
| 33 | memory management (malloc and free) and shared library linking.
|
|---|
| 34 |
|
|---|
| 35 | %package devel
|
|---|
| 36 | Summary: Development libraries for the Netscape Portable Runtime
|
|---|
| 37 | Group: Development/Libraries
|
|---|
| 38 | Requires: nspr = %{version}-%{release}
|
|---|
| 39 | Requires: pkgconfig
|
|---|
| 40 | # @todo We don't have xmlto yet.
|
|---|
| 41 | #BuildRequires: xmlto
|
|---|
| 42 | Conflicts: filesystem < 3
|
|---|
| 43 |
|
|---|
| 44 | %description devel
|
|---|
| 45 | Header files for doing development with the Netscape Portable Runtime.
|
|---|
| 46 |
|
|---|
| 47 | %package legacy
|
|---|
| 48 | Summary: Legacy libraries for Netscape Portable Runtime
|
|---|
| 49 | Group: System Environment/Libraries
|
|---|
| 50 | Requires: nspr = %{version}-%{release}
|
|---|
| 51 |
|
|---|
| 52 | %description legacy
|
|---|
| 53 | NSPR 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.
|
|---|
| 64 | autoconf
|
|---|
| 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)
|
|---|
| 78 | sed -e 's/^MOZ_DEBUG_SYMBOLS = 1$/MOZ_DEBUG_SYMBOLS =/' -i ./config/autoconf.mk
|
|---|
| 79 |
|
|---|
| 80 | make %{?_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.
|
|---|
| 94 | for m in %{SOURCE10} %{SOURCE11} %{SOURCE12}; do
|
|---|
| 95 | cp ${m} .
|
|---|
| 96 | done
|
|---|
| 97 | for m in nspr4 plc4 plds4; do
|
|---|
| 98 | gcc -Zomf -Zdll -nostdlib ${m}k.def -l./dist/lib/${m}.dll -lend -o ${m}k.dll
|
|---|
| 99 | done
|
|---|
| 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 |
|
|---|
| 118 | DESTDIR=$RPM_BUILD_ROOT \
|
|---|
| 119 | make install
|
|---|
| 120 |
|
|---|
| 121 | # Install forwarder DLLs.
|
|---|
| 122 | cp -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.
|
|---|