]> git.pld-linux.org Git - packages/fontconfig.git/blob - fontconfig.spec
BR: bubblewrap for tests; rel 2
[packages/fontconfig.git] / fontconfig.spec
1 #
2 # Conditional build
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
6
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
10 Name:           fontconfig
11 Version:        2.14.0
12 Release:        2
13 Epoch:          1
14 License:        MIT
15 Group:          Libraries
16 Source0:        https://www.freedesktop.org/software/fontconfig/release/%{name}-%{version}.tar.xz
17 # Source0-md5:  e12700a9d522bdfec06b6b7e72646987
18 Source1:        %{name}-lcd-filter.conf
19 Patch0:         %{name}-bitstream-cyberbit.patch
20 URL:            http://fontconfig.org/
21 BuildRequires:  autoconf >= 2.61
22 BuildRequires:  automake >= 1:1.11
23 %{?with_tests:BuildRequires:    bubblewrap}
24 %if %{with doc}
25 BuildRequires:  docbook-dtd31-sgml
26 BuildRequires:  docbook-dtd41-sgml
27 BuildRequires:  docbook-utils >= 0.6.13-3
28 %endif
29 BuildRequires:  ed
30 BuildRequires:  expat-devel
31 # pkgconfig(freetype) >= 21.0.15
32 BuildRequires:  freetype-devel >= 1:2.9
33 BuildRequires:  gettext-tools >= 0.19.8
34 BuildRequires:  gperf
35 %{?with_tests:BuildRequires:    json-c-devel}
36 BuildRequires:  libtool >= 2:2.2
37 BuildRequires:  libuuid-devel
38 BuildRequires:  pkgconfig
39 %{?with_doc:BuildRequires:      python3}
40 BuildRequires:  tar >= 1:1.22
41 BuildRequires:  xz
42 Requires:       %{name}-libs = %{epoch}:%{version}-%{release}
43 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
44
45 %description
46 Fontconfig is designed to locate fonts within the system and select
47 them according to requirements specified by applications.
48
49 This package contains tools and documentation.
50
51 %description -l pl.UTF-8
52 Fontconfig jest biblioteką przeznaczoną do lokalizowania fontów w
53 systemie i wybierania ich w zależności od potrzeb aplikacji.
54
55 Paket ten zawiera programy narzędziowe i dokumentację.
56
57 %description -l pt_BR.UTF-8
58 Fontconfig é uma biblioteca para configuração e customização do acesso
59 a fontes.
60
61 Este pacote contém as ferramentas e documentação.
62
63 %package libs
64 Summary:        Font configuration and customization library
65 Summary(pl.UTF-8):      Biblioteka do konfigurowania fontów
66 Summary(pt_BR.UTF-8):   Biblioteca para configuração e customização do acesso a fontes
67 Group:          Libraries
68 Requires:       freetype >= 1:2.9
69 Provides:       XFree86-fontconfig
70 Obsoletes:      XFree86-fontconfig
71 Conflicts:      fontconfig <= 1:2.2.98-1
72
73 %description libs
74 Fontconfig is designed to locate fonts within the system and select
75 them according to requirements specified by applications.
76
77 %description libs -l pl.UTF-8
78 Fontconfig jest biblioteką przeznaczoną do lokalizowania fontów w
79 systemie i wybierania ich w zależności od potrzeb aplikacji.
80
81 %description libs -l pt_BR.UTF-8
82 Fontconfig é uma biblioteca para configuração e customização do acesso
83 a fontes.
84
85 %package devel
86 Summary:        Font configuration and customization library - development files
87 Summary(pl.UTF-8):      Biblioteka do konfigurowania fontów - pliki dla programistów
88 Summary(pt_BR.UTF-8):   Biblioteca para configuração e customização do acesso a fontes - arquivos de desenvolvimento
89 Group:          Development/Libraries
90 Requires:       %{name}-libs = %{epoch}:%{version}-%{release}
91 Requires:       expat-devel
92 Requires:       freetype-devel >= 1:2.9
93 Requires:       libuuid-devel
94 Provides:       XFree86-fontconfig-devel
95 Obsoletes:      XFree86-fontconfig-devel
96
97 %description devel
98 Fontconfig is designed to locate fonts within the system and select
99 them according to requirements specified by applications.
100
101 This package contains the header files needed to develop programs that
102 use these fontconfig.
103
104 %description devel -l pl.UTF-8
105 Fontconfig jest biblioteką przeznaczoną do lokalizowania fontów w
106 systemie i wybierania ich w zależności od potrzeb aplikacji.
107
108 Ten pakiet zawiera pliki nagłówkowe potrzebne do kompilowania
109 programów korzystających z biblioteki fontconfig.
110
111 %description devel -l pt_BR.UTF-8
112 Fontconfig é uma biblioteca para configuração e customização do acesso
113 a fontes.
114
115 Este pacote contém arquivos de desenvolvimento necessários à criação
116 de extensões baseadas na biblioteca fontconfig.
117
118 %package static
119 Summary:        Static font configuration and customization library
120 Summary(pl.UTF-8):      Statyczna biblioteka do konfigurowania fontów
121 Summary(pt_BR.UTF-8):   Biblioteca estática para configuração e customização do acesso a fontes
122 Group:          Development/Libraries
123 Requires:       %{name}-devel = %{epoch}:%{version}-%{release}
124 Provides:       XFree86-fontconfig-static
125 Obsoletes:      XFree86-fontconfig-static
126
127 %description static
128 This package contains static version of fontconfig library.
129
130 %description static -l pl.UTF-8
131 Ten pakiet zawiera statyczną wersję biblioteki fontconfig.
132
133 %description static -l pt_BR.UTF-8
134 Este pacote contém a biblioteca estática do fontconfig
135
136 %prep
137 %setup -q
138 %patch0 -p1
139
140 # bwrap: No permissions to creating new namespace, likely because the kernel does not allow non-privileged user namespaces...
141 sed -i -e 's#BWRAP=.*#BWRAP=#g' test/run-test.sh
142
143 %build
144 %{__gettextize}
145 %{__libtoolize}
146 %{__aclocal} -I m4
147 %{__autoconf}
148 %{__autoheader}
149 %{__automake}
150
151 # don't rebuild docs by default, use prebuild ones
152 export HASDOCBOOK=no
153
154 %configure \
155         --enable-docs%{!?with_doc:=no} \
156         --disable-silent-rules \
157         --%{?with_static_libs:en}%{!?with_static_libs:dis}able-static
158 %{__make}
159
160 %{?with_tests:%{__make} OSTYPE=linux check || (cat test/test-suite.log && /bin/false)}
161
162 %install
163 rm -rf $RPM_BUILD_ROOT
164 install -d $RPM_BUILD_ROOT{%{_mandir}/man{1,3,5},/var/cache/fontconfig} \
165
166 %{__make} install \
167         DESTDIR=$RPM_BUILD_ROOT \
168         htmldoc_DATA= \
169         doc_DATA=
170
171 install %{SOURCE1} \
172         $RPM_BUILD_ROOT%{_datadir}/%{name}/conf.avail/10-lcd-filter.conf
173
174 ln -s %{_datadir}/%{name}/conf.avail $RPM_BUILD_ROOT%{_sysconfdir}/fonts/conf.avail
175
176 cp -pf conf.d/README README.confd
177
178 %find_lang %{name}
179 %find_lang %{name}-conf -a %{name}.lang
180
181 %clean
182 rm -rf $RPM_BUILD_ROOT
183
184 %pretrans
185 # this needs to be a symlink
186 if [ -d %{_sysconfdir}/fonts/conf.avail ] && [ ! -L %{_sysconfdir}/fonts/conf.avail ]; then
187         mv -f %{_sysconfdir}/fonts/conf.avail{,.rpmsave}
188         install -d %{_datadir}/%{name}/conf.avail
189         ln -s %{_datadir}/%{name}/conf.avail %{_sysconfdir}/fonts/conf.avail
190         mv -f %{_sysconfdir}/fonts/conf.avail.rpmsave/*.conf %{_sysconfdir}/fonts/conf.avail/
191         rmdir %{_sysconfdir}/fonts/conf.avail.rpmsave 2>/dev/null || :
192 fi
193
194 %post
195 umask 022
196 HOME=/tmp %{_bindir}/fc-cache -f 2>/dev/null || :
197
198 %post   libs -p /sbin/ldconfig
199 %postun libs -p /sbin/ldconfig
200
201 %files -f %{name}.lang
202 %defattr(644,root,root,755)
203 %doc AUTHORS COPYING ChangeLog README README.confd doc/fontconfig-user.html
204 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fonts/fonts.conf
205 %{_sysconfdir}/fonts/conf.avail
206 %{_sysconfdir}/fonts/conf.d/README
207 %config(noreplace,missingok) %verify(not link md5 mtime size) %{_sysconfdir}/fonts/conf.d/*.conf
208 %attr(755,root,root) %{_bindir}/fc-cache
209 %attr(755,root,root) %{_bindir}/fc-cat
210 %attr(755,root,root) %{_bindir}/fc-conflist
211 %attr(755,root,root) %{_bindir}/fc-list
212 %attr(755,root,root) %{_bindir}/fc-match
213 %attr(755,root,root) %{_bindir}/fc-query
214 %attr(755,root,root) %{_bindir}/fc-pattern
215 %attr(755,root,root) %{_bindir}/fc-scan
216 %attr(755,root,root) %{_bindir}/fc-validate
217 %dir %{_datadir}/xml/%{name}
218 %{_datadir}/xml/%{name}/fonts.dtd
219 %{_datadir}/%{name}/conf.avail/*.conf
220 %if %{with doc}
221 %{_mandir}/man1/fc-*.1*
222 %{_mandir}/man5/fonts-conf.5*
223 %endif
224 %dir /var/cache/fontconfig
225
226 %files libs
227 %defattr(644,root,root,755)
228 %attr(755,root,root) %{_libdir}/libfontconfig.so.*.*.*
229 %attr(755,root,root) %ghost %{_libdir}/libfontconfig.so.1
230
231 %files devel
232 %defattr(644,root,root,755)
233 %doc doc/fontconfig-devel/*.html
234 %attr(755,root,root) %{_libdir}/libfontconfig.so
235 %{_libdir}/libfontconfig.la
236 %{_includedir}/fontconfig
237 %{_pkgconfigdir}/fontconfig.pc
238 %{_datadir}/gettext/its/fontconfig.its
239 %{_datadir}/gettext/its/fontconfig.loc
240 %if %{with doc}
241 %{_mandir}/man3/Fc*.3*
242 %endif
243
244 %if %{with static_libs}
245 %files static
246 %defattr(644,root,root,755)
247 %{_libdir}/libfontconfig.a
248 %endif
This page took 0.063187 seconds and 4 git commands to generate.