File kdelookfonts.spec of Package KDELook.org.fonts

Name: kdelookfonts
Summary: Free opentype and truetype fonts from kde-look.org
Version: 0.1
Release: 1
License: Other
Group: System/X11/Fonts
Source0: %{name}.tar.bz2
BuildRoot: %{_tmppath}/build-root-%{name}
Distribution: openSUSE 11.1
%if 0%{?suse_version} < 1030
Prefix: /usr/X11R6/lib/X11/fonts/truetype
%else
Prefix: /usr/share/fonts/truetype
%endif
BuildArch: noarch
BuildRequires: xorg-x11-fonts
Url: http://www.kde-look.org/index.php?xcontentmode=39

%description
A selection of free opentype and truetype fonts from kde-look.org.
All fonts are under creative commons or similar free licenses.

%prep

%setup -q -c -n %{name}
echo nothing to do here

%build
echo nothing to do here
#rm mtsorts_.ttf

%install
mkdir -p $RPM_BUILD_ROOT/%{prefix}
cp *.otf  *.ttf $RPM_BUILD_ROOT/%{prefix}


cd $RPM_BUILD_ROOT

#find .%{prefix} -type d -fprint $RPM_BUILD_DIR/file.list.%{name}.dirs
echo $RPM_BUILD_ROOT/%{prefix} > $RPM_BUILD_DIR/file.list.%{name}.dirs
find .%{prefix} -type f -fprint $RPM_BUILD_DIR/file.list.%{name}.files.tmp
sed '/\/man\//s/$/.gz/g' $RPM_BUILD_DIR/file.list.%{name}.files.tmp > $RPM_BUILD_DIR/file.list.%{name}.files
find . -type l -fprint $RPM_BUILD_DIR/file.list.%{name}.libs
sed '1,2d;s,^\.,\%attr(-\,root\,root) \%dir ,' $RPM_BUILD_DIR/file.list.%{name}.dirs > $RPM_BUILD_DIR/file.list.%{name}
sed 's,^\.,\%attr(-\,root\,root) ,' $RPM_BUILD_DIR/file.list.%{name}.files >> $RPM_BUILD_DIR/file.list.%{name}
sed 's,^\.,\%attr(-\,root\,root) ,' $RPM_BUILD_DIR/file.list.%{name}.libs >> $RPM_BUILD_DIR/file.list.%{name}

%clean
rm -rf $RPM_BUILD_ROOT
rm -rf $RPM_BUILD_DIR/file.list.%{name}
rm -rf $RPM_BUILD_DIR/file.list.%{name}.libs
rm -rf $RPM_BUILD_DIR/file.list.%{name}.files
rm -rf $RPM_BUILD_DIR/file.list.%{name}.files.tmp
rm -rf $RPM_BUILD_DIR/file.list.%{name}.dirs

%files -f ../file.list.%{name}

%defattr(-,root,root,0755)


%changelog
* Mon Jul 27 2009 admin@eregion.de
- initial package