3 %bcond_without static_libs # don't build static library
4 %bcond_without doc # don't build HTML and man docs
5 %bcond_without tests # don't perform make check
7 Summary: Font configuration and customization tools
8 Summary(pl.UTF-8): Narzędzia do konfigurowania fontów
9 Summary(pt_BR.UTF-8): Ferramentas para configuração e customização do acesso a fontes
16 Source0: https://www.freedesktop.org/software/fontconfig/release/%{name}-%{version}.tar.xz
17 # Source0-md5: 95261910ea727b5dd116b06fbfd84b1f
18 Source1: %{name}-lcd-filter.conf
19 Patch0: %{name}-bitstream-cyberbit.patch
20 Patch1: disable-tests.patch
21 URL: http://fontconfig.org/
22 BuildRequires: autoconf >= 2.61
23 BuildRequires: automake >= 1:1.11
24 %{?with_tests:BuildRequires: bubblewrap}
26 BuildRequires: docbook-dtd31-sgml
27 BuildRequires: docbook-dtd41-sgml
28 BuildRequires: docbook-utils >= 0.6.13-3
31 BuildRequires: expat-devel
32 # pkgconfig(freetype) >= 21.0.15
33 BuildRequires: freetype-devel >= 1:2.9
34 BuildRequires: gettext-tools >= 0.19.8
36 %{?with_tests:BuildRequires: json-c-devel}
37 BuildRequires: libtool >= 2:2.2
38 BuildRequires: libuuid-devel
39 BuildRequires: pkgconfig
40 %{?with_doc:BuildRequires: python3}
41 BuildRequires: tar >= 1:1.22
43 Requires: %{name}-libs = %{epoch}:%{version}-%{release}
44 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
47 Fontconfig is designed to locate fonts within the system and select
48 them according to requirements specified by applications.
50 This package contains tools and documentation.
52 %description -l pl.UTF-8
53 Fontconfig jest biblioteką przeznaczoną do lokalizowania fontów w
54 systemie i wybierania ich w zależności od potrzeb aplikacji.
56 Paket ten zawiera programy narzędziowe i dokumentację.
58 %description -l pt_BR.UTF-8
59 Fontconfig é uma biblioteca para configuração e customização do acesso
62 Este pacote contém as ferramentas e documentação.
65 Summary: Font configuration and customization library
66 Summary(pl.UTF-8): Biblioteka do konfigurowania fontów
67 Summary(pt_BR.UTF-8): Biblioteca para configuração e customização do acesso a fontes
69 Requires: freetype >= 1:2.9
70 Provides: XFree86-fontconfig
71 Obsoletes: XFree86-fontconfig < 4.4
72 Conflicts: fontconfig <= 1:2.2.98-1
75 Fontconfig is designed to locate fonts within the system and select
76 them according to requirements specified by applications.
78 %description libs -l pl.UTF-8
79 Fontconfig jest biblioteką przeznaczoną do lokalizowania fontów w
80 systemie i wybierania ich w zależności od potrzeb aplikacji.
82 %description libs -l pt_BR.UTF-8
83 Fontconfig é uma biblioteca para configuração e customização do acesso
87 Summary: Font configuration and customization library - development files
88 Summary(pl.UTF-8): Biblioteka do konfigurowania fontów - pliki dla programistów
89 Summary(pt_BR.UTF-8): Biblioteca para configuração e customização do acesso a fontes - arquivos de desenvolvimento
90 Group: Development/Libraries
91 Requires: %{name}-libs = %{epoch}:%{version}-%{release}
93 Requires: freetype-devel >= 1:2.9
94 Requires: libuuid-devel
95 Provides: XFree86-fontconfig-devel
96 Obsoletes: XFree86-fontconfig-devel < 4.4
99 Fontconfig is designed to locate fonts within the system and select
100 them according to requirements specified by applications.
102 This package contains the header files needed to develop programs that
103 use these fontconfig.
105 %description devel -l pl.UTF-8
106 Fontconfig jest biblioteką przeznaczoną do lokalizowania fontów w
107 systemie i wybierania ich w zależności od potrzeb aplikacji.
109 Ten pakiet zawiera pliki nagłówkowe potrzebne do kompilowania
110 programów korzystających z biblioteki fontconfig.
112 %description devel -l pt_BR.UTF-8
113 Fontconfig é uma biblioteca para configuração e customização do acesso
116 Este pacote contém arquivos de desenvolvimento necessários à criação
117 de extensões baseadas na biblioteca fontconfig.
120 Summary: Static font configuration and customization library
121 Summary(pl.UTF-8): Statyczna biblioteka do konfigurowania fontów
122 Summary(pt_BR.UTF-8): Biblioteca estática para configuração e customização do acesso a fontes
123 Group: Development/Libraries
124 Requires: %{name}-devel = %{epoch}:%{version}-%{release}
125 Provides: XFree86-fontconfig-static
126 Obsoletes: XFree86-fontconfig-static < 4.4
129 This package contains static version of fontconfig library.
131 %description static -l pl.UTF-8
132 Ten pakiet zawiera statyczną wersję biblioteki fontconfig.
134 %description static -l pt_BR.UTF-8
135 Este pacote contém a biblioteca estática do fontconfig
142 # bwrap: No permissions to creating new namespace, likely because the kernel does not allow non-privileged user namespaces...
143 sed -i -e 's#BWRAP=.*#BWRAP=#g' test/run-test.sh
153 # don't rebuild docs by default, use prebuild ones
157 --enable-docs%{!?with_doc:=no} \
158 --disable-silent-rules \
159 --%{?with_static_libs:en}%{!?with_static_libs:dis}able-static
162 %{?with_tests:%{__make} OSTYPE=linux check || (cat test/test-suite.log && /bin/false)}
165 rm -rf $RPM_BUILD_ROOT
166 install -d $RPM_BUILD_ROOT{%{_mandir}/man{1,3,5},/var/cache/fontconfig} \
169 DESTDIR=$RPM_BUILD_ROOT \
174 $RPM_BUILD_ROOT%{_datadir}/%{name}/conf.avail/10-lcd-filter.conf
176 ln -s %{_datadir}/%{name}/conf.avail $RPM_BUILD_ROOT%{_sysconfdir}/fonts/conf.avail
178 cp -pf conf.d/README README.confd
181 %find_lang %{name}-conf -a %{name}.lang
184 rm -rf $RPM_BUILD_ROOT
187 # this needs to be a symlink
188 if [ -d %{_sysconfdir}/fonts/conf.avail ] && [ ! -L %{_sysconfdir}/fonts/conf.avail ]; then
189 mv -f %{_sysconfdir}/fonts/conf.avail{,.rpmsave}
190 install -d %{_datadir}/%{name}/conf.avail
191 ln -s %{_datadir}/%{name}/conf.avail %{_sysconfdir}/fonts/conf.avail
192 mv -f %{_sysconfdir}/fonts/conf.avail.rpmsave/*.conf %{_sysconfdir}/fonts/conf.avail/
193 rmdir %{_sysconfdir}/fonts/conf.avail.rpmsave 2>/dev/null || :
198 HOME=/tmp %{_bindir}/fc-cache -f 2>/dev/null || :
200 %post libs -p /sbin/ldconfig
201 %postun libs -p /sbin/ldconfig
203 %files -f %{name}.lang
204 %defattr(644,root,root,755)
205 %doc AUTHORS COPYING ChangeLog README README.confd doc/fontconfig-user.html
206 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fonts/fonts.conf
207 %{_sysconfdir}/fonts/conf.avail
208 %{_sysconfdir}/fonts/conf.d/README
209 %config(noreplace,missingok) %verify(not link md5 mtime size) %{_sysconfdir}/fonts/conf.d/*.conf
210 %attr(755,root,root) %{_bindir}/fc-cache
211 %attr(755,root,root) %{_bindir}/fc-cat
212 %attr(755,root,root) %{_bindir}/fc-conflist
213 %attr(755,root,root) %{_bindir}/fc-list
214 %attr(755,root,root) %{_bindir}/fc-match
215 %attr(755,root,root) %{_bindir}/fc-query
216 %attr(755,root,root) %{_bindir}/fc-pattern
217 %attr(755,root,root) %{_bindir}/fc-scan
218 %attr(755,root,root) %{_bindir}/fc-validate
219 %dir %{_datadir}/xml/%{name}
220 %{_datadir}/xml/%{name}/fonts.dtd
221 %{_datadir}/%{name}/conf.avail/*.conf
223 %{_mandir}/man1/fc-*.1*
224 %{_mandir}/man5/fonts-conf.5*
226 %dir /var/cache/fontconfig
229 %defattr(644,root,root,755)
230 %attr(755,root,root) %{_libdir}/libfontconfig.so.*.*.*
231 %attr(755,root,root) %ghost %{_libdir}/libfontconfig.so.1
234 %defattr(644,root,root,755)
235 %doc doc/fontconfig-devel/*.html
236 %attr(755,root,root) %{_libdir}/libfontconfig.so
237 %{_libdir}/libfontconfig.la
238 %{_includedir}/fontconfig
239 %{_pkgconfigdir}/fontconfig.pc
240 %{_datadir}/gettext/its/fontconfig.its
241 %{_datadir}/gettext/its/fontconfig.loc
243 %{_mandir}/man3/Fc*.3*
246 %if %{with static_libs}
248 %defattr(644,root,root,755)
249 %{_libdir}/libfontconfig.a