File liberation2-fonts.spec of Package liberation2-fonts
#
# spec file for package liberation2-fonts
#
# Copyright (c) 2012 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/
#
Name: liberation2-fonts
Version: 2.00.1
Release: 0
Summary: Liberation Fonts
License: OFL-1.1
Group: System/X11/Fonts
Url: https://fedorahosted.org/liberation-fonts/
Source0: https://fedorahosted.org/releases/l/i/liberation-fonts/liberation-fonts-ttf-%{version}.tar.gz
# following two configuration files should override configuration
# for liberation fonts 1.xx series (good native hinting instructions);
# it is better to use autohinter for liberation 2.0 nowdays
Source1: 12-suse-liberation2-hinting.conf
Source2: 17-suse-liberation2-hintstyle.conf
Source100: %{name}-rpmlintrc
BuildRequires: fontconfig
BuildRequires: fontpackages-devel
%reconfigure_fonts_prereq
Provides: scalable-font-el
Provides: locale(bg;el;ru;bg)
Conflicts: liberation-fonts
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
%description
Free fonts which are metric compatible to "Arial", "Times New Roman"
and "Courier New".
%prep
%setup -q -n liberation-fonts-ttf-%{version}
%build
%if 0%{suse_version} >= 1220
# nothing to do
%else
# in suse 12.1 and lower, hinting setting was included
# in 50-pre-user.conf, so we have to increase priority
# numbers
cp %{SOURCE1} 51-suse-liberation2-hinting.conf
cp %{SOURCE2} 51-suse-liberation2-hintstyle.conf
%endif
%install
mkdir -p %{buildroot}%{_ttfontsdir}
install -pm 0644 *.ttf %{buildroot}%{_ttfontsdir}/
%if 0%{suse_version} >= 1220
%install_fontsconf %{SOURCE1}
%install_fontsconf %{SOURCE2}
%else
%install_fontsconf 51-suse-liberation2-hinting.conf
%install_fontsconf 51-suse-liberation2-hintstyle.conf
%endif
%reconfigure_fonts_scriptlets
%files
%defattr(-,root,root,-)
%doc AUTHORS ChangeLog LICENSE README TODO
%{_ttfontsdir}
%files_fontsconf_availdir
%if 0%{suse_version} >= 1220
%files_fontsconf_file -l 12-suse-liberation2-hinting.conf
%files_fontsconf_file -l 17-suse-liberation2-hintstyle.conf
%else
%files_fontsconf_file -l 51-suse-liberation2-hinting.conf
%files_fontsconf_file -l 51-suse-liberation2-hintstyle.conf
%endif
%changelog