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 Source1001: packaging/fontconfig.manifest
12 BuildRequires: pkgconfig(freetype2) >= %{freetype_version}
14 BuildRequires: expat-devel
18 BuildRequires: pkgconfig(libtzplatform-config)
19 Requires(pre): %{TZ_SYS_BIN}/fc-cache, %{TZ_SYS_BIN}/mkdir %{TZ_SYS_BIN}/rm, %{TZ_SYS_BIN}/grep, %{TZ_SYS_BIN}/chsmack
20 Requires(post): /sbin/ldconfig
21 Requires(postun): /sbin/ldconfig
24 Fontconfig is designed to locate fonts within the
25 system and select them according to requirements specified by
29 Summary: Font configuration and customization library
30 Group: Graphics & UI Framework/Fonts
31 Requires: %{name} = %{version}
32 Requires: fontconfig = %{version}
33 Requires: freetype-devel >= %{freetype_version}
37 The fontconfig-devel package includes the header files,
38 and developer docs for the fontconfig package.
40 Install fontconfig-devel if you want to develop programs which
48 # We don't want to rebuild the docs, but we want to install the included ones.
51 %reconfigure --disable-static \
52 --with-expat=%{_prefix} \
53 --with-expat-include=%{_includedir} \
54 --with-expat-lib=%{_libdir} \
55 --with-freetype-config=%{TZ_SYS_BIN}/freetype-config \
56 --with-add-fonts=%{TZ_SYS_RO_SHARE}/fonts,%{TZ_SYS_RO_SHARE}/app_fonts,%{TZ_SYS_RO_SHARE}/fallback_fonts \
57 --with-cache-dir=%{TZ_SYS_VAR}/cache/fontconfig \
58 --with-baseconfigdir=%{TZ_SYS_RO_ETC}/fonts \
59 --with-configdir=%{TZ_SYS_RO_ETC}/fonts/conf.d \
60 --with-templatedir=%{TZ_SYS_RO_ETC}/fonts/conf.avail \
61 --with-xmldir=%{TZ_SYS_RO_ETC}/fonts \
72 # All font packages depend on this package, so we create
73 # and own /usr/share/fonts
74 mydir=$RPM_BUILD_ROOT%{TZ_SYS_RO_SHARE}/fonts
75 mkdir -p $RPM_BUILD_ROOT%{TZ_SYS_RO_SHARE}/fonts
76 mkdir -p %{buildroot}%{TZ_SYS_RO_SHARE}/license
77 cat COPYING > %{buildroot}%{TZ_SYS_RO_SHARE}/license/%{name}
79 # Remove unpackaged files. no need when configure --disable-static
80 #rm $RPM_BUILD_ROOT%{_libdir}/*.la
81 #rm $RPM_BUILD_ROOT%{_libdir}/*.a
88 mkdir -p %{TZ_SYS_VAR}/cache/fontconfig
90 rm -f %{TZ_SYS_VAR}/cache/fontconfig/*
91 mkdir -p %{TZ_SYS_VAR}/cache/fontconfig
92 mkdir -p %{TZ_SYS_RO_SHARE}/fonts
93 mkdir -p %{TZ_SYS_RO_SHARE}/fallback_fonts
94 mkdir -p %{TZ_SYS_RO_SHARE}/app_fonts
95 chsmack -t %{TZ_SYS_VAR}/cache/fontconfig
96 chsmack -a System::Shared %{TZ_SYS_VAR}/cache/fontconfig
97 rm -rf %{TZ_USER_CACHE}/fontconfig
98 mkdir -p %{TZ_USER_CACHE}/fontconfig
99 chmod 755 %{TZ_USER_CACHE}
100 chown app:app %{TZ_USER_CACHE}
101 chsmack -t %{TZ_USER_CACHE}
102 chsmack -a System::Shared %{TZ_USER_CACHE}
103 chmod 755 %{TZ_USER_CACHE}/fontconfig
104 chown app:app %{TZ_USER_CACHE}/fontconfig
105 chsmack -t %{TZ_USER_CACHE}/fontconfig
106 chsmack -a System::Shared %{TZ_USER_CACHE}/fontconfig
108 # remove 49-sansserif.conf to fix bmc #9024
109 #rm -rf /usr/%{_sysconfdir}/fonts/conf.d/49-sansserif.conf
111 # Force regeneration of all fontconfig cache files
112 # The check for existance is needed on dual-arch installs (the second
113 # copy of fontconfig might install the binary instead of the first)
114 # The HOME setting is to avoid problems if HOME hasn't been reset
115 if [ -x %{TZ_SYS_BIN}/fc-cache ] && %{TZ_SYS_BIN}/fc-cache --version 2>&1 | grep -q %{version} ; then
116 fc-cache -rf --system-only
119 %postun -p /sbin/ldconfig
122 %manifest fontconfig.manifest
123 %defattr(-,root,root,-)
124 %defattr(-, root, root)
125 %doc README AUTHORS COPYING
126 %{_libdir}/libfontconfig.so.*
128 %{TZ_SYS_RO_ETC}/fonts/*
129 %dir %{TZ_SYS_RO_ETC}/fonts/conf.avail
130 %dir %{TZ_SYS_RO_SHARE}/fonts
131 %doc %{TZ_SYS_RO_ETC}/fonts/conf.d/README
132 %config %{TZ_SYS_RO_ETC}/fonts/conf.avail/*.conf
133 %config(noreplace) %{TZ_SYS_RO_ETC}/fonts/conf.d/*.conf
134 %dir %{TZ_SYS_VAR}/cache/fontconfig
135 %{TZ_SYS_RO_SHARE}/license/%{name}
138 %manifest fontconfig.manifest
139 %defattr(-,root,root,-)
140 %defattr(-, root, root)
141 %{_libdir}/libfontconfig.so
142 %{_libdir}/pkgconfig/*
143 %{_includedir}/fontconfig