%define fontname rufscript %define fontdir %{_datadir}/fonts/%{fontname} %define fontconfdir %{_sysconfdir}/fonts/conf.d %define conf1 69-rufscript.conf Name: %{fontname}-fonts Version: 0.1 Release: 1%{?dist} Summary: Rufscripts is a decorative handwriting based font Group: User Interface/X License: GPLv3 with exceptions URL: http://hiran.in/blog/rufscript-font Source0: http://hiran.in/content/fonts/rufscript/src/Rufscript010.sfd Source1: 69-rufscript.conf BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: fontforge %description Rufscripts is a handwriting based font suitable for comic scripts and small labels. It is created using completely free and open source tools. %prep %setup -q -c -T cp %{SOURCE0} . %build fontforge -c 'Open($1); Generate($2)' Rufscript010.sfd Rufscript010.ttf %install rm -rf $RPM_BUILD_ROOT install -dm 755 $RPM_BUILD_ROOT%{fontdir} install -pm 644 *.ttf $RPM_BUILD_ROOT%{fontdir} install -m 0755 -d $RPM_BUILD_ROOT%{fontconfdir} install -m 0644 -p %{SOURCE1} $RPM_BUILD_ROOT%{fontconfdir}/ %clean rm -rf $RPM_BUILD_ROOT %post if [ -x %{_bindir}/fc-cache ] ; then %{_bindir}/fc-cache -f %{fontdir} || : fi %postun if [ $1 -eq 0 -a -x %{_bindir}/fc-cache ] ; then %{_bindir}/fc-cache -f %{fontdir} || : fi %files %defattr(644,root,root,755) %dir %{fontdir}/ %{fontdir}/*.ttf %config(noreplace) %{fontconfdir}/%{conf1} %changelog * Sat Oct 18 2008 Rahul Sundaram 0.1-1 - initial build