]> git.pld-linux.org Git - packages/nspr.git/blobdiff - nspr.spec
- updated to 4.6.5
[packages/nspr.git] / nspr.spec
index 589c84345a8196a35403fff0e37f0406cebf60d3..4a2b6e102b5ba12ba227cd723eac1ee029cb944f 100644 (file)
--- a/nspr.spec
+++ b/nspr.spec
@@ -1,19 +1,20 @@
 Summary:       Netscape Portable Runtime (NSPR)
 Summary(pl):   Przeno¶ne biblioteki uruchomieniowe Netscape
 Name:          nspr
-Version:       4.4.1
-Release:       3
+Version:       4.6.5
+Release:       1
 Epoch:         1
-License:       MPL or GPL
+License:       MPL v1.1 or GPL v2+ or LGPL v2.1+
 Group:         Libraries
-Source0:       http://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v%{version}/src/%{name}-%{version}.tar.gz
-# Source0-md5: 6187ec5f2c01554ceef2db35160f84dc
+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
-Patch2:                %{name}-amd64.patch
-Patch3:                %{name}-libdir.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)
 
@@ -28,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
@@ -41,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
@@ -54,18 +55,22 @@ Statyczna biblioteka NSPR.
 %setup -q
 %patch0 -p1
 %patch1 -p1
-%patch2 -p1
-%patch3 -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 /usr/share/automake/config.sub build/autoconf/
+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} \
@@ -76,7 +81,7 @@ cp /usr/share/automake/config.sub build/autoconf/
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{_aclocaldir}
+install -d $RPM_BUILD_ROOT{%{_aclocaldir},%{_pkgconfigdir}}
 
 cd mozilla/nsprpub
 %{__make} install \
@@ -85,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
 
@@ -100,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.05403 seconds and 4 git commands to generate.