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
28 Fontconfig is designed to locate fonts within the
29 system and select them according to requirements specified by
33 Summary: Font configuration and customization library
34 Group: Graphics & UI Framework/Fonts
35 Requires: %{name} = %{version}
36 Requires: fontconfig = %{version}
37 Requires: freetype-devel >= %{freetype_version}
41 The fontconfig-devel package includes the header files,
42 and developer docs for the fontconfig package.
44 Install fontconfig-devel if you want to develop programs which
52 # We don't want to rebuild the docs, but we want to install the included ones.
55 %reconfigure --disable-static \
56 --with-expat=%{_prefix} \
57 --with-expat-include=%{_includedir} \
58 --with-expat-lib=%{_libdir} \
59 --with-freetype-config=%{TZ_SYS_BIN}/freetype-config \
60 --with-add-fonts=%{TZ_SYS_RO_SHARE}/fonts,%{TZ_SYS_RO_SHARE}/app_fonts,%{TZ_SYS_RO_SHARE}/fallback_fonts,%{TZ_SYS_SHARE}/fonts \
61 --with-cache-dir=%{TZ_SYS_VAR}/cache/fontconfig \
62 --with-baseconfigdir=%{TZ_SYS_RO_ETC}/fonts \
63 --with-configdir=%{TZ_SYS_RO_ETC}/fonts/conf.d \
64 --with-templatedir=%{TZ_SYS_RO_ETC}/fonts/conf.avail \
65 --with-xmldir=%{TZ_SYS_RO_ETC}/fonts \
76 mkdir -p %{buildroot}%{_tmpfilesdir}
77 install -m 0644 %SOURCE100 %{buildroot}%{_tmpfilesdir}/fontconfig.conf
79 # All font packages depend on this package, so we create
80 # and own /usr/share/fonts
81 mydir=$RPM_BUILD_ROOT%{TZ_SYS_RO_SHARE}/fonts
82 mkdir -p $RPM_BUILD_ROOT%{TZ_SYS_RO_SHARE}/fonts
84 # Remove unpackaged files. no need when configure --disable-static
85 #rm $RPM_BUILD_ROOT%{_libdir}/*.la
86 #rm $RPM_BUILD_ROOT%{_libdir}/*.a
93 mkdir -p %{TZ_SYS_RO_SHARE}/fonts
94 chmod 755 %{TZ_SYS_RO_SHARE}/fonts
95 chsmack -t %{TZ_SYS_RO_SHARE}/fonts
96 chsmack -a User::App::Shared %{TZ_SYS_RO_SHARE}/fonts
98 mkdir -p %{TZ_SYS_RO_SHARE}/fallback_fonts
99 chmod 755 %{TZ_SYS_RO_SHARE}/fallback_fonts
100 chsmack -t %{TZ_SYS_RO_SHARE}/fallback_fonts
101 chsmack -a User::App::Shared %{TZ_SYS_RO_SHARE}/fallback_fonts
103 mkdir -p %{TZ_SYS_RO_SHARE}/app_fonts
104 chmod 755 %{TZ_SYS_RO_SHARE}/app_fonts
105 chsmack -t %{TZ_SYS_RO_SHARE}/app_fonts
106 chsmack -a User::App::Shared %{TZ_SYS_RO_SHARE}/app_fonts
108 mkdir -p %{TZ_SYS_VAR}/cache/fontconfig
109 chown root:root %{TZ_SYS_VAR}/cache/fontconfig
110 chmod 755 %{TZ_SYS_VAR}/cache/fontconfig
111 chsmack -t %{TZ_SYS_VAR}/cache/fontconfig
112 chsmack -a User::App::Shared %{TZ_SYS_VAR}/cache/fontconfig
114 mkdir -p %{TZ_SYS_SHARE}/fonts
115 chown app_fw:users %{TZ_SYS_SHARE}/fonts
116 chmod 755 %{TZ_SYS_SHARE}/fonts
117 chsmack -t %{TZ_SYS_SHARE}/fonts
118 chsmack -a User::App::Shared %{TZ_SYS_SHARE}/fonts
120 # Skip making fontconfig cache folder for users. (/opt/home/app/.cache)
121 # The path will be changed according to a name of user.
122 #rm -rf %{TZ_USER_CACHE}/fontconfig
123 #mkdir -p %{TZ_USER_CACHE}/fontconfig
124 #chmod 755 %{TZ_USER_CACHE}
125 #chown app:app %{TZ_USER_CACHE}
126 #chsmack -t %{TZ_USER_CACHE}
127 #chsmack -a System::Shared %{TZ_USER_CACHE}
128 #chmod 755 %{TZ_USER_CACHE}/fontconfig
129 #chown app:app %{TZ_USER_CACHE}/fontconfig
130 #chsmack -t %{TZ_USER_CACHE}/fontconfig
131 #chsmack -a System::Shared %{TZ_USER_CACHE}/fontconfig
133 # remove 49-sansserif.conf to fix bmc #9024
134 #rm -rf /usr/%{_sysconfdir}/fonts/conf.d/49-sansserif.conf
136 # Force regeneration of all fontconfig cache files
137 # The check for existance is needed on dual-arch installs (the second
138 # copy of fontconfig might install the binary instead of the first)
139 # The HOME setting is to avoid problems if HOME hasn't been reset
140 #if [ -x %{TZ_SYS_BIN}/fc-cache ] && %{TZ_SYS_BIN}/fc-cache --version 2>&1 | grep -q %{version} ; then
141 #fc-cache -rf --system-only
144 %postun -p /sbin/ldconfig
147 %manifest fontconfig.manifest
148 %defattr(-,root,root,-)
149 %defattr(-, root, root)
150 %doc README AUTHORS COPYING
151 %{_libdir}/libfontconfig.so.*
153 %{TZ_SYS_RO_ETC}/fonts/*
154 %dir %{TZ_SYS_RO_ETC}/fonts/conf.avail
155 %dir %{TZ_SYS_RO_SHARE}/fonts
156 %{TZ_SYS_RO_SHARE}/gettext/its/fontconfig*
157 %{TZ_SYS_RO_SHARE}/locale/*/*/fontconfig*
158 %doc %{TZ_SYS_RO_ETC}/fonts/conf.d/README
159 %config %{TZ_SYS_RO_ETC}/fonts/conf.avail/*.conf
160 %config(noreplace) %{TZ_SYS_RO_ETC}/fonts/conf.d/*.conf
161 %{_tmpfilesdir}/fontconfig.conf
165 %manifest fontconfig.manifest
166 %defattr(-,root,root,-)
167 %defattr(-, root, root)
168 %{_libdir}/libfontconfig.so
169 %{_libdir}/pkgconfig/*
170 %{_includedir}/fontconfig