3 %bcond_with static_gcc # linkg libgcc* statically into libstlport.
5 Summary: C++ standard library
6 Summary(pl.UTF-8): Biblioteki standardowe C++
11 License: distributable (see README.gz)
13 Source0: http://dl.sourceforge.net/stlport/%{name}-%{version}.tar.bz2
14 # Source0-md5: e31d0dc9141c4f264d887754b559cc84
15 Source1: stlport-config.in
16 Source2: stlport.pc.in
17 Source3: stlport-debug.pc.in
18 Patch0: %{name}-endianness.patch
19 Patch1: %{name}-alpha.patch
20 Patch2: %{name}-valarray-copy-constructor.patch
21 Patch3: %{name}-vendor_gcc_detection.patch
22 URL: http://stlport.sourceforge.net/
23 BuildRequires: libstdc++-devel >= 6:4.2.0-1
24 BuildRequires: sed >= 4.0
25 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28 STLport is a multiplatform implementation of C++ Standard Template
29 Library based on SGI STL. It's used by e.g. OpenOffice.
31 %description -l pl.UTF-8
32 STLport to wieloplatformowa implementacja standardowej biblioteki
33 szablonów (Standard Template Library) C++ oparta na SGI STL. Jest
34 używana m.in. przez OpenOffice.
37 Summary: STLport heades files, documentation
38 Summary(pl.UTF-8): Pliki nagłówkowe i dokumentacja do STLport
39 Group: Development/Libraries
40 Requires: %{name} = %{epoch}:%{version}-%{release}
43 Header files and development documentation for STLport.
45 %description devel -l pl.UTF-8
46 Pliki nagłówkowe i dokumentacja dla STLport.
49 Summary: Static STLport libraries
50 Summary(pl.UTF-8): Biblioteki statyczne do STLport
51 Group: Development/Libraries
52 Requires: %{name}-devel = %{epoch}:%{version}-%{release}
55 Static STLport libraries.
57 %description static -l pl.UTF-8
58 Biblioteki statyczne do STLport.
61 Summary: Debug version of STLport library
62 Summary(pl.UTF-8): Wersja diagnostyczna biblioteki STLport
66 Debug version of STLport library.
68 %description dbg -l pl.UTF-8
69 Wersja diagnostyczna biblioteki STLport.
72 Summary: Debug version of STLport library - development files
73 Summary(pl.UTF-8): Wersja diagnostyczna biblioteki STLport - pliki programistyczne
74 Group: Development/Libraries
75 Requires: %{name}-dbg = %{epoch}:%{version}-%{release}
76 Requires: %{name}-devel = %{epoch}:%{version}-%{release}
78 %description dbg-devel
79 Debug version of STLport library - development files.
81 %description dbg-devel -l pl.UTF-8
82 Wersja diagnostyczna biblioteki STLport - pliki programistyczne.
85 Summary: Static debug version of STLport library
86 Summary(pl.UTF-8): Statyczna wersja diagnostyczna biblioteki STLport
87 Group: Development/Libraries
88 Requires: %{name}-dbg-devel = %{epoch}:%{version}-%{release}
90 %description dbg-static
91 Static debug version of STLport library.
93 %description dbg-static -l pl.UTF-8
94 Statyczna wersja diagnostyczna biblioteki STLport.
103 sed -i -e 's/= -O2$/= %{rpmcflags}/' build/Makefiles/gmake/gcc.mak
105 cp -a %{SOURCE1} stlport-config.in
106 cp -a %{SOURCE2} stlport.pc.in
107 cp -a %{SOURCE3} stlport-debug.pc.in
112 %{?with_static_gcc:./configure --use-static-gcc}
114 %{__make} -f gcc.mak \
125 s,@prefix@,%{_prefix},g
126 s,@exec_prefix@,%{_exec_prefix},g
127 s,@libdir@,%{_libdir},g
128 s,@includedir@,%{_includedir},g
130 s,@VERSION@,%{version},g
133 %{__sed} -e "$subst" stlport-config.in > stlport-config
134 %{__sed} -e "$subst" stlport.pc.in > stlport.pc
135 %{__sed} -e "$subst" stlport-debug.pc.in > stlport-debug.pc
138 rm -rf $RPM_BUILD_ROOT
139 install -d $RPM_BUILD_ROOT%{_includedir}
141 %{__make} -C build/lib -f gcc.mak \
142 install-stldbg-shared \
143 install-stldbg-static \
144 install-release-shared \
145 install-release-static \
146 INSTALL_BIN_DIR=$RPM_BUILD_ROOT%{_bindir} \
147 INSTALL_LIB_DIR_STLDBG=$RPM_BUILD_ROOT%{_libdir} \
148 INSTALL_LIB_DIR=$RPM_BUILD_ROOT%{_libdir}
150 cp -a stlport $RPM_BUILD_ROOT%{_includedir}
151 rm -rf $RPM_BUILD_ROOT%{_includedir}/stlport/BC50
153 # let libstlport{,stlg}.so point to real lib, not artificial libstlport{,stlg}.so.5 symlink
154 ln -sf $(basename $RPM_BUILD_ROOT%{_libdir}/libstlport.so.*.*.*) \
155 $RPM_BUILD_ROOT%{_libdir}/libstlport.so
156 ln -sf $(basename $RPM_BUILD_ROOT%{_libdir}/libstlportstlg.so.*.*.*) \
157 $RPM_BUILD_ROOT%{_libdir}/libstlportstlg.so
160 install -d $RPM_BUILD_ROOT{%{_pkgconfigdir},%{_bindir}}
161 cp -a stlport.pc $RPM_BUILD_ROOT%{_pkgconfigdir}
162 cp -a stlport-debug.pc $RPM_BUILD_ROOT%{_pkgconfigdir}
163 install stlport-config $RPM_BUILD_ROOT%{_bindir}
166 rm -rf $RPM_BUILD_ROOT
168 %post -p /sbin/ldconfig
169 %postun -p /sbin/ldconfig
171 %post dbg -p /sbin/ldconfig
172 %postun dbg -p /sbin/ldconfig
175 %defattr(644,root,root,755)
177 %attr(755,root,root) %{_libdir}/libstlport.so.*.*.*
178 %attr(755,root,root) %ghost %{_libdir}/libstlport.so.5.1
179 %attr(755,root,root) %ghost %{_libdir}/libstlport.so.5
182 %defattr(644,root,root,755)
184 %attr(755,root,root) %{_libdir}/libstlport.so
185 %attr(755,root,root) %{_bindir}/stlport-config
186 %{_includedir}/stlport
187 %{_pkgconfigdir}/stlport.pc
190 %defattr(644,root,root,755)
191 %{_libdir}/libstlport.a
194 %defattr(644,root,root,755)
195 %attr(755,root,root) %{_libdir}/libstlportstlg.so.*.*.*
196 %attr(755,root,root) %ghost %{_libdir}/libstlportstlg.so.5.1
197 %attr(755,root,root) %ghost %{_libdir}/libstlportstlg.so.5
200 %defattr(644,root,root,755)
201 %attr(755,root,root) %{_libdir}/libstlportstlg.so
202 %{_pkgconfigdir}/stlport-debug.pc
205 %defattr(644,root,root,755)
206 %{_libdir}/libstlportstlg.a