]>
Commit | Line | Data |
---|---|---|
578a8396 | 1 | # |
fc18e843 | 2 | # Conditional build |
4fa27e6c JB |
3 | %bcond_without apidocs # gtk-doc based API documentation |
4 | %bcond_without static_libs # static library | |
775f4438 | 5 | %bcond_without vala # Vala API (vala up to 0.38.x already contains librsvg-2.0.vapi) |
c2e97a8f | 6 | |
9cac6a75 | 7 | %define mver 2.50 |
401b1ffe | 8 | %define pver 5 |
b05ca4c9 | 9 | Summary: A Raph's Library for Rendering SVG Data |
a0a0a705 ER |
10 | Summary(pl.UTF-8): Biblioteka Raph's SVG do renderowania danych SVG |
11 | Summary(pt_BR.UTF-8): Biblioteca SVG | |
12 | Summary(ru.UTF-8): SVG библиотека | |
13 | Summary(uk.UTF-8): SVG бібліотека | |
2d89ab37 | 14 | Name: librsvg |
41efbe2b | 15 | Version: %{mver}.%{pver} |
600e799f | 16 | Release: 1 |
cfb03eca | 17 | Epoch: 1 |
3e8d876b | 18 | License: LGPL v2+ |
adb8dade | 19 | Group: X11/Libraries |
f9634e00 | 20 | Source0: https://download.gnome.org/sources/librsvg/%{mver}/%{name}-%{version}.tar.xz |
401b1ffe | 21 | # Source0-md5: b36298821ea956c5a16a38f737aafe9f |
c2e97a8f | 22 | Source1: rsvg |
daf1fb3b | 23 | Patch0: x32.patch |
f20df4f5 | 24 | Patch1: %{name}-gtkdoc.patch |
5e6c47d1 | 25 | URL: http://librsvg.sourceforge.net/ |
5bf5690c | 26 | BuildRequires: autoconf >= 2.50 |
9e46e2bc | 27 | BuildRequires: automake >= 1:1.9 |
f20df4f5 JB |
28 | BuildRequires: cairo-devel >= 1.16.0 |
29 | BuildRequires: cairo-gobject-devel >= 1.16.0 | |
fc65f7f1 | 30 | BuildRequires: cargo |
f20df4f5 JB |
31 | BuildRequires: docbook-dtd43-xml |
32 | BuildRequires: fontconfig-devel | |
fc65f7f1 JB |
33 | # pkgconfig(freetype) >= 20.0.14 |
34 | BuildRequires: freetype-devel >= 1:2.8 | |
41efbe2b | 35 | BuildRequires: gdk-pixbuf2-devel >= 2.20 |
f20df4f5 | 36 | BuildRequires: gettext-tools >= 0.19.8 |
290dc84d | 37 | BuildRequires: glib2-devel >= 1:2.50.0 |
17f42d6a | 38 | BuildRequires: gobject-introspection-devel >= 0.10.8 |
9e46e2bc | 39 | %{?with_apidocs:BuildRequires: gtk-doc >= 1.13} |
60409033 | 40 | %{?with_apidocs:BuildRequires: gtk-doc-automake >= 1.13} |
9cac6a75 | 41 | BuildRequires: harfbuzz-devel >= 2.0.0 |
274a8440 | 42 | BuildRequires: libcroco-devel >= 0.6.1 |
17f42d6a | 43 | BuildRequires: libtool >= 2:2.0 |
6a2651b7 JB |
44 | BuildRequires: libxml2-devel >= 1:2.9.0 |
45 | BuildRequires: pango-devel >= 1:1.38.0 | |
c4caf50c | 46 | BuildRequires: pkgconfig |
4fa27e6c | 47 | BuildRequires: rpm-build >= 4.6 |
836d8cf1 | 48 | BuildRequires: rpm-pythonprov |
b4b630d8 | 49 | BuildRequires: rpmbuild(macros) >= 1.752 |
9cac6a75 | 50 | BuildRequires: rust >= 1.40 |
7d99b20d | 51 | BuildRequires: sed >= 4.0 |
2628f610 | 52 | BuildRequires: tar >= 1:1.22 |
5bf5690c | 53 | %{?with_vala:BuildRequires: vala >= 2:0.18} |
2628f610 | 54 | BuildRequires: xz |
1723e4f4 | 55 | Requires(post,postun): /sbin/ldconfig |
f20df4f5 | 56 | Requires: cairo-gobject >= 1.16.0 |
fc65f7f1 | 57 | Requires: freetype >= 1:2.8 |
41efbe2b | 58 | Requires: gdk-pixbuf2 >= 2.20 |
290dc84d | 59 | Requires: glib2 >= 1:2.50.0 |
9cac6a75 | 60 | Requires: harfbuzz >= 2.0.0 |
274a8440 | 61 | Requires: libcroco >= 0.6.1 |
6a2651b7 JB |
62 | Requires: libxml2 >= 1:2.9.0 |
63 | Requires: pango >= 1:1.38.0 | |
4fa27e6c JB |
64 | Obsoletes: browser-plugin-librsvg < 1:2.15 |
65 | Obsoletes: librsvg-gtk+2 < 1:2.40 | |
66 | Obsoletes: librsvg-gtk+3 < 1:2.46 | |
29233d8a | 67 | Obsoletes: librsvg0 |
4fa27e6c | 68 | Obsoletes: mozilla-plugin-rsvg < 1:2.16.1 |
f948888f | 69 | # rust archs |
19355c57 | 70 | ExclusiveArch: %{x8664} %{ix86} x32 aarch64 armv6hl armv7hl armv7hnl |
2c6dfdc7 | 71 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
2d89ab37 | 72 | |
d2f85f61 | 73 | # see gdk-pixbuf2.spec for source of these ifdefs |
cc871572 AM |
74 | %if "%{_lib}" != "lib" |
75 | %define libext %(lib="%{_lib}"; echo ${lib#lib}) | |
cc871572 AM |
76 | %define pqext -%{libext} |
77 | %else | |
cc871572 AM |
78 | %define pqext %{nil} |
79 | %endif | |
80 | ||
cc99da29 | 81 | %description |
11e37f78 JB |
82 | An library to render SVG (scalable vector graphics), databased upon |
83 | libart. | |
cc99da29 | 84 | |
1ad972be | 85 | %description -l pl.UTF-8 |
27f39052 JB |
86 | Biblioteka do renderowania SVG (skalowalnej grafiki wektorowej) oparta |
87 | na kodzie libart. | |
080ab56a | 88 | |
1ad972be JR |
89 | %description -l ru.UTF-8 |
90 | Библиотека SVG, базирующаяся на libart. | |
a3344f74 | 91 | |
1ad972be JR |
92 | %description -l uk.UTF-8 |
93 | Бібліотека SVG, базована на libart. | |
a3344f74 | 94 | |
cc99da29 | 95 | %package devel |
0780b304 | 96 | Summary: Include files for developing with librsvg |
a0a0a705 ER |
97 | Summary(pl.UTF-8): Pliki nagłówkowe do tworzenia oprogramowania z użyciem librsvg |
98 | Summary(pt_BR.UTF-8): Bibliotecas e arquivos de inclusão para desenvolvimento com a librsvg | |
99 | Summary(ru.UTF-8): Библиотечные линки и файлы заголовков для разработки с librsvg | |
100 | Summary(uk.UTF-8): Бібліотечні лінки та файли заголовків для розробки з librsvg | |
adb8dade | 101 | Group: X11/Development/Libraries |
cfb03eca | 102 | Requires: %{name} = %{epoch}:%{version}-%{release} |
f20df4f5 | 103 | Requires: cairo-gobject-devel >= 1.16.0 |
fc65f7f1 | 104 | Requires: freetype-devel >= 1:2.8 |
41efbe2b | 105 | Requires: gdk-pixbuf2-devel >= 2.20 |
290dc84d | 106 | Requires: glib2-devel >= 1:2.50.0 |
274a8440 | 107 | Requires: libcroco-devel >= 0.6.1 |
6a2651b7 JB |
108 | Requires: libxml2-devel >= 1:2.9.0 |
109 | Requires: pango-devel >= 1:1.38.0 | |
080ab56a | 110 | Obsoletes: librsvg0-devel |
cc99da29 KT |
111 | |
112 | %description devel | |
d4c0a792 MM |
113 | This package provides the necessary development libraries and include |
114 | files to allow you to develop with librsvg. | |
e03e3432 | 115 | |
1ad972be JR |
116 | %description devel -l pl.UTF-8 |
117 | Pakiet zawiera pliki nagłówkowe potrzebne do tworzenia oprogramowania | |
0780b304 | 118 | z wykorzystaniem librsvg. |
cc99da29 | 119 | |
1ad972be JR |
120 | %description devel -l pt_BR.UTF-8 |
121 | Este pacote contém os arquivos necessários para desenvolver com base | |
080ab56a | 122 | na biblioteca librsvg. |
123 | ||
1ad972be JR |
124 | %description devel -l ru.UTF-8 |
125 | Этот пакет содержит необходимые файлы для разработки программ с | |
126 | использованием librsvg. | |
a3344f74 | 127 | |
1ad972be JR |
128 | %description devel -l uk.UTF-8 |
129 | Цей пакет містить необхідні файли для розробки програм з використанням | |
a3344f74 | 130 | librsvg. |
131 | ||
944586bf | 132 | %package static |
0780b304 | 133 | Summary: Static libraries for developing with librsvg |
a0a0a705 ER |
134 | Summary(es.UTF-8): Archivos estáticos necesarios para el desarrollo de aplicaciones con librsvg |
135 | Summary(pl.UTF-8): Statyczne biblioteki librsvg | |
136 | Summary(pt_BR.UTF-8): Arquivos estáticos necessários para o desenvolvimento de aplicações com librsvg | |
adb8dade | 137 | Group: X11/Development/Libraries |
cfb03eca | 138 | Requires: %{name}-devel = %{epoch}:%{version}-%{release} |
944586bf PG |
139 | |
140 | %description static | |
0780b304 | 141 | This package contains static version of librsvg libraries. |
944586bf | 142 | |
1ad972be | 143 | %description static -l pl.UTF-8 |
0780b304 | 144 | Statyczna wersja bibliotek librsvg. |
944586bf | 145 | |
1ad972be JR |
146 | %description static -l pt_BR.UTF-8 |
147 | Bibliotecas estáticas para o desenvolvimento de aplicações com | |
080ab56a | 148 | librsvg. |
149 | ||
4983a7a9 MB |
150 | %package apidocs |
151 | Summary: librsvg API documentation | |
152 | Summary(pl.UTF-8): Dokumentacja API biblioteki librsvg | |
153 | Group: Documentation | |
154 | Requires: gtk-doc-common | |
ca0684e9 | 155 | BuildArch: noarch |
4983a7a9 MB |
156 | |
157 | %description apidocs | |
158 | librsvg API documentation. | |
159 | ||
160 | %description apidocs -l pl.UTF-8 | |
161 | Dokumentacja API biblioteki librsvg. | |
162 | ||
5bf5690c JB |
163 | %package -n vala-librsvg |
164 | Summary: Vala API for librsvg library | |
165 | Summary(pl.UTF-8): API języka Vala do biblioteki librsvg | |
166 | Group: Development/Libraries | |
194cbae9 | 167 | Requires: %{name}-devel = %{epoch}:%{version}-%{release} |
fc65f7f1 | 168 | Requires: vala >= 2:0.40 |
ca0684e9 | 169 | BuildArch: noarch |
5bf5690c JB |
170 | |
171 | %description -n vala-librsvg | |
172 | Vala API for librsvg library. | |
173 | ||
174 | %description -n vala-librsvg -l pl.UTF-8 | |
175 | API języka Vala do biblioteki librsvg. | |
176 | ||
cc99da29 | 177 | %prep |
e4690d22 | 178 | %setup -q |
daf1fb3b | 179 | %patch0 -p1 |
1e016fce | 180 | %patch1 -p1 |
d0d37948 | 181 | |
17f42d6a | 182 | %if %{without apidocs} |
41e5f310 JP |
183 | cat <<EOF > gtk-doc.make |
184 | CLEANFILES= | |
185 | EXTRA_DIST= | |
186 | EOF | |
187 | cat <<EOF >> acinclude.m4 | |
188 | AC_DEFUN([GTK_DOC_CHECK],[ | |
189 | AM_CONDITIONAL([ENABLE_GTK_DOC], [/bin/false]) | |
190 | ]) | |
191 | EOF | |
3f3d0e1a KK |
192 | %endif |
193 | ||
b4b630d8 | 194 | %ifarch x32 |
1bafbd46 | 195 | %{__sed} -i -e 's/test "\?x\?\$cross_compiling"\? = "\?x\?yes"\?/true/' configure.ac |
b4b630d8 JB |
196 | %endif |
197 | ||
cc99da29 | 198 | %build |
934cfd64 | 199 | %{?with_apidocs:%{__gtkdocize}} |
094e0ffa | 200 | %{__libtoolize} |
1e016fce | 201 | %{__aclocal} -I m4 |
094e0ffa | 202 | %{__autoconf} |
adb8dade | 203 | %{__autoheader} |
094e0ffa | 204 | %{__automake} |
d4f197ce | 205 | %configure \ |
b4b630d8 JB |
206 | %ifarch x32 |
207 | RUST_TARGET=x86_64-unknown-linux-gnux32 \ | |
208 | %endif | |
ff22cf0f | 209 | %{__enable_disable apidocs gtk-doc} \ |
cfdffb08 | 210 | --enable-introspection \ |
5bf5690c JB |
211 | --disable-silent-rules \ |
212 | %{__enable_disable static_libs static} \ | |
213 | %{?with_vala:--enable-vala} \ | |
cfb03eca | 214 | --with-html-dir=%{_gtkdocdir}/%{name} |
c4caf50c | 215 | %{__make} |
216 | ||
cc99da29 | 217 | %install |
2d89ab37 | 218 | rm -rf $RPM_BUILD_ROOT |
2aca8b1a | 219 | |
d4c0a792 MM |
220 | %{__make} install \ |
221 | DESTDIR=$RPM_BUILD_ROOT \ | |
cfb03eca | 222 | pkgconfigdir=%{_pkgconfigdir} |
2aca8b1a | 223 | |
11846de8 JP |
224 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/gdk-pixbuf-2.0/2.*.*/loaders/*.la |
225 | %if %{with static_libs} | |
226 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/gdk-pixbuf-2.0/2.*.*/loaders/*.a | |
227 | %endif | |
47b8d8a4 | 228 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/librsvg-2.la |
9cf84f83 | 229 | |
e64a7c86 | 230 | cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_bindir} |
c2e97a8f | 231 | |
f20df4f5 JB |
232 | %find_lang %{name} |
233 | ||
2aca8b1a PG |
234 | %clean |
235 | rm -rf $RPM_BUILD_ROOT | |
236 | ||
3974ae74 | 237 | %post |
238 | /sbin/ldconfig | |
f9f85140 | 239 | umask 022 |
47b8d8a4 | 240 | %{_bindir}/gdk-pixbuf-query-loaders%{pqext} --update-cache || : |
3974ae74 | 241 | |
242 | %postun | |
243 | /sbin/ldconfig | |
f9f85140 | 244 | umask 022 |
3f3d0e1a | 245 | if [ -x %{_bindir}/gdk-pixbuf-query-loaders%{pqext} ]; then |
9e46e2bc | 246 | %{_bindir}/gdk-pixbuf-query-loaders%{pqext} --update-cache |
3f3d0e1a | 247 | fi |
094e0ffa | 248 | |
f20df4f5 | 249 | %files -f %{name}.lang |
2d89ab37 | 250 | %defattr(644,root,root,755) |
775f4438 | 251 | %doc AUTHORS NEWS |
adb8dade PZ |
252 | %attr(755,root,root) %{_bindir}/rsvg |
253 | %attr(755,root,root) %{_bindir}/rsvg-convert | |
edb6ae5a | 254 | %attr(755,root,root) %{_libdir}/librsvg-2.so.*.*.* |
2a1baa24 | 255 | %attr(755,root,root) %ghost %{_libdir}/librsvg-2.so.2 |
cfdffb08 | 256 | %{_libdir}/girepository-1.0/Rsvg-2.0.typelib |
d2f85f61 | 257 | %attr(755,root,root) %{_libdir}/gdk-pixbuf-2.0/2.*.*/loaders/libpixbufloader-svg.so |
0adb73af | 258 | %{_datadir}/thumbnailers/librsvg.thumbnailer |
725978de | 259 | %{_mandir}/man1/rsvg-convert.1* |
cc99da29 KT |
260 | |
261 | %files devel | |
2d89ab37 | 262 | %defattr(644,root,root,755) |
edb6ae5a | 263 | %attr(755,root,root) %{_libdir}/librsvg-2.so |
9e46e2bc | 264 | %{_includedir}/librsvg-2.0 |
cfdffb08 | 265 | %{_datadir}/gir-1.0/Rsvg-2.0.gir |
d2f85f61 | 266 | %{_pkgconfigdir}/librsvg-2.0.pc |
944586bf | 267 | |
3f3d0e1a | 268 | %if %{with static_libs} |
944586bf PG |
269 | %files static |
270 | %defattr(644,root,root,755) | |
edb6ae5a | 271 | %{_libdir}/librsvg-2.a |
3f3d0e1a | 272 | %endif |
4983a7a9 MB |
273 | |
274 | %if %{with apidocs} | |
275 | %files apidocs | |
276 | %defattr(644,root,root,755) | |
277 | %{_gtkdocdir}/%{name} | |
278 | %endif | |
d2f85f61 | 279 | |
5bf5690c JB |
280 | %if %{with vala} |
281 | %files -n vala-librsvg | |
282 | %defattr(644,root,root,755) | |
283 | %{_datadir}/vala/vapi/librsvg-2.0.vapi | |
284 | %endif |