source: spec/trunk/SPECS/adobe-source-sans-pro-fonts.spec@ 1569

Last change on this file since 1569 was 1335, checked in by Silvan Scherrer, 8 years ago

spec: adobe-source-sans-pro-fonts: Release version 2.020-1.

File size: 2.8 KB
Line 
1%global fontname source-sans-pro
2%global fontconf 63-%{fontname}.conf
3
4%global roman_version 2.020
5%global italic_version 1.075
6%global github_tag %{roman_version}R-ro/%{italic_version}R-it
7%global source_dir %{fontname}-%{roman_version}R-ro-%{italic_version}R-it
8
9# OS/2 rpm macros don't define this (yet), do it manually:
10# Fontconfig directory for active configuration snippets
11%global _fontconfig_confdir %{_sysconfdir}/fonts/conf.d
12
13# Fontconfig configuration template directory
14# Templates are activated by symlinking in _fontconfig_confdir
15%global _fontconfig_templatedir %{_datadir}/fontconfig/conf.avail
16
17# Font installation directory root
18%global _fontbasedir %{_datadir}/fonts
19
20# Actual font installation directory
21%global _fontdir %{_fontbasedir}/%{?fontname:%{fontname}}%{?!fontname:%{name}}
22
23Name: adobe-source-sans-pro-fonts
24Version: %{roman_version}
25Release: 1%{?dist}
26Summary: A set of OpenType fonts designed for user interfaces
27
28License: OFL
29URL: https://github.com/adobe-fonts/source-sans-pro
30Vendor: bww bitwise works GmbH
31#unable to build from source: source format is unbuildable with free software
32Source0: https://github.com/adobe-fonts/source-sans-pro/archive/%{github_tag}/%{name}-%{version}.tar.gz
33Source1: %{name}-fontconfig.conf
34#Source2: %{fontname}.metainfo.xml
35
36#BuildRequires: fontpackages-devel
37#Requires: fontpackages-filesystem
38BuildArch: noarch
39
40
41%description
42Source Sans is a set of OpenType fonts that have been designed to work well in
43user interface (UI) environments, as well as in text setting for screen and
44print.
45
46
47%prep
48%autosetup -n %{source_dir}
49
50# Fix permissions
51chmod 0644 LICENSE.txt README.md
52
53# Fix wrong EOLs
54sed -i.orig "s/\r//" LICENSE.txt && \
55touch -r LICENSE.txt.orig LICENSE.txt && \
56rm LICENSE.txt.orig
57
58
59%build
60
61
62%install
63install -m 0755 -d %{buildroot}%{_fontdir}
64install -m 0644 -p OTF/*.otf %{buildroot}%{_fontdir}
65
66install -m 0755 -d %{buildroot}%{_fontconfig_templatedir} \
67 %{buildroot}%{_fontconfig_confdir}
68
69
70install -m 0644 -p %{SOURCE1} %{buildroot}%{_fontconfig_templatedir}/%{fontconf}
71ln -s %{_fontconfig_templatedir}/%{fontconf} %{buildroot}%{_fontconfig_confdir}/%{fontconf}
72
73# Add AppStream metadata
74#install -Dm 0644 -p %{SOURCE2} \
75# %{buildroot}%{_datadir}/appdata/%{fontname}.metainfo.xml
76
77
78%post
79if [ -x %{_bindir}/fc-cache ]; then
80 %{_bindir}/fc-cache %{_fontdir} || :
81fi
82
83
84%postun
85if [ $1 -eq 0 -a -x %{_bindir}/fc-cache ] ; then
86 %{_bindir}/fc-cache %{_fontdir} || :
87fi
88
89
90%files
91%doc README.md
92%license LICENSE.txt
93%dir %{_fontdir}
94%{_fontdir}/*.otf
95%{_fontconfig_templatedir}/%{fontconf}
96%config(noreplace) %{_fontconfig_confdir}/%{fontconf}
97#%{_datadir}/appdata/%{fontname}.metainfo.xml
98
99
100%changelog
101* Wed Mar 07 2018 Silvan Scherrer <silvan.scherrer@aroa.ch> 2.020-1
102- initial rpm version
Note: See TracBrowser for help on using the repository browser.