%global fontname d-din %global fontconf 64-%{fontname} Name: %{fontname}-fonts Version: 1.0 Release: 0%{?dist}.2 Summary: Datto D-DIN fonts # Only the metainfo files are CC-BY-SA License: OFL and CC-BY-SA URL: https://www.datto.com/fonts/d-din Source0: %{url}/D-DIN_complete-v%{version}.zip Source1: %{fontconf}-fontconfig.conf Source2: %{fontconf}-condensed-fontconfig.conf Source3: %{fontconf}-exp-fontconfig.conf Source4: %{fontname}.metainfo.xml Source5: %{fontname}-condensed.metainfo.xml Source6: %{fontname}-exp.metainfo.xml BuildArch: noarch BuildRequires: %{_bindir}/appstream-util BuildRequires: fontpackages-devel Requires: fontpackages-filesystem %description D-DIN is a sans-serif typeface family derived from German DIN (Deutsches Institut für Normung / German Institute for Standardization) font style. This font was commissioned by Datto, Inc from Monotype and is used for the company's primary corporate typography. %package -n %{fontname}-condensed-fonts Summary: Datto D-DIN condensed fonts Requires: fontpackages-filesystem %description -n %{fontname}-condensed-fonts Datto D-DIN condensed fonts. %package -n %{fontname}-exp-fonts Summary: Datto D-DIN expanded fonts Requires: fontpackages-filesystem %description -n %{fontname}-exp-fonts Datto D-DIN exp fonts. %prep %autosetup -c %build # Nothing to build %install # Install fonts install -m 0755 -d %{buildroot}%{_fontdir} install -m 0644 -p *.otf %{buildroot}%{_fontdir} # Install fontconfig data install -m 0755 -d %{buildroot}%{_fontconfig_templatedir} \ %{buildroot}%{_fontconfig_confdir} install -m 0644 -p %{SOURCE1} \ %{buildroot}%{_fontconfig_templatedir}/%{fontconf}.conf install -m 0644 -p %{SOURCE2} \ %{buildroot}%{_fontconfig_templatedir}/%{fontconf}-condensed.conf install -m 0644 -p %{SOURCE3} \ %{buildroot}%{_fontconfig_templatedir}/%{fontconf}-exp.conf for fconf in %{fontconf}.conf %{fontconf}-condensed.conf %{fontconf}-exp.conf; do ln -s %{_fontconfig_templatedir}/$fconf %{buildroot}%{_fontconfig_confdir}/$fconf done # Install AppStream metadata install -m 0755 -d %{buildroot}%{_datadir}/metainfo install -m 0644 -p %{SOURCE4} %{SOURCE5} %{SOURCE6} %{buildroot}%{_datadir}/metainfo %check # Validate AppStream metadata appstream-util validate-relax --nonet %{buildroot}%{_datadir}/metainfo/*.metainfo.xml %_font_pkg -f %{fontconf}.conf D-DIN.otf D-DIN-*.otf %license COPYING.txt %doc README FONTLOG.txt %{_datadir}/metainfo/%{fontname}.metainfo.xml %_font_pkg -n condensed -f %{fontconf}-condensed.conf D-DINCondensed*.otf %license COPYING.txt %doc README FONTLOG.txt %{_datadir}/metainfo/%{fontname}-condensed.metainfo.xml %_font_pkg -n exp -f %{fontconf}-exp.conf D-DINExp*.otf %license COPYING.txt %doc README FONTLOG.txt %{_datadir}/metainfo/%{fontname}-exp.metainfo.xml %changelog * Sun Nov 5 2017 Neal Gompa - 1.0-0.2 - Add fontpackages-filesystem Requires to all subpackages - Update the summary and description to indicate exp means expanded * Sun Nov 5 2017 Neal Gompa - 1.0-0.1 - Initial packaging