Blob Blame Raw
%global fontname d-din
%global fontconf 64-%{fontname}
%global asfontname com.datto.%{fontname}

%global desc \
D-DIN is a sans-serif typeface family derived from German DIN \
(Deutsches Institut fuer 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.

Name:           %{fontname}-fonts
Version:        1.0
Release:        5%{?dist}
Summary:        Datto D-DIN fonts
# Only the metainfo files are CC-BY-SA
License:        OFL and CC-BY-SA

Source0:        %{url}/D-DIN_complete-v%{version}.zip
Source1:        %{fontconf}-fontconfig.conf
Source2:        %{fontconf}-condensed-fontconfig.conf
Source3:        %{fontconf}-exp-fontconfig.conf

BuildArch:      noarch
BuildRequires:  %{_bindir}/appstream-util
BuildRequires:  fontpackages-devel
Requires:       fontpackages-filesystem

# Eliminate nonsense Provides from fc-query (rhbz#1509790)
%global __provides_exclude ^0$

%description %{desc}

%package -n %{fontname}-condensed-fonts
Summary:        Datto D-DIN condensed fonts
Requires:       fontpackages-filesystem

%description -n %{fontname}-condensed-fonts %{desc}

This package provides the condensed fonts variant.

%package -n %{fontname}-exp-fonts
Summary:        Datto D-DIN expanded fonts
Requires:       fontpackages-filesystem

%description -n %{fontname}-exp-fonts %{desc}

This package provides the expanded fonts variant.

%autosetup -c

# Nothing to build


# 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} \

install -m 0644 -p %{SOURCE1} \

install -m 0644 -p %{SOURCE2} \

install -m 0644 -p %{SOURCE3} \

for fconf in %{fontconf}.conf %{fontconf}-condensed.conf %{fontconf}-exp.conf; do
  ln -s %{_fontconfig_templatedir}/$fconf %{buildroot}%{_fontconfig_confdir}/$fconf

# Install AppStream metadata
install -m 0755 -d %{buildroot}%{_datadir}/metainfo
install -m 0644 -p *.metainfo.xml %{buildroot}%{_datadir}/metainfo

# 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 OFL-1.1.txt CC-BY-SA-4.0.txt

%_font_pkg -n condensed -f %{fontconf}-condensed.conf D-DINCondensed*.otf
%license OFL-1.1.txt CC-BY-SA-4.0.txt

%_font_pkg -n exp -f %{fontconf}-exp.conf D-DINExp*.otf
%license OFL-1.1.txt CC-BY-SA-4.0.txt

* Wed Jul 24 2019 Fedora Release Engineering <> - 1.0-5
- Rebuilt for

* Thu Jan 31 2019 Fedora Release Engineering <> - 1.0-4
- Rebuilt for

* Thu Jul 12 2018 Fedora Release Engineering <> - 1.0-3
- Rebuilt for

* Wed Feb 07 2018 Fedora Release Engineering <> - 1.0-2
- Rebuilt for

* Tue Nov  7 2017 Neal Gompa <> - 1.0-1
- Initial import into Fedora (RH#1509777)

* 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