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