source: spec/trunk/SPECS/adobe-source-code-pro-fonts.spec@ 1504

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

spec: adobe-source-code-pro-fonts: Release version 2.030.1.050-1.

File size: 2.8 KB
Line 
1%global fontname adobe-source-code-pro
2%global fontconf 61-%{fontname}.conf
3
4%global version_roman 2.030
5%global version_italic 1.050
6
7# OS/2 rpm macros don't define this (yet), do it manually:
8# Fontconfig directory for active configuration snippets
9%global _fontconfig_confdir %{_sysconfdir}/fonts/conf.d
10
11# Fontconfig configuration template directory
12# Templates are activated by symlinking in _fontconfig_confdir
13%global _fontconfig_templatedir %{_datadir}/fontconfig/conf.avail
14
15# Font installation directory root
16%global _fontbasedir %{_datadir}/fonts
17
18# Actual font installation directory
19%global _fontdir %{_fontbasedir}/%{?fontname:%{fontname}}%{?!fontname:%{name}}
20
21Name: %{fontname}-fonts
22Version: %{version_roman}.%{version_italic}
23Release: 1%{?dist}
24Summary: A set of mono-spaced OpenType fonts designed for coding environments
25
26Group: User Interface/X
27License: OFL
28URL: https://github.com/adobe-fonts/source-code-pro
29Vendor: bww bitwise works GmbH
30Source0: https://github.com/adobe-fonts/source-code-pro/archive/%{version_roman}R-ro%2f%{version_italic}R-it.tar.gz#/SourceCodePro-%{version_roman}R-ro-%{version_italic}R-it.tar.gz
31Source1: %{name}-fontconfig.conf
32#Source2: %{fontname}.metainfo.xml
33
34BuildArch: noarch
35#BuildRequires: fontpackages-devel
36#Requires: fontpackages-filesystem
37
38%description
39This font was designed by Paul D. Hunt as a companion to Source Sans. It has
40the same weight range as the corresponding Source Sans design. It supports
41a wide range of languages using the Latin script, and includes all the
42characters in the Adobe Latin 4 glyph set.
43
44
45%prep
46%setup -qn source-code-pro-%{version_roman}R-ro-%{version_italic}R-it
47sed -i 's/\r//' LICENSE.txt
48chmod 644 LICENSE.txt
49
50%build
51
52%install
53install -m 0755 -d %{buildroot}%{_fontdir}
54install -m 0644 -p OTF/*.otf %{buildroot}%{_fontdir}
55
56install -m 0755 -d %{buildroot}%{_fontconfig_templatedir} \
57 %{buildroot}%{_fontconfig_confdir}
58
59
60install -m 0644 -p %{SOURCE1} %{buildroot}%{_fontconfig_templatedir}/%{fontconf}
61ln -s %{_fontconfig_templatedir}/%{fontconf} %{buildroot}%{_fontconfig_confdir}/%{fontconf}
62
63# Add AppStream metadata
64#install -Dm 0644 -p %{SOURCE2} \
65# %{buildroot}%{_datadir}/appdata/%{fontname}.metainfo.xml
66
67%post
68if [ -x %{_bindir}/fc-cache ]; then
69 %{_bindir}/fc-cache %{_fontdir} || :
70fi
71
72%postun
73if [ $1 -eq 0 -a -x %{_bindir}/fc-cache ] ; then
74 %{_bindir}/fc-cache %{_fontdir} || :
75fi
76
77%files
78%doc README.md
79%license LICENSE.txt
80%dir %{_fontdir}
81%{_fontdir}/*.otf
82%{_fontconfig_templatedir}/%{fontconf}
83%config(noreplace) %{_fontconfig_confdir}/%{fontconf}
84#%{_datadir}/appdata/%{fontname}.metainfo.xml
85
86
87%changelog
88* Wed Mar 07 2018 Silvan Scherrer <silvan.scherrer@aroa.ch> 2.030.1.050-1
89- initial rpm version
Note: See TracBrowser for help on using the repository browser.