1 %global freetype_version 2.9.0
4 Summary: Font configuration and customization library
7 Group: Graphics & UI Framework/Fonts
9 URL: http://fontconfig.org
10 Source0: http://fontconfig.org/release/fontconfig-%{version}.tar.gz
11 Source100: fontconfig.conf
12 Source1001: fontconfig.manifest
13 BuildRequires: pkgconfig(freetype2) >= %{freetype_version}
15 BuildRequires: expat-devel
19 BuildRequires: systemd-devel
20 BuildRequires: gettext-tools
21 BuildRequires: libuuid-devel
22 BuildRequires: pkgconfig(libtzplatform-config)
23 Requires(pre): %{TZ_SYS_BIN}/fc-cache, %{TZ_SYS_BIN}/mkdir %{TZ_SYS_BIN}/rm, %{TZ_SYS_BIN}/grep, %{TZ_SYS_BIN}/chsmack
24 Requires(post): /sbin/ldconfig
25 Requires(postun): /sbin/ldconfig
26 Requires: security-config
29 Fontconfig is designed to locate fonts within the
30 system and select them according to requirements specified by
34 Summary: Font configuration and customization library
35 Group: Graphics & UI Framework/Fonts
36 Requires: %{name} = %{version}
37 Requires: fontconfig = %{version}
38 Requires: freetype-devel >= %{freetype_version}
42 The fontconfig-devel package includes the header files,
43 and developer docs for the fontconfig package.
45 Install fontconfig-devel if you want to develop programs which
53 # We don't want to rebuild the docs, but we want to install the included ones.
56 %if "%{?profile}" != "tv"
57 %reconfigure --disable-static \
58 --with-expat=%{_prefix} \
59 --with-expat-include=%{_includedir} \
60 --with-expat-lib=%{_libdir} \
61 --with-freetype-config=%{TZ_SYS_BIN}/freetype-config \
62 --with-add-fonts=%{TZ_SYS_RO_SHARE}/fonts,%{TZ_SYS_RO_SHARE}/app_fonts,%{TZ_SYS_RO_SHARE}/fallback_fonts,%{TZ_SYS_SHARE}/fonts \
63 --with-cache-dir=%{TZ_SYS_VAR}/cache/fontconfig \
64 --with-baseconfigdir=%{TZ_SYS_RO_ETC}/fonts \
65 --with-configdir=%{TZ_SYS_RO_ETC}/fonts/conf.d \
66 --with-templatedir=%{TZ_SYS_RO_ETC}/fonts/conf.avail \
67 --with-xmldir=%{TZ_SYS_RO_ETC}/fonts \
70 %reconfigure --disable-static \
71 --with-expat=%{_prefix} \
72 --with-expat-include=%{_includedir} \
73 --with-expat-lib=%{_libdir} \
74 --with-freetype-config=%{TZ_SYS_BIN}/freetype-config \
75 --with-add-fonts=%{TZ_SYS_RO_SHARE}/fonts \
76 --with-cache-dir=%{TZ_SYS_VAR}/cache/fontconfig \
77 --with-baseconfigdir=%{TZ_SYS_RO_ETC}/fonts \
78 --with-configdir=%{TZ_SYS_RO_ETC}/fonts/conf.d \
79 --with-templatedir=%{TZ_SYS_RO_ETC}/fonts/conf.avail \
80 --with-xmldir=%{TZ_SYS_RO_ETC}/fonts \
92 mkdir -p %{buildroot}%{_tmpfilesdir}
93 install -m 0644 %SOURCE100 %{buildroot}%{_tmpfilesdir}/fontconfig.conf
95 # All font packages depend on this package, so we create
96 # and own /usr/share/fonts
97 mydir=$RPM_BUILD_ROOT%{TZ_SYS_RO_SHARE}/fonts
98 mkdir -p $RPM_BUILD_ROOT%{TZ_SYS_RO_SHARE}/fonts
100 # Remove unpackaged files. no need when configure --disable-static
101 #rm $RPM_BUILD_ROOT%{_libdir}/*.la
102 #rm $RPM_BUILD_ROOT%{_libdir}/*.a
109 mkdir -p %{TZ_SYS_RO_SHARE}/fonts
110 chmod 755 %{TZ_SYS_RO_SHARE}/fonts
111 chsmack -t %{TZ_SYS_RO_SHARE}/fonts
112 chsmack -a User::App::Shared %{TZ_SYS_RO_SHARE}/fonts
114 mkdir -p %{TZ_SYS_RO_SHARE}/fallback_fonts
115 chmod 755 %{TZ_SYS_RO_SHARE}/fallback_fonts
116 chsmack -t %{TZ_SYS_RO_SHARE}/fallback_fonts
117 chsmack -a User::App::Shared %{TZ_SYS_RO_SHARE}/fallback_fonts
119 mkdir -p %{TZ_SYS_RO_SHARE}/app_fonts
120 chmod 755 %{TZ_SYS_RO_SHARE}/app_fonts
121 chsmack -t %{TZ_SYS_RO_SHARE}/app_fonts
122 chsmack -a User::App::Shared %{TZ_SYS_RO_SHARE}/app_fonts
124 mkdir -p %{TZ_SYS_VAR}/cache/fontconfig
125 chown root:root %{TZ_SYS_VAR}/cache/fontconfig
126 chmod 755 %{TZ_SYS_VAR}/cache/fontconfig
127 chsmack -t %{TZ_SYS_VAR}/cache/fontconfig
128 chsmack -a User::App::Shared %{TZ_SYS_VAR}/cache/fontconfig
130 mkdir -p %{TZ_SYS_SHARE}/fonts
131 chown app_fw:users %{TZ_SYS_SHARE}/fonts
132 chmod 755 %{TZ_SYS_SHARE}/fonts
133 chsmack -t %{TZ_SYS_SHARE}/fonts
134 chsmack -a User::App::Shared %{TZ_SYS_SHARE}/fonts
136 # Skip making fontconfig cache folder for users. (/opt/home/app/.cache)
137 # The path will be changed according to a name of user.
138 #rm -rf %{TZ_USER_CACHE}/fontconfig
139 #mkdir -p %{TZ_USER_CACHE}/fontconfig
140 #chmod 755 %{TZ_USER_CACHE}
141 #chown app:app %{TZ_USER_CACHE}
142 #chsmack -t %{TZ_USER_CACHE}
143 #chsmack -a System::Shared %{TZ_USER_CACHE}
144 #chmod 755 %{TZ_USER_CACHE}/fontconfig
145 #chown app:app %{TZ_USER_CACHE}/fontconfig
146 #chsmack -t %{TZ_USER_CACHE}/fontconfig
147 #chsmack -a System::Shared %{TZ_USER_CACHE}/fontconfig
149 # remove 49-sansserif.conf to fix bmc #9024
150 #rm -rf /usr/%{_sysconfdir}/fonts/conf.d/49-sansserif.conf
152 # Force regeneration of all fontconfig cache files
153 # The check for existance is needed on dual-arch installs (the second
154 # copy of fontconfig might install the binary instead of the first)
155 # The HOME setting is to avoid problems if HOME hasn't been reset
156 #if [ -x %{TZ_SYS_BIN}/fc-cache ] && %{TZ_SYS_BIN}/fc-cache --version 2>&1 | grep -q %{version} ; then
157 #fc-cache -rf --system-only
160 %postun -p /sbin/ldconfig
163 %manifest fontconfig.manifest
164 %defattr(-,root,root,-)
165 %defattr(-, root, root)
166 %doc README AUTHORS COPYING
167 %{_libdir}/libfontconfig.so.*
169 %{TZ_SYS_RO_ETC}/fonts/*
170 %dir %{TZ_SYS_RO_ETC}/fonts/conf.avail
171 %dir %{TZ_SYS_RO_SHARE}/fonts
172 %{TZ_SYS_RO_SHARE}/gettext/its/fontconfig*
173 %{TZ_SYS_RO_SHARE}/locale/*/*/fontconfig*
174 %doc %{TZ_SYS_RO_ETC}/fonts/conf.d/README
175 %config %{TZ_SYS_RO_ETC}/fonts/conf.avail/*.conf
176 %config(noreplace) %{TZ_SYS_RO_ETC}/fonts/conf.d/*.conf
177 %{_tmpfilesdir}/fontconfig.conf
181 %manifest fontconfig.manifest
182 %defattr(-,root,root,-)
183 %defattr(-, root, root)
184 %{_libdir}/libfontconfig.so
185 %{_libdir}/pkgconfig/*
186 %{_includedir}/fontconfig