Summary: @PACKAGE_NAME@ PKCS#11 aware WebKit Browser
Name: @PACKAGE_NAME@
Version: @VERSION@
Release: 1
License: LGPL
Group: Applications/Internet
URL: https://dev.swisssign.com/projects/@PACKAGE_NAME@
Source0: %{name}-%{version}.tar.gz
BuildRequires: subversion gcc-c++ doxygen graphviz texlive automake autoconf libtool make
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
Conflicts: swisssurfer
Provides: swisssurfer
Obsoletes: swisssurfer
%if 0%{?fedora} || 0%{?rhel_version} || 0%{?centos_version}
BuildRequires: cppunit-devel qt-devel
%else%if 0%{?suse_version} || 0%{?sles_version}
BuildRequires: libcppunit-devel libqt4-devel
%endif%endif

%description
@README@

This package contains the program and shared libraries required at runtime.

%prep
%setup -q
CPPFLAGS="-std=c++0x -I/usr/include/pkcs11-helper-1.0" \
    ./configure --prefix=/usr \
            --docdir=/usr/share/doc/packages/@PACKAGE_NAME@ \
            --libdir=/usr/%_lib \
            --with-qt-install-plugins=/usr/share/qt4/plugins/designer

%build
make

%install
DESTDIR=$RPM_BUILD_ROOT make install
rm -rf $RPM_BUILD_ROOT/usr/share/doc/packages/@PACKAGE_NAME@/html
rm $RPM_BUILD_ROOT/usr/share/doc/packages/@PACKAGE_NAME@/COPYING
rm $RPM_BUILD_ROOT/usr/share/doc/packages/@PACKAGE_NAME@/INSTALL
rm $RPM_BUILD_ROOT/usr/share/doc/packages/swisssurfer/swisssurfer.spec

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root,-)
/usr/bin/@PACKAGE_NAME@
/usr/share/applications/@PACKAGE_NAME@.desktop
/usr/share/swisssurfer/swisssurfer.png
/usr/share/swisssurfer/swisssurfer.xpm
/usr/%_lib/lib*.so.*
%doc
/usr/share/doc/packages/@PACKAGE_NAME@/AUTHORS
/usr/share/doc/packages/@PACKAGE_NAME@/ChangeLog
/usr/share/doc/packages/@PACKAGE_NAME@/NEWS
/usr/share/doc/packages/@PACKAGE_NAME@/README

%package devel
Summary: @PACKAGE_NAME@ PKCS#11 aware WebKit Browser (development files)
Group: Development/Libraries/C++

%description devel
@README@

This Package contains all files required for developement.

%files devel
%defattr(-,root,root,-)
/usr/share/qt4
/usr/%_lib/lib*.so
/usr/include

%changelog
