]> git.pld-linux.org Git - packages/STLport.git/blobdiff - STLport.spec
- added -j1 to make install, fixes build on ti-i686 and ti-x86_64
[packages/STLport.git] / STLport.spec
index c45109691057ca26f474a2b2eb279b229f88fdc9..6e8a72197d704e39ae5ad4d87b8f80be05c2ad7b 100644 (file)
@@ -1,18 +1,25 @@
+#
+# Conditional build:
+%bcond_with    static_gcc      # linkg libgcc* statically into libstlport.
+#
 Summary:       C++ standard library
 Summary(pl.UTF-8):     Biblioteki standardowe C++
 Name:          STLport
-Version:       5.1.3
-Release:       3
+Version:       5.2.1
+Release:       2
 Epoch:         2
 License:       distributable (see README.gz)
 Group:         Libraries
 Source0:       http://dl.sourceforge.net/stlport/%{name}-%{version}.tar.bz2
-# Source0-md5: bb6459a6807c77a0363cf0d9c1fe4eb2
+# Source0-md5: a8341363e44d9d06a60e03215b38ddde
+Source1:       stlport-config.in
+Source2:       stlport.pc.in
+Source3:       stlport-debug.pc.in
 Patch0:                %{name}-endianness.patch
+Patch1:                %{name}-alpha.patch
 URL:           http://stlport.sourceforge.net/
 BuildRequires: libstdc++-devel >= 6:4.2.0-1
 BuildRequires: sed >= 4.0
-%requires_eq   libstdc++
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -48,35 +55,98 @@ Static STLport libraries.
 %description static -l pl.UTF-8
 Biblioteki statyczne do STLport.
 
+%package dbg
+Summary:       Debug version of STLport library
+Summary(pl.UTF-8):     Wersja diagnostyczna biblioteki STLport
+Group:         Libraries
+
+%description dbg
+Debug version of STLport library.
+
+%description dbg -l pl.UTF-8
+Wersja diagnostyczna biblioteki STLport.
+
+%package dbg-devel
+Summary:       Debug version of STLport library - development files
+Summary(pl.UTF-8):     Wersja diagnostyczna biblioteki STLport - pliki programistyczne
+Group:         Development/Libraries
+Requires:      %{name}-dbg = %{epoch}:%{version}-%{release}
+Requires:      %{name}-devel = %{epoch}:%{version}-%{release}
+
+%description dbg-devel
+Debug version of STLport library - development files.
+
+%description dbg-devel -l pl.UTF-8
+Wersja diagnostyczna biblioteki STLport - pliki programistyczne.
+
+%package dbg-static
+Summary:       Static debug version of STLport library
+Summary(pl.UTF-8):     Statyczna wersja diagnostyczna biblioteki STLport
+Group:         Development/Libraries
+Requires:      %{name}-dbg-devel = %{epoch}:%{version}-%{release}
+
+%description dbg-static
+Static debug version of STLport library.
+
+%description dbg-static -l pl.UTF-8
+Statyczna wersja diagnostyczna biblioteki STLport.
+
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1
 
 sed -i -e 's/= -O2$/= %{rpmcflags}/' build/Makefiles/gmake/gcc.mak
 
+cp -a %{SOURCE1} stlport-config.in
+cp -a %{SOURCE2} stlport.pc.in
+cp -a %{SOURCE3} stlport-debug.pc.in
+
 %build
-%{__make} -C build/lib -f gcc.mak \
-       release-shared \
-       release-static \
-       CC="%{__cc}" \
-       CXX="%{__cxx}"
+./configure \
+       --prefix=%{_prefix} \
+       --includedir=%{_includedir} \
+       --libdir=%{_libdir} \
+       --with-cc=%{__cc} \
+       --with-cxx=%{__cxx} \
+       --without-debug \
+       --enable-static \
+       %{?with_static_gcc:--use-static-gcc} \
+       --use-compiler-family=gcc
+
+%{__make}
+
+subst='
+       s,@prefix@,%{_prefix},g
+       s,@exec_prefix@,%{_exec_prefix},g
+       s,@libdir@,%{_libdir},g
+       s,@includedir@,%{_includedir},g
+       s,@ver@,%{version},g
+       s,@VERSION@,%{version},g
+'
+
+%{__sed} -e "$subst" stlport-config.in > stlport-config
+%{__sed} -e "$subst" stlport.pc.in > stlport.pc
+%{__sed} -e "$subst" stlport-debug.pc.in > stlport-debug.pc
 
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT%{_includedir}
 
