Name: 
Summary: 
Version: 
Release: 1
Source: %{name}-%{version}.tar.gz
Requires: qt >= 1.44 kdelibs >= 1.1.2
Group: X11/KDE/Applications
URL: 
BuildRoot: /var/tmp/%{name}-buildroot
Copyright: GPL
Prefix: /usr

%description

%prep
rm -rf $RPM_BUILD_ROOT

%setup -q

%build
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" ./configure \
	--prefix=%{prefix} --with-install-root=$RPM_BUILD_ROOT
make -j 2

%install
make install

if [ -d $RPM_BUILD_ROOT/usr/man ]; then
  find $RPM_BUILD_ROOT/usr/man -type f -exec bzip2 -9f {} \;
fi
if [ -d $RPM_BUILD_ROOT/usr/info ]; then
  find $RPM_BUILD_ROOT/usr/info -type f -exec bzip2 -9f {} \;
fi
if [ -d $RPM_BUILD_ROOT/usr/X11R6/man ]; then
  find $RPM_BUILD_ROOT/usr/X11R6/man -type f -exec bzip2 -9f {} \;
fi
if [ -d $RPM_BUILD_ROOT/usr/lib/perl5/man ]; then
  find $RPM_BUILD_ROOT/usr/lib/perl5/man -type f -exec bzip2 -9f {} \;
fi

cd $RPM_BUILD_ROOT
find . -type d | sed '1,2d;s,^\.,\%attr(-\,root\,root) \%dir ,' > \
	$RPM_BUILD_DIR/file.list.%{name}

find . -type f | sed --expression='s,^\.,\%attr(-\,root\,root) ,' \
       -e '/\/etc\//s|^|%config|' \
       -e '/\/config\//s|^|%config|' \
       >> $RPM_BUILD_DIR/file.list.%{name}

find . -type l | sed 's,^\.,\%attr(-\,root\,root) ,' >> \
	$RPM_BUILD_DIR/file.list.%{name}

%clean
rm -rf $RPM_BUILD_ROOT $RPM_BUILD_DIR/file.list.%{name}

%files -f ../file.list.%{name}
%defattr(-,root,root,0755)
