File sourcecodepro-fonts.spec of Package sourcecodepro-fonts
%define realname source-code-pro
%define srcext tar.bz2
# Common info
Name: sourcecodepro-fonts
Version: 0
Release: %{?extraver:0.}1%{?dist}
License: OFL-1.1
Group: System/X11/Fonts
URL: https://github.com/adobe-fonts/source-code-pro/
Summary: Monospaced font family for user interface and coding environments
# Build-time parameters
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-root
Source: %{realname}-%{version}%{?extraver}.%{srcext}
%description
Source Code Pro is a set of OpenType fonts that have been designed to work well
in user interface (UI) environments. In addition to a functional OpenType font,
this open source project provides all of the source files that were used to
build this OpenType font by using the AFDKO makeotf tool.
%package -n sourcecodepro-ttf-fonts
Group: System/X11/Fonts
Summary: Monospaced font family for user interface and coding environments (TTF)
Conflicts: adobe-sourcecodepro-fonts
%description -n sourcecodepro-ttf-fonts
Source Code Pro is a set of OpenType fonts that have been designed to work well
in user interface (UI) environments. In addition to a functional OpenType font,
this open source project provides all of the source files that were used to
build this OpenType font by using the AFDKO makeotf tool.
This package contains font in TTF format.
%package -n sourcecodepro-otf-fonts
Group: System/X11/Fonts
Summary: Monospaced font family for user interface and coding environments (OTF)
Conflicts: adobe-sourcecodepro-fonts
%description -n sourcecodepro-otf-fonts
Source Code Pro is a set of OpenType fonts that have been designed to work well
in user interface (UI) environments. In addition to a functional OpenType font,
this open source project provides all of the source files that were used to
build this OpenType font by using the AFDKO makeotf tool.
This package contains font in OTF format.
# Preparation step (unpackung and patching if necessary)
%prep
%setup -q -n %{realname}-%{version}%{?extraver}
%build
%install
%{__chmod} a-x LICENSE.md README.md
%{__install} -d -m755 %{buildroot}%{_datadir}/fonts/truetype/
%{__install} -m644 TTF/*.ttf %{buildroot}%{_datadir}/fonts/truetype/
%{__install} -m644 OTF/*.otf %{buildroot}%{_datadir}/fonts/truetype/
%{__install} -m644 VAR/*.?tf %{buildroot}%{_datadir}/fonts/truetype/
%clean
[ "%{buildroot}" != "/" ] && %{__rm} -rf %{buildroot}
%files -n sourcecodepro-ttf-fonts
%defattr(-,root,root)
%doc LICENSE.md README.md
%dir %{_datadir}/fonts/truetype/
%{_datadir}/fonts/truetype/*.ttf
%files -n sourcecodepro-otf-fonts
%defattr(-,root,root)
%doc LICENSE.md README.md
%dir %{_datadir}/fonts/truetype/
%{_datadir}/fonts/truetype/*.otf
%post -n sourcecodepro-ttf-fonts
if [ -x /usr/bin/fc-cache ]
then
/usr/bin/fc-cache || :
fi
%postun -n sourcecodepro-ttf-fonts
if [ $1 -eq 0 -a -x /usr/bin/fc-cache ]
then
/usr/bin/fc-cache || :
fi
%post -n sourcecodepro-otf-fonts
if [ -x /usr/bin/fc-cache ]
then
/usr/bin/fc-cache || :
fi
%postun -n sourcecodepro-otf-fonts
if [ $1 -eq 0 -a -x /usr/bin/fc-cache ]
then
/usr/bin/fc-cache || :
fi
%changelog