1 #sbs-git:slp/pkgs/f/fontconfig fontconfig 2.6.0 70f07428c05d43eef8009f4dfbe28723b040e865
2 %global freetype_version 2.1.4
5 Summary: Font configuration and customization library
8 Group: System/Libraries
10 URL: http://fontconfig.org
11 Source0: http://fontconfig.org/release/fontconfig-%{version}.tar.gz
12 Requires(pre): /usr/bin/fc-cache, /bin/mkdir /bin/rm, /bin/grep
13 Requires(post): /sbin/ldconfig
14 Requires(postun): /sbin/ldconfig
15 BuildRequires: pkgconfig(freetype2) >= %{freetype_version}
17 BuildRequires: expat-devel
21 Fontconfig is designed to locate fonts within the
22 system and select them according to requirements specified by
26 Summary: Font configuration and customization library
27 Group: Development/Libraries
28 Requires: %{name} = %{version}-%{release}
29 Requires: fontconfig = %{version}-%{release}
30 Requires: freetype-devel >= %{freetype_version}
34 The fontconfig-devel package includes the header files,
35 and developer docs for the fontconfig package.
37 Install fontconfig-devel if you want to develop programs which
41 %setup -q -n %{name}-%{version}
44 # We don't want to rebuild the docs, but we want to install the included ones.
47 %reconfigure --disable-static \
49 --with-expat-include=%{_includedir} \
50 --with-expat-lib=%{_libdir} \
51 --with-freetype-config=%{_bindir}/freetype-config \
52 --with-add-fonts=/opt/share/fonts,/usr/share/app_fonts,/usr/share/fallback_fonts \
53 --with-cache-dir=/var/cache/fontconfig \
54 --with-confdir=/usr/etc/fonts \
65 #install -m 0644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/fonts/conf.d
66 #install -m 0644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/fonts/conf.avail
67 #install -m 0644 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/fonts/conf.avail
68 #ln -s ../conf.avail/25-unhint-nonlatin.conf $RPM_BUILD_ROOT%{_sysconfdir}/fonts/conf.d
69 #ln -s ../conf.avail/10-autohint.conf $RPM_BUILD_ROOT%{_sysconfdir}/fonts/conf.d
70 #ln -s ../conf.avail/10-antialias.conf $RPM_BUILD_ROOT%{_sysconfdir}/fonts/conf.d
71 #ln -s ../conf.avail/10-hinted.conf $RPM_BUILD_ROOT%{_sysconfdir}/fonts/conf.d
73 # move installed doc files back to build directory to package themm
75 #mv $RPM_BUILD_ROOT%{_docdir}/fontconfig/* .
76 #rmdir $RPM_BUILD_ROOT%{_docdir}/fontconfig/
78 # All font packages depend on this package, so we create
79 # and own /usr/share/fonts
80 mkdir -p $RPM_BUILD_ROOT%{_datadir}/fonts
82 # Remove unpackaged files. no need when configure --disable-static
83 #rm $RPM_BUILD_ROOT%{_libdir}/*.la
84 #rm $RPM_BUILD_ROOT%{_libdir}/*.a
91 mkdir -p /var/cache/fontconfig
93 rm -f /var/cache/fontconfig/????????????????????????????????.cache-2
94 rm -f /var/cache/fontconfig/stamp
96 # remove 49-sansserif.conf to fix bmc #9024
97 #rm -rf /usr/%{_sysconfdir}/fonts/conf.d/49-sansserif.conf
99 # Force regeneration of all fontconfig cache files
100 # The check for existance is needed on dual-arch installs (the second
101 # copy of fontconfig might install the binary instead of the first)
102 # The HOME setting is to avoid problems if HOME hasn't been reset
103 if [ -x /usr/bin/fc-cache ] && /usr/bin/fc-cache --version 2>&1 | grep -q %{version} ; then
104 HOME=/root /usr/bin/fc-cache -f
107 %postun -p /sbin/ldconfig
110 %defattr(-,root,root,-)
111 %defattr(-, root, root)
112 %doc README AUTHORS COPYING
113 %{_libdir}/libfontconfig.so.*
115 /usr/%{_sysconfdir}/fonts/*
116 %dir /usr/%{_sysconfdir}/fonts/conf.avail
117 %dir %{_datadir}/fonts
118 %doc /usr/%{_sysconfdir}/fonts/conf.d/README
119 %config /usr/%{_sysconfdir}/fonts/conf.avail/*.conf
120 %config(noreplace) /usr/%{_sysconfdir}/fonts/conf.d/*.conf
121 %dir /var/cache/fontconfig
124 %defattr(-,root,root,-)
125 %defattr(-, root, root)
126 %{_libdir}/libfontconfig.so
127 %{_libdir}/pkgconfig/*
128 %{_includedir}/fontconfig