Sophie

Sophie

distrib > Arklinux > devel > i586 > by-pkgid > 1aa1797cdad9ea96cf0a5db99d22582a > files > 4

ttfonts-liberation-1.04-1ark.src.rpm

%define ttfontdir %{_datadir}/fonts/default/TrueType

Name: ttfonts-liberation
Version: 1.04
Release: 1ark
Summary: The Liberation font set
URL: https://fedorahosted.org/liberation-fonts/
Source: https://fedorahosted.org/releases/l/i/liberation-fonts/liberation-fonts-%version.tar.gz
Source1: 59-liberation-fonts.conf
Source2: 59-liberation-fonts-mscompat.conf
License: GPLv2 with exceptions
Group: User Interface/X
BuildRoot: %{_tmppath}/%{name}-root
BuildArch: noarch
Prereq: freetype chkfontpath findutils
Prereq: fontconfig xorg-font-utils

%description
The Liberation Fonts are intended to be replacements for the three
most commonly used fonts on Microsoft systems: Times New Roman,
Arial, and Courier New.

%prep
%setup -q -n liberation-fonts-%version

%install
rm -rf $RPM_BUILD_ROOT

install -m755 -d $RPM_BUILD_ROOT/%ttfontdir
find . -name "*.ttf" -exec install -m644 {} $RPM_BUILD_ROOT%{ttfontdir} \;

# These are created properly in the post section
touch $RPM_BUILD_ROOT%{ttfontdir}/fonts.{dir,scale}

mkdir -p $RPM_BUILD_ROOT%_sysconfdir/fonts/conf.d
install -c -m 644 %SOURCE1 %SOURCE2 $RPM_BUILD_ROOT%_sysconfdir/fonts/conf.d/

%post
%_bindir/mkfontscale %ttfontdir
%_bindir/mkfontdir %ttfontdir
%_sbindir/chkfontpath -q -a %{ttfontdir}

%postun
if [ "$1" = "0" ]; then
  if [ "x$(find %{ttfontdir} -name "*.ttf" -or -name "*.TTF" 2>/dev/null)" != "x" ]; then
  # stuff left-over, reconfig
    cd %{ttfontdir}
    %_bindir/mkfontscale
    %_bindir/mkfontdir
    %_bindir/fc-cache %{ttfontdir} 2>/dev/null ||:
  else
    # we're empty
    rm -f %{ttfontdir}/encodings.dir
    %_sbindir/chkfontpath -q -r %{ttfontdir} ||:
  fi
fi

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
%ghost %{ttfontdir}/fonts.dir
%ghost %{ttfontdir}/fonts.scale
%{ttfontdir}/*.ttf
%config %_sysconfdir/fonts/conf.d/*

%changelog
* Thu Jul 17 2008 Bernhard Rosenkraenzer <bero@arklinux.org> 1.04-1ark
- 1.04

* Fri Sep 28 2007 Bernhard Rosenkraenzer <bero@arklinux.org> 0.2-1ark
- Initial Ark Linux package