## @file
##
## $Id$
##
## $Date$
## $Author$
##
## @copy &copy; Marc W&auml;ckerlin
## @license LGPL, see file <a href="license.html">COPYING</a>
##

# rpmbuild -bb --clean @PACKAGENAME@.spec
Summary: MRW's C++ Class Library, facilities for modern C++ programming
Name: @PACKAGENAME@
Version: @MAJOR@.@MINOR@.@LEAST@
Release: 1
License: LGPL
Group: Development/Libraries/C++
URL: http://marc.waeckerlin.org/mrw-c++/index.html
Source0: @PACKAGENAME@-@MAJOR@.@MINOR@.@LEAST@.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
Prefix: /usr

Requires: binutils
Requires: log4cxx

%description
@README@

This package contains only the shared libraries required at runtime.

%prep
%setup -q
CXXFLAGS="-O3" ./configure --prefix=$RPM_BUILD_ROOT/usr --datadir=$RPM_BUILD_ROOT/usr/share/doc/packages

%build
make

%install
make install
find "$RPM_BUILD_ROOT" -name '*.la' | xargs perl -pi -e 's#'"${RPM_BUILD_ROOT//+/\\+}"'##g'

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root,-)
/usr/lib/libmrw.so
/usr/lib/libmrw.so.@MAJOR@
/usr/lib/libmrw.so.@MAJOR@.@MINOR@.@LEAST@
/usr/lib/libmrwexcstderr.so
/usr/lib/libmrwexcstderr.so.@MAJOR@
/usr/lib/libmrwexcstderr.so.@MAJOR@.@MINOR@.@LEAST@
/usr/lib/libmrwexclog4cxx.so
/usr/lib/libmrwexclog4cxx.so.@MAJOR@
/usr/lib/libmrwexclog4cxx.so.@MAJOR@.@MINOR@.@LEAST@
/usr/lib/libmrwautofunctiontracelog4cxx.so
/usr/lib/libmrwautofunctiontracelog4cxx.so.@MAJOR@
/usr/lib/libmrwautofunctiontracelog4cxx.so.@MAJOR@.@MINOR@.@LEAST@
/usr/lib/libmrwautofunctiontracestdlog.so
/usr/lib/libmrwautofunctiontracestdlog.so.@MAJOR@
/usr/lib/libmrwautofunctiontracestdlog.so.@MAJOR@.@MINOR@.@LEAST@
/usr/lib/libmrwlog4cxxconfiguration.so
/usr/lib/libmrwlog4cxxconfiguration.so.@MAJOR@
/usr/lib/libmrwlog4cxxconfiguration.so.@MAJOR@.@MINOR@.@LEAST@
/usr/share/doc/packages/@PACKAGENAME@/COPYING
/usr/share/doc/packages/@PACKAGENAME@/README
/usr/share/doc/packages/@PACKAGENAME@/AUTHORS
/usr/share/doc/packages/@PACKAGENAME@/NEWS
/usr/share/doc/packages/@PACKAGENAME@/ChangeLog

%package mt
Summary: MRW's C++ Class Library (thread safe extensions)
Group: Development/Libraries/C++
Requires: @PACKAGENAME@ = @MAJOR@.@MINOR@.@LEAST@
Requires: boost

%description mt
@README@

This Package contains thread safe libraries.

%files mt
%defattr(-,root,root,-)
/usr/lib/libmrw-mt.so
/usr/lib/libmrw-mt.so.@MAJOR@
/usr/lib/libmrw-mt.so.@MAJOR@.@MINOR@.@LEAST@
/usr/lib/libmrwexcstderr-mt.so
/usr/lib/libmrwexcstderr-mt.so.@MAJOR@
/usr/lib/libmrwexcstderr-mt.so.@MAJOR@.@MINOR@.@LEAST@
/usr/lib/libmrwexclog4cxx-mt.so
/usr/lib/libmrwexclog4cxx-mt.so.@MAJOR@
/usr/lib/libmrwexclog4cxx-mt.so.@MAJOR@.@MINOR@.@LEAST@
/usr/lib/libmrwautofunctiontracelog4cxx-mt.so
/usr/lib/libmrwautofunctiontracelog4cxx-mt.so.@MAJOR@
/usr/lib/libmrwautofunctiontracelog4cxx-mt.so.@MAJOR@.@MINOR@.@LEAST@
/usr/lib/libmrwautofunctiontracestdlog-mt.so
/usr/lib/libmrwautofunctiontracestdlog-mt.so.@MAJOR@
/usr/lib/libmrwautofunctiontracestdlog-mt.so.@MAJOR@.@MINOR@.@LEAST@
/usr/lib/libmrwlog4cxxconfiguration-mt.so
/usr/lib/libmrwlog4cxxconfiguration-mt.so.@MAJOR@
/usr/lib/libmrwlog4cxxconfiguration-mt.so.@MAJOR@.@MINOR@.@LEAST@

%package devel
Summary: MRW's C++ Class Library (development files)
Group: Development/Libraries/C++
Requires: @PACKAGENAME@ = @MAJOR@.@MINOR@.@LEAST@
Requires: @PACKAGENAME@-mt = @MAJOR@.@MINOR@.@LEAST@
Requires: gcc-c++ >= 3.0

%description devel
@README@

This Package contains all files required for developement.

%files devel
%defattr(-,root,root,-)
/usr/lib/libmrw.a
/usr/lib/libmrw.la
/usr/lib/libmrwexcstderr.a
/usr/lib/libmrwexcstderr.la
/usr/lib/libmrwexclog4cxx.a
/usr/lib/libmrwexclog4cxx.la
/usr/lib/libmrw-mt.a
/usr/lib/libmrw-mt.la
/usr/lib/libmrwautofunctiontracelog4cxx-mt.a
/usr/lib/libmrwautofunctiontracelog4cxx-mt.la
/usr/lib/libmrwautofunctiontracelog4cxx.a
/usr/lib/libmrwautofunctiontracelog4cxx.la
/usr/lib/libmrwautofunctiontracestdlog-mt.a
/usr/lib/libmrwautofunctiontracestdlog-mt.la
/usr/lib/libmrwautofunctiontracestdlog.a
/usr/lib/libmrwautofunctiontracestdlog.la
/usr/lib/libmrwlog4cxxconfiguration.a
/usr/lib/libmrwlog4cxxconfiguration.la
/usr/lib/libmrwexclog4cxx-mt.a
/usr/lib/libmrwexclog4cxx-mt.la
/usr/lib/libmrwexcstderr-mt.a
/usr/lib/libmrwexcstderr-mt.la
/usr/lib/libmrwlog4cxxconfiguration-mt.a
/usr/lib/libmrwlog4cxxconfiguration-mt.la
/usr/include
/usr/share/doc/packages/@PACKAGENAME@/examples
/usr/share/doc/packages/@PACKAGENAME@/doc
/usr/share/doc/packages/@PACKAGENAME@/@PACKAGENAME@.spec
/usr/share/doc/packages/@PACKAGENAME@/INSTALL

%changelog
@CHANGE_LOG@
