Sophie

Sophie

distrib > Arklinux > devel > i586 > media > main-src > by-pkgid > 9163c14e3904b658eb4b4f315264ae07 > files > 2

ttfonts-ps-1.0-1ark.src.rpm

%define	xfontdir_	%{_datadir}/fonts/ps
%define	xfontdir	%{xfontdir_}/TrueType

Summary:	TrueType Fonts for Pashto
Name:		ttfonts-ps
Version:	1.0
Release:	1ark
License:	Distributable
Group:		Internationalization/Pashto
BuildArch:	noarch
BuildRoot:	%{_tmppath}/%{name}-%{version}-root

URL:		http://www2.dw-world.de/pashto/download-font/
Source:		http://www2.dw-world.de/static/language/pashto/dw-pashto.zip

Requires(post,postun): %_bindir/mkfontdir /usr/sbin/chkfontpath
Requires(post,postun): fontconfig

%description
Pashto TrueType Fonts

%prep
%setup -q -c %name-%version

%build

%install
[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT

for i in *; do mv $i `echo $i |tr A-Z a-z`; done
install -d $RPM_BUILD_ROOT%{xfontdir}
install -m 0644 *.ttf $RPM_BUILD_ROOT%{xfontdir}/

%clean
[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT

%post
{
	umask 133
	touch %{xfontdir} 2> /dev/null && {
		%_bindir/mkfontscale %{xfontdir}
		%_bindir/mkfontdir %{xfontdir}
		/usr/sbin/chkfontpath -q -a %{xfontdir}
	}

	#Update fontconfig cache
	[  -x /usr/bin/fc-cache ] && HOME=/root /usr/bin/fc-cache %{xfontdir} 2> /dev/null
}

%postun
if [ "$1" = 0 ];
then
    umask 133
    /usr/sbin/chkfontpath -q -r %{xfontdir}
    #Update fontconfig cache
    [ -x /usr/bin/fc-cache ] && HOME=/root /usr/bin/fc-cache %{xfontdir} 2> /dev/null
fi

%files
%defattr(-, root, root, -)
%doc $RPM_BUILD_DIR/%{name}-%{version}/doc/
%attr(0755, root, root) %dir %{xfontdir_}
%attr(0755, root, root) %dir %{xfontdir}
%{xfontdir}/*ttf

%changelog
* Wed Jun 14 2006 Bernhard Rosenkraenzer <bero@arklinux.org> 1.0-1ark
- Initial rpm