Name:         STLport
Version:      5.2.1
Release:      1%{?_dist_release}
Summary:      C++ STL library compatible with the latest ANSI/ISO C++ specification
Summary(ja):  ANSI/ISO C++ 仕様に沿った C++ 標準テンプレートライブラリ
Group:        System Environment/Libraries
License:      Opensource (Free and Unrestricted)
URL:          http://www.stlport.org/
Source:       %{name}-%{version}.tar.bz2
BuildRoot:    %{_tmppath}/%{name}-%{version}-root
Vendor:       Project Vine
Distribution: Vine Linux

%description
The ANSI/ISO C++ specifcation includes a standard C++ library, also known as
the STL. GCC by default comes with an implementation that does not comply
with this standard, but instead partly implements an older version. STLport
is freely available version, based on the SGI STL implementation. It is
fully-compliant, supported, and very fast. Includes special debugging
facilities, and interesting and useful extensions to the standard.

%package devel
Summary:  STLport development headers and documentation
Summary(ja):  STL の開発用ヘッダファイルとドキュメント
Group:    Development/Libraries
Requires: %{name} = %{version}-%{release}

%description devel
Documentarion and headers for STLport


%prep
%setup -q


%build
./configure \
	--prefix=%{_prefix} \
	--bindir=%{_bindir} \
	--libdir=%{_libdir} \
	--includedir=%{_includedir} \
	--use-compiler-family=gcc \
	--enable-static \
	;

pushd build/lib
export OPT="${RPM_OPT_FLAGS}"
make clean all %{?_smp_mflags}
popd


%check
make check


%install
rm -rf $RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT install

# fix library path
mv $RPM_BUILD_ROOT$RPM_BUILD_ROOT%{_prefix}/lib/* $RPM_BUILD_ROOT%{_libdir}/
rm -rf $RPM_BUILD_ROOT/home


%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%post devel -p /sbin/ldconfig
%postun devel -p /sbin/ldconfig
%clean
rm -rf %{buildroot}


%files
%defattr(-,root,root)
%doc INSTALL INSTALL.unixes README doc etc
%{_libdir}/libstlport.so.*
%{_libdir}/libstlportg.so.*
%{_libdir}/libstlportstlg.so.*

%files devel
%defattr(-,root,root)
%{_includedir}/stlport
%{_libdir}/libstlport*.a
%{_libdir}/libstlport*.so


%changelog
* Tue Dec 14 2010 Shu KONNO <owa@bg.wakwak.com> 5.2.1-1
- updated STLport to 5.2.1

* Sun Oct 12 2008 Shu KONNO <owa@bg.wakwak.com> 5.1.5-2vl5
- fixed copy option for symlink at %%install

* Sun Oct 05 2008 Shu KONNO <owa@bg.wakwak.com> 5.1.5-1vl5
- updated to 5.1.5
- modified build, install scripts
- applied new versioning policy, spec in utf-8

* Wed Dec 21 2005 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.6.2-0vl2
- fixed typo at Group:

* Mon Dec 19 2005 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.6.2-0vl1
- updated to 4.6.2
- rebuilt with new toolchains
- changed Group:
- added Japanese summary
- added %post, %postun section

* Fri Sep 28 2001 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 4.0-0vl1
- built for Vine