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