-%{__make} -C build/lib -f gcc.mak \
-       install-release-shared \
-       install-release-static \
-       INSTALL_BIN_DIR=$RPM_BUILD_ROOT%{_bindir} \
-       INSTALL_LIB_DIR=$RPM_BUILD_ROOT%{_libdir}
-
-cp -a stlport $RPM_BUILD_ROOT%{_includedir}
-rm -rf $RPM_BUILD_ROOT%{_includedir}/stlport/BC50
+%{__make} -j1 install \
+       DESTDIR=$RPM_BUILD_ROOT \
+       INSTALL_LIB_DIR_STLDBG=$RPM_BUILD_ROOT%{_libdir}
 
-# libstlport.so.5 is removed by ldconfig or *something*, so make .so point to real soname
-ln -sf $(cd $RPM_BUILD_ROOT%{_libdir}; echo libstlport.so.*.*.*) \
+# let libstlport{,stlg}.so point to real lib, not artificial libstlport{,stlg}.so.5 symlink
+ln -sf $(basename $RPM_BUILD_ROOT%{_libdir}/libstlport.so.*.*.*) \
        $RPM_BUILD_ROOT%{_libdir}/libstlport.so
+ln -sf $(basename $RPM_BUILD_ROOT%{_libdir}/libstlportstlg.so.*.*.*) \
+       $RPM_BUILD_ROOT%{_libdir}/libstlportstlg.so
+
+install -d $RPM_BUILD_ROOT{%{_pkgconfigdir},%{_bindir}}
+cp -a stlport.pc $RPM_BUILD_ROOT%{_pkgconfigdir}
+cp -a stlport-debug.pc $RPM_BUILD_ROOT%{_pkgconfigdir}
+install stlport-config $RPM_BUILD_ROOT%{_bindir}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -84,20 +154,39 @@ rm -rf $RPM_BUILD_ROOT
 %post  -p /sbin/ldconfig
 %postun -p /sbin/ldconfig
 
+%post  dbg -p /sbin/ldconfig
+%postun dbg -p /sbin/ldconfig
+
 %files
 %defattr(644,root,root,755)
 %doc README
-%attr(755,root,root) %{_libdir}/libstlport.so.*.*
-# libstlport.so points to this one instead of soname or real lib name
-# to be fixed if nothing tries to dlopen this one (nothing should!)
-%attr(755,root,root) %{_libdir}/libstlport.so.?
+%attr(755,root,root) %{_libdir}/libstlport.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libstlport.so.5.2
+%attr(755,root,root) %ghost %{_libdir}/libstlport.so.5
 
 %files devel
 %defattr(644,root,root,755)
 %doc doc/{FAQ,*.txt}
 %attr(755,root,root) %{_libdir}/libstlport.so
+%attr(755,root,root) %{_bindir}/stlport-config
 %{_includedir}/stlport
+%{_pkgconfigdir}/stlport.pc
 
 %files static
 %defattr(644,root,root,755)
 %{_libdir}/libstlport.a
+
+%files dbg
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libstlportstlg.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libstlportstlg.so.5.2
+%attr(755,root,root) %ghost %{_libdir}/libstlportstlg.so.5
+
+%files dbg-devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libstlportstlg.so
+%{_pkgconfigdir}/stlport-debug.pc
+
+%files dbg-static
+%defattr(644,root,root,755)
+%{_libdir}/libstlportstlg.a
This page took 0.084614 seconds and 4 git commands to generate.