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

# rpmbuild -bb --clean @PACKAGE_NAME@.spec
Name: @PACKAGE_NAME@
Version: @PACKAGE_VERSION@
Release: 1
License: LGPL
Group: Development/Libraries/C++
Summary: dummy

%description
dummy

%package minimal
Summary: MRW's C++ Class Library (minimal release, no debugging features)
Group: Development/Libraries/C++
URL: http://marc.waeckerlin.org/mrw-c++/index.html
Source0: @PACKAGE_NAME@-@PACKAGE_VERSION@.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
Prefix: /usr
Provides: @PACKAGE_NAME@

%description minimal
@README@

This package contains only the shared libraries required at runtime,
linked with minimal feature, no logging, no stacktrace, no development
support at all. This package can be used e.g. for the videorekorder at
http://marc.waeckerlin.org/videorekorder/index.html

%prep
%setup -q
CXXFLAGS="-O3" ./configure --prefix=/usr \
                           --datadir=/usr/share/doc/packages \
                           --disable-threads --disable-autofntrace \
                           --disable-log4cxx --disable-ltdl --disable-stacktrace \
                           --disable-doxygen --disable-dot \
%ifarch x86_64
                           --libdir=/usr/lib64
%else
                           --libdir=/usr/lib
%endif                           

%build
make

%install
DESTDIR=$RPM_BUILD_ROOT make all install
rm -r $RPM_BUILD_ROOT/usr/include/mrw
rmdir $RPM_BUILD_ROOT/usr/include
rm $RPM_BUILD_ROOT/usr/lib/libmrw-mt*
rm $RPM_BUILD_ROOT/usr/lib/libmrw.la
rm $RPM_BUILD_ROOT/usr/lib/libmrw.a
rm $RPM_BUILD_ROOT/usr/share/doc/packages/@PACKAGE_NAME@/INSTALL
rm -r $RPM_BUILD_ROOT/usr/share/doc/packages/@PACKAGE_NAME@/doc
rm $RPM_BUILD_ROOT/usr/share/doc/packages/@PACKAGE_NAME@/mrw-c++.spec
rm -r $RPM_BUILD_ROOT/usr/share/doc/packages/@PACKAGE_NAME@/examples

%clean
rm -rf $RPM_BUILD_ROOT

%files minimal
%defattr(-,root,root,-)
/usr/lib/libmrw.so
/usr/lib/libmrw.so.@MAJOR@
/usr/lib/libmrw.so.@PACKAGE_VERSION@
/usr/share/doc/packages/@PACKAGE_NAME@/COPYING
/usr/share/doc/packages/@PACKAGE_NAME@/README
/usr/share/doc/packages/@PACKAGE_NAME@/AUTHORS
/usr/share/doc/packages/@PACKAGE_NAME@/NEWS
/usr/share/doc/packages/@PACKAGE_NAME@/ChangeLog

%changelog
@CHANGE_LOG@
