]> git.pld-linux.org Git - packages/nspr.git/blob - nspr.spec
- rel 3
[packages/nspr.git] / nspr.spec
1 Summary:        Netscape Portable Runtime (NSPR)
2 Summary(pl.UTF-8):      Przenośne biblioteki uruchomieniowe Netscape
3 Name:           nspr
4 Version:        4.6.7
5 Release:        3
6 Epoch:          1
7 License:        MPL v1.1 or GPL v2+ or LGPL v2.1+
8 Group:          Libraries
9 Source0:        ftp://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v%{version}/src/%{name}-%{version}.tar.gz
10 # Source0-md5:  75d5de21ebc1a21886a25673920490ff
11 Source1:        %{name}-mozilla-nspr.pc
12 Patch0:         %{name}-am18.patch
13 Patch1:         %{name}-acfix.patch
14 Patch2:         %{name}-sparc64.patch
15 URL:            http://www.mozilla.org/projects/nspr/
16 BuildRequires:  autoconf >= 2.12
17 BuildRequires:  automake
18 BuildRequires:  sed >= 4.0
19 Obsoletes:      nspr-pthreads
20 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
21
22 %description
23 Libraries that implement cross-platform runtime services from
24 Netscape.
25
26 %description -l pl.UTF-8
27 Biblioteki z wieloplatformową implementacją usług z Netscape.
28
29 %package devel
30 Summary:        NSPR library header files for development
31 Summary(pl.UTF-8):      Pliki nagłówkowe bibliotek NSPR
32 Group:          Development/Libraries
33 Requires:       %{name} = %{epoch}:%{version}-%{release}
34 Obsoletes:      nspr-pthreads-devel
35
36 %description devel
37 Header files for the NSPR library from Netscape.
38
39 %description devel -l pl.UTF-8
40 Pliki nagłówkowe bibliotek NSPR z Netscape.
41
42 %package static
43 Summary:        Static NSPR library
44 Summary(pl.UTF-8):      Statyczna biblioteka NSPR
45 Group:          Development/Libraries
46 Requires:       %{name}-devel = %{epoch}:%{version}-%{release}
47 Obsoletes:      nspr-pthreads-static
48
49 %description static
50 Static NSPR library.
51
52 %description static -l pl.UTF-8
53 Statyczna biblioteka NSPR.
54
55 %prep
56 %setup -q
57 %patch0 -p1
58 %patch1 -p1
59 %patch2 -p0
60
61 # @includedir@ is not updated to .../nspr
62 sed -i -e 's,@includedir@,%{_includedir}/nspr,' mozilla/nsprpub/config/nspr-config.in
63
64 %build
65 cd mozilla/nsprpub
66 cp -f /usr/share/automake/config.sub build/autoconf
67 %{__autoconf}
68 # don't use "--disable-strip" - it will cause stripping
69 %configure \
70         --with-dist-prefix=$RPM_BUILD_ROOT%{_prefix} \
71         --with-dist-libdir=$RPM_BUILD_ROOT%{_libdir} \
72         --with-mozilla \
73 %ifarch %{x8664} ppc64
74         --enable-64bit \
75 %endif
76         --enable-optimize="%{rpmcflags}" \
77         --%{?debug:en}%{!?debug:dis}able-debug \
78         %{!?debug:--enable-strip} \
79         --with-pthreads \
80         --enable-ipv6
81
82 %{__make}
83
84 %install
85 rm -rf $RPM_BUILD_ROOT
86 install -d $RPM_BUILD_ROOT{%{_aclocaldir},%{_pkgconfigdir}}
87
88 cd mozilla/nsprpub
89 %{__make} install \
90         NSDISTMODE=copy
91
92 install config/%{name}.m4 $RPM_BUILD_ROOT%{_aclocaldir}
93 install config/%{name}-config $RPM_BUILD_ROOT%{_bindir}
94
95 sed \
96         -e 's#libdir=.*#libdir=%{_libdir}#g' \
97         -e 's#includedir=.*#includedir=%{_includedir}#g' \
98         -e 's#VERSION#%{version}#g' \
99         %{SOURCE1} > $RPM_BUILD_ROOT%{_pkgconfigdir}/mozilla-nspr.pc
100
101 ln -s mozilla-nspr.pc $RPM_BUILD_ROOT%{_pkgconfigdir}/nspr.pc
102
103 rm -f $RPM_BUILD_ROOT%{_bindir}/lib{nspr,plc,plds}4.so
104
105 # let rpm find deps
106 chmod 755 $RPM_BUILD_ROOT%{_libdir}/lib*.so
107
108 %clean
109 rm -rf $RPM_BUILD_ROOT
110
111 %post   -p /sbin/ldconfig
112 %postun -p /sbin/ldconfig
113
114 %files
115 %defattr(644,root,root,755)
116 %attr(755,root,root) %{_libdir}/lib*.so
117
118 %files devel
119 %defattr(644,root,root,755)
120 %attr(755,root,root) %{_bindir}/nspr-config
121 %{_includedir}/nspr
122 %{_aclocaldir}/*.m4
123 %{_pkgconfigdir}/*.pc
124
125 %files static
126 %defattr(644,root,root,755)
127 %{_libdir}/lib*.a
This page took 0.046699 seconds and 4 git commands to generate.