File ubuntu-fonts.spec of Package ubuntu-fonts

%define realname ubuntu-font-family
%define realver  0.83
%define srcext   zip

# Common info
Name:          ubuntu-fonts
Version:       %{realver}
Release:       %{?extraver:0.}1%{?dist}
License:       Ubuntu Font Licence 1.0
Group:         System/X11/Fonts
URL:           http://font.ubuntu.com/
Summary:       Ubuntu Font Family

# Install-time parameters
Provides:         %{realname} = %{realver}
Requires(post):   fontconfig
Requires(postun): fontconfig

# Build-time parameters
BuildArch:     noarch
BuildRequires: unzip
BuildRoot:     %{_tmppath}/%{name}-root
Source:        http://font.ubuntu.com/download/%{realname}-%{realver}%{?extraver}.%{srcext}

%description
The Ubuntu Font Family are a set of matching new libre/open fonts in
development during 2010--2011. The development is being funded by
Canonical Ltd on behalf the wider Free Software community and the
Ubuntu project.  The technical font design work and implementation is
being undertaken by Dalton Maag.

Both the final font Truetype/OpenType files and the design files used
to produce the font family are distributed under an open licence and
you are expressly encouraged to experiment, modify, share and improve.

# Preparation step (unpackung and patching if necessary)
%prep
%setup -q -n %{realname}-%{realver}%{?extraver}

%build

%install
%{__install} -d -m755       %{buildroot}%{_datadir}/fonts/truetype/
%{__install}    -m644 *.ttf %{buildroot}%{_datadir}/fonts/truetype/

%clean
[ "%{buildroot}" != "/" ] && %{__rm} -rf %{buildroot}

%files
%defattr(-,root,root)
%doc *.txt
%dir %{_datadir}/fonts/truetype/
%{_datadir}/fonts/truetype/*.ttf

%post
if [ -x /usr/bin/fc-cache ]
then
    /usr/bin/fc-cache || :
fi

%postun
if [ $1 -eq 0 -a -x /usr/bin/fc-cache ]
then
    /usr/bin/fc-cache || :
fi

%changelog
openSUSE Build Service is sponsored by