Add packaging
[platform/upstream/monotype-fonts.git] / packaging / monotype-fonts.spec
1 %define _fontsdir               %{_datadir}/fonts
2 %define _ttfontsdir             %{_fontsdir}/truetype
3 %define _miscfontsdir           %{_fontsdir}/misc
4 %define _fontsconfdir           %{_sysconfdir}/fonts
5 %define _fontsconfddir          %{_fontsconfdir}/conf.d
6 %define _fontsconfavaildir      %{_datadir}/%{name}/conf.avail
7
8 Name:           monotype-fonts
9 Version:        0.0.1
10 Release:        0
11 License:        Intel Proprietary
12 Summary:        Fonts package that provides the Clear Sans font
13 Url:            http://www.intel.com/
14 Group:          System/Fonts
15 Source:         %{name}-%{version}.tar.xz
16 BuildArch:      noarch
17 Requires(post): %{_bindir}/fc-cache
18
19 %description
20 Fonts package that provides the Clear Sans font
21
22 %prep
23 %setup -q
24
25 %build
26
27 %install
28 mkdir -p %{buildroot}%{_ttfontsdir}
29 install -m 0644 ttf/*.ttf %{buildroot}%{_ttfontsdir}/
30
31 %post
32 if [ -x %{_bindir}/fc-cache ]; then
33     %{_bindir}/fc-cache %{_ttffontsdir} || :
34 fi
35
36 %postun
37 if [ -x %{_bindir}/fc-cache ]; then
38     %{_bindir}/fc-cache %{_ttffontsdir} || :
39 fi
40
41 %files
42 %{_ttfontsdir}/*.ttf