1 %global freetype_version 2.5.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: pkgconfig(libtzplatform-config)
21 Requires(pre): %{TZ_SYS_BIN}/fc-cache, %{TZ_SYS_BIN}/mkdir %{TZ_SYS_BIN}/rm, %{TZ_SYS_BIN}/grep, %{TZ_SYS_BIN}/chsmack
22 Requires(post): /sbin/ldconfig
23 Requires(postun): /sbin/ldconfig
26 Fontconfig is designed to locate fonts within the
27 system and select them according to requirements specified by
31 Summary: Font configuration and customization library
32 Group: Graphics & UI Framework/Fonts
33 Requires: %{name} = %{version}
34 Requires: fontconfig = %{version}
35 Requires: freetype-devel >= %{freetype_version}
39 The fontconfig-devel package includes the header files,
40 and developer docs for the fontconfig package.
42 Install fontconfig-devel if you want to develop programs which
50 # We don't want to rebuild the docs, but we want to install the included ones.
53 %reconfigure --disable-static \
54 --with-expat=%{_prefix} \
55 --with-expat-include=%{_includedir} \
56 --with-expat-lib=%{_libdir} \
57 --with-freetype-config=%{TZ_SYS_BIN}/freetype-config \
58 --with-add-fonts=%{TZ_SYS_RO_SHARE}/fonts,%{TZ_SYS_RO_SHARE}/app_fonts,%{TZ_SYS_RO_SHARE}/fallback_fonts \
59 --with-cache-dir=%{TZ_SYS_VAR}/cache/fontconfig \
60 --with-baseconfigdir=%{TZ_SYS_RO_ETC}/fonts \
61 --with-configdir=%{TZ_SYS_RO_ETC}/fonts/conf.d \
62 --with-templatedir=%{TZ_SYS_RO_ETC}/fonts/conf.avail \
63 --with-xmldir=%{TZ_SYS_RO_ETC}/fonts \
74 mkdir -p %{buildroot}%{_tmpfilesdir}
75 install -m 0644 %SOURCE100 %{buildroot}%{_tmpfilesdir}/fontconfig.conf
77 # All font packages depend on this package, so we create
78 # and own /usr/share/fonts
79 mydir=$RPM_BUILD_ROOT%{TZ_SYS_RO_SHARE}/fonts
80 mkdir -p $RPM_BUILD_ROOT%{TZ_SYS_RO_SHARE}/fonts
81 mkdir -p %{buildroot}%{TZ_SYS_RO_SHARE}/license
82 cat COPYING > %{buildroot}%{TZ_SYS_RO_SHARE}/license/%{name}
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 mkdir -p %{TZ_SYS_RO_SHARE}/fallback_fonts
95 mkdir -p %{TZ_SYS_RO_SHARE}/app_fonts
97 # Skip making fontconfig cache folder for users. (/opt/home/app/.cache)
98 # The path will be changed according to a name of user.
99 #rm -rf %{TZ_USER_CACHE}/fontconfig
100 #mkdir -p %{TZ_USER_CACHE}/fontconfig
101 #chmod 755 %{TZ_USER_CACHE}
102 #chown app:app %{TZ_USER_CACHE}
103 #chsmack -t %{TZ_USER_CACHE}
104 #chsmack -a System::Shared %{TZ_USER_CACHE}
105 #chmod 755 %{TZ_USER_CACHE}/fontconfig
106 #chown app:app %{TZ_USER_CACHE}/fontconfig
107 #chsmack -t %{TZ_USER_CACHE}/fontconfig
108 #chsmack -a System::Shared %{TZ_USER_CACHE}/fontconfig
110 # remove 49-sansserif.conf to fix bmc #9024
111 #rm -rf /usr/%{_sysconfdir}/fonts/conf.d/49-sansserif.conf
113 # Force regeneration of all fontconfig cache files
114 # The check for existance is needed on dual-arch installs (the second
115 # copy of fontconfig might install the binary instead of the first)
116 # The HOME setting is to avoid problems if HOME hasn't been reset
117 if [ -x %{TZ_SYS_BIN}/fc-cache ] && %{TZ_SYS_BIN}/fc-cache --version 2>&1 | grep -q %{version} ; then
118 fc-cache -rf --system-only
121 %postun -p /sbin/ldconfig
124 %manifest fontconfig.manifest
125 %defattr(-,root,root,-)
126 %defattr(-, root, root)
127 %doc README AUTHORS COPYING
128 %{_libdir}/libfontconfig.so.*
130 %{TZ_SYS_RO_ETC}/fonts/*
131 %dir %{TZ_SYS_RO_ETC}/fonts/conf.avail
132 %dir %{TZ_SYS_RO_SHARE}/fonts
133 %doc %{TZ_SYS_RO_ETC}/fonts/conf.d/README
134 %config %{TZ_SYS_RO_ETC}/fonts/conf.avail/*.conf
135 %config(noreplace) %{TZ_SYS_RO_ETC}/fonts/conf.d/*.conf
136 %{TZ_SYS_RO_SHARE}/license/%{name}
137 %{_tmpfilesdir}/fontconfig.conf
140 %manifest fontconfig.manifest
141 %defattr(-,root,root,-)
142 %defattr(-, root, root)
143 %{_libdir}/libfontconfig.so
144 %{_libdir}/pkgconfig/*
145 %{_includedir}/fontconfig