File fontconfig-infinality.spec of Package fontconfig-infinality

#
# spec file for package fontconfig-infinality
#
# Copyright (c) 2013 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/
#


%define fontconfdir %{_sysconfdir}/fonts

Name:           fontconfig-infinality
Url:            http://www.infinality.net/blog/infinality-freetype-patches/
Version:        20130104
Release:        0
%define srcver  1-%{version}_1
Summary:        Infinality Fontconfig Files 
License:        MIT
Group:          System/X11/Fonts
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Source0:        %{name}-%{srcver}.tar.bz2
# to be removed with next release
Source1:        LICENSE
Requires:       fontconfig
BuildArch:      noarch

%description
fontconfig configuration files are intended to be used in conjunction
with the infinality improvements of freetype2 (subpixel hinting). 

%prep
%setup -q -c

%build
mv infinality/README infinality/CHANGELOG* infinality/infctl.sh .
cp -a %{SOURCE1} .

%install
mkdir -p %{buildroot}%{fontconfdir}
cp -ar conf.avail conf.d infinality %{buildroot}%{fontconfdir}
mkdir -p %{buildroot}%{_bindir}
install -m 755 infctl.sh %{buildroot}%{_bindir}/infinality-ctl.sh
ln -s ./infinality-ctl.sh %{buildroot}%{_bindir}/infinality-ctl

%post 
%{_bindir}/infinality-ctl setstyle linux

%files
%defattr(-,root,root)
%doc LICENSE README CHANGELOG*
%config %dir %{fontconfdir}
%config %dir %{fontconfdir}/conf.avail
%config %dir %{fontconfdir}/conf.d
%config %{fontconfdir}/conf.avail/*.conf
%config %{fontconfdir}/conf.d/*.conf
%config %{fontconfdir}/infinality
%{_bindir}/infinality*

%changelog