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