File LinuxLibertine.spec of Package LinuxLibertine

#
# spec file for package LinuxLibertine (Version 4.4.1)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild


Name:           LinuxLibertine
BuildRequires:  xorg-x11-devel
%if "%(xft-config --prefix)" == "/usr"
%define	fontdir     /usr/share/fonts/truetype
%else
%define	fontdir     /usr/X11R6/lib/X11/fonts/truetype
%endif
License:        GPL v2 or later
Group:          System/X11/Fonts
AutoReqProv:    on
PreReq:         %suseconfig_fonts_prereq
Version:        4.4.1
Release:        1
Summary:        Free Serif Fonts
Source:         http://surfnet.dl.sourceforge.net/sourceforge/linuxlibertine/LinLibertineFont-%{version}.tar.bz2
Url:            http://linuxlibertine.sourceforge.net/
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

%description
Free serif fonts from the LinuxLibertine project. These might be useful
when exchanging documents using Times fonts.



Authors:
--------
    PhilTheLion@users.sourceforge.net

%prep
%setup -q -n LinLibertineFont
chmod a-x *.txt Bugs Readme

%build

%install
mkdir -p $RPM_BUILD_ROOT%{fontdir}/
# use the .ttf instead of the .otf for the moment because the .otf cannot
# yet be embedded for printing in most applications (for example, embedding
# of .otf works in qt4 but not yet in qt3, see bug #157630)
# remove the version number suffix in each font (bnc#482405)
for font in *.ttf; do
mv -v $font $(basename $font | sed -e "{s/-[0-9].\+$//gi}").ttf
done
install -m 0644 *.ttf $RPM_BUILD_ROOT%{fontdir}

%clean
rm -rf %{buildroot}

%post
%run_suseconfig_fonts

%postun
%run_suseconfig_fonts

%files
%defattr(-,root,root,755)
%doc Bugs ChangeLog.txt GPL.txt LICENCE.txt OFL.txt Readme Readme-TEX.txt
%{fontdir}

%changelog
openSUSE Build Service is sponsored by