]> git.pld-linux.org Git - packages/nspr.git/blobdiff - nspr.spec
- updated to 4.6.5
[packages/nspr.git] / nspr.spec
index c6d5cdf3c13e10eff51e5b4f9ebb017e0de6ee04..4a2b6e102b5ba12ba227cd723eac1ee029cb944f 100644 (file)
--- a/nspr.spec
+++ b/nspr.spec
@@ -1,17 +1,20 @@
-
-%define                _snap   20030517
-
 Summary:       Netscape Portable Runtime (NSPR)
 Summary(pl):   Przeno¶ne biblioteki uruchomieniowe Netscape
 Name:          nspr
-Version:       4.3
-Release:       2.%{_snap}
+Version:       4.6.5
+Release:       1
 Epoch:         1
-License:       GPL
+License:       MPL v1.1 or GPL v2+ or LGPL v2.1+
 Group:         Libraries
-Source0:       %{name}-%{_snap}.tar.gz
-# Source0-md5: 3392849244f60ce772ec91c0a5d92546
-BuildRequires: autoconf
+Source0:       ftp://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v%{version}/src/%{name}-%{version}.tar.gz
+# Source0-md5: 9bf15436496cb6bd96c1939f3ffb839f
+Source1:       %{name}-mozilla-nspr.pc
+Patch0:                %{name}-am18.patch
+Patch1:                %{name}-acfix.patch
+URL:           http://www.mozilla.org/projects/nspr/
+BuildRequires: autoconf >= 2.12
+BuildRequires: automake
+BuildRequires: sed >= 4.0
 Obsoletes:     nspr-pthreads
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -26,7 +29,7 @@ Biblioteki z wieloplatformow
 Summary:       NSPR library header files for development
 Summary(pl):   Pliki nag³ówkowe bibliotek NSPR
 Group:         Development/Libraries
-Requires:      %{name} = %{epoch}:%{version}
+Requires:      %{name} = %{epoch}:%{version}-%{release}
 Obsoletes:     nspr-pthreads-devel
 
 %description devel
@@ -39,7 +42,7 @@ Pliki nag
 Summary:       Static NSPR library
 Summary(pl):   Statyczna biblioteka NSPR
 Group:         Development/Libraries
-Requires:      %{name}-devel = %{epoch}:%{version}
+Requires:      %{name}-devel = %{epoch}:%{version}-%{release}
 Obsoletes:     nspr-pthreads-static
 
 %description static
@@ -49,15 +52,25 @@ Static NSPR library.
 Statyczna biblioteka NSPR.
 
 %prep
-%setup -q -c mozilla
+%setup -q
+%patch0 -p1
+%patch1 -p1
+
+# @includedir@ is not updated to .../nspr
+sed -i -e 's,@includedir@,%{_includedir}/nspr,' mozilla/nsprpub/config/nspr-config.in
 
 %build
 cd mozilla/nsprpub
+cp -f /usr/share/automake/config.sub build/autoconf
 %{__autoconf}
 # don't use "--disable-strip" - it will cause stripping
 %configure \
        --with-dist-prefix=$RPM_BUILD_ROOT%{_prefix} \
+       --with-dist-libdir=$RPM_BUILD_ROOT%{_libdir} \
        --with-mozilla \
+%ifarch %{x8664} ppc64
+       --enable-64bit \
+%endif
        --enable-optimize="%{rpmcflags}" \
        --%{?debug:en}%{!?debug:dis}able-debug \
        %{!?debug:--enable-strip} \
@@ -68,7 +81,7 @@ cd mozilla/nsprpub
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{_aclocaldir}
+install -d $RPM_BUILD_ROOT{%{_aclocaldir},%{_pkgconfigdir}}
 
 cd mozilla/nsprpub
 %{__make} install \
@@ -77,6 +90,17 @@ cd mozilla/nsprpub
 install config/%{name}.m4 $RPM_BUILD_ROOT%{_aclocaldir}
 install config/%{name}-config $RPM_BUILD_ROOT%{_bindir}
 
+sed \
+       -e 's#libdir=.*#libdir=%{_libdir}#g' \
+       -e 's#includedir=.*#includedir=%{_includedir}#g' \
+       -e 's#VERSION#%{version}#g' \
+       %{SOURCE1} > $RPM_BUILD_ROOT%{_pkgconfigdir}/mozilla-nspr.pc
+
+ln -s mozilla-nspr.pc $RPM_BUILD_ROOT%{_pkgconfigdir}/nspr.pc
+
+# let rpm find deps
+chmod 755 $RPM_BUILD_ROOT%{_libdir}/lib*.so
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -92,7 +116,8 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{_bindir}/nspr-config
 %{_includedir}/nspr
 %{_aclocaldir}/*.m4
+%{_pkgconfigdir}/*.pc
 
 %files static
 %defattr(644,root,root,755)
-%attr(644,root,root) %{_libdir}/lib*.a
+%{_libdir}/lib*.a
This page took 0.027023 seconds and 4 git commands to generate.