%define name STLport %define version 5.1.3 %define release %mkrel 4 %define major 5.1 %define libname %mklibname %name %major %define develname %mklibname %name -d Summary: Complete C++ standard library header files and libraries Name: %{name} Version: %{version} Release: %{release} URL: http://www.stlport.org/ License: GPL Group: Development/C++ BuildRoot: %{_tmppath}/%{name}-%{version}-root BuildRequires: gcc >= 3.2-0.3mdk Source: http://www.stlport.com/archive/STLport-%{version}.tar.bz2 %description STLport is a multiplatform STL implementation based on SGI STL. This package contains the runtime library for STLport. %package -n %libname Summary: Complete C++ standard library Group: Development/C++ Provides: lib%{name} = %version-%release # Previous package had major 5.0, but was named libSTLport5 and # contained libstlport.so.5 . So we have to obsolete it, I think. # -AdamW 2007/07 Obsoletes: %{_lib}%{name}5 %description -n %libname STLport is a multiplatform STL implementation based on SGI STL. This package contains the runtime library for STLport. %package -n %develname Summary: Complete C++ standard library header files and libraries Group: Development/C++ Requires: %libname = %version Provides: %name-devel = %version-%release Obsoletes: %{_lib}%{name}5-devel %description -n %develname This package contains the headers that programmers will need to develop applications which will use %{libname}. STLport is a multiplatform STL implementation based on SGI STL. Complete C++ standard library, including <complex> and SGI STL iostreams. If you would like to use your code with STLport add "-nostdinc++ -I/usr/include/stlport" when compile and -lstlport when link (eg: gcc -nostdinc++ -I/usr/include/stlport x.cc -lstlport). %prep %setup -q %build ( cd build/lib %make -f gcc.mak all \ CC="gcc" CXX="g++" EXTRA_CXXFLAGS="$RPM_OPT_FLAGS" \ INSTALLDIR_INC=%_includedir/stlport%{major} \ INSTALLDIR_LIB=%_libdir ) %install [ $RPM_BUILD_ROOT != "/" ] && rm -rf $RPM_BUILD_ROOT (cd build/lib %make -f gcc.mak install \ CC="gcc" CXX="g++" EXTRA_CXXFLAGS="$RPM_OPT_FLAGS" \ INSTALLDIR_INC=%buildroot%_includedir/stlport%{major} \ INSTALLDIR_LIB=%buildroot%_libdir ) mkdir -p %buildroot%{_libdir} mkdir -p %buildroot%{_includedir} cp -r lib/* $RPM_BUILD_ROOT%{_libdir} cp -r stlport $RPM_BUILD_ROOT%{_includedir} rm -rf $RPM_BUILD_ROOT%{_includedir}/stlport/BC50 rm -rf $RPM_BUILD_ROOT%{_includedir}/stlport/old_hp # the major is 5.1, so it really shouldn't install *.so.5. This would # break stuff if it went to major 5.2 in future. -AdamW 2007/07 rm -f $RPM_BUILD_ROOT%{_libdir}/*.so.5 %if %mdkversion < 200900 %post -n %libname -p /sbin/ldconfig %endif %if %mdkversion < 200900 %postun -n %libname -p /sbin/ldconfig %endif %clean [ $RPM_BUILD_ROOT != "/" ] && rm -rf $RPM_BUILD_ROOT %files -n %libname %defattr(-,root,root) %{_libdir}/*.so.* %files -n %develname %defattr(-,root,root) %{_libdir}/*.so %{_includedir}/stlport %changelog * Sat Aug 02 2008 Thierry Vignaud <tvignaud@mandriva.com> 5.1.3-4mdv2009.0 + Revision: 261205 - rebuild * Tue Jul 29 2008 Thierry Vignaud <tvignaud@mandriva.com> 5.1.3-3mdv2009.0 + Revision: 253566 - rebuild + Pixel <pixel@mandriva.com> - do not call ldconfig in %%post/%%postun, it is now handled by filetriggers * Wed Jan 02 2008 Olivier Blin <oblin@mandriva.com> 5.1.3-1mdv2008.1 + Revision: 140863 - restore BuildRoot + Thierry Vignaud <tvignaud@mandriva.com> - kill re-definition of %%buildroot on Pixel's request * Fri Jul 06 2007 Adam Williamson <awilliamson@mandriva.com> 5.1.3-1mdv2008.0 + Revision: 48830 - drop lib*.so.5 as the major is 5.1 - fix major and obsolete previous package as it had wrong major - better description - new devel policy - create /usr/include during %%install (fixes #28476) - new release 5.1.3 - Import STLport * Thu Jun 22 2006 Lenny Cartier <lenny@mandriva.com> 5.0.1-2mdv2007.0 - rebuild * Wed Jan 18 2006 Olivier Thauvin <nanardon@mandriva.org> 5.0.1-1mdk - 5.0.1, partially from alex.minenko@gmail.com * Mon Aug 23 2004 Olivier Thauvin <thauvin@aerov.jussieu.fr> 4.6.2-1mdk - libdification - cleanup - From Raphaƫl Gertz <rapsys@free.fr> - 4.6.2 - First release of a separate package.