]>
Commit | Line | Data |
---|---|---|
578a8396 | 1 | # |
fc18e843 | 2 | # Conditional build |
b2963635 | 3 | %bcond_without apidocs # gi-docgen based API documentation |
4fa27e6c | 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 | |
4390f224 | 7 | %define crates_ver 2.56.1 |
ea1b3016 | 8 | |
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 |
4390f224 JP |
15 | Version: 2.56.1 |
16 | Release: 1 | |
cfb03eca | 17 | Epoch: 1 |
3e8d876b | 18 | License: LGPL v2+ |
adb8dade | 19 | Group: X11/Libraries |
bb8ac51b | 20 | Source0: https://download.gnome.org/sources/librsvg/2.56/%{name}-%{version}.tar.xz |
4390f224 | 21 | # Source0-md5: 023e34798503c964ad982d130ee369c9 |
ea1b3016 | 22 | Source1: %{name}-crates-%{crates_ver}.tar.xz |
4390f224 | 23 | # Source1-md5: 10249215e606c8fc13e9c40aa54bc556 |
ea1b3016 | 24 | Source2: rsvg |
daf1fb3b | 25 | Patch0: x32.patch |
eea7ea38 | 26 | URL: https://wiki.gnome.org/Projects/LibRsvg |
5c0daa49 | 27 | BuildRequires: autoconf >= 2.69 |
9e46e2bc | 28 | BuildRequires: automake >= 1:1.9 |
f20df4f5 JB |
29 | BuildRequires: cairo-devel >= 1.16.0 |
30 | BuildRequires: cairo-gobject-devel >= 1.16.0 | |
fc65f7f1 | 31 | BuildRequires: cargo |
f20df4f5 | 32 | BuildRequires: docbook-dtd43-xml |
c9f09dba | 33 | BuildRequires: docutils |
f20df4f5 | 34 | BuildRequires: fontconfig-devel |
fc65f7f1 JB |
35 | # pkgconfig(freetype) >= 20.0.14 |
36 | BuildRequires: freetype-devel >= 1:2.8 | |
41efbe2b | 37 | BuildRequires: gdk-pixbuf2-devel >= 2.20 |
b2963635 | 38 | %{?with_apidocs:BuildRequires: gi-docgen} |
290dc84d | 39 | BuildRequires: glib2-devel >= 1:2.50.0 |
17f42d6a | 40 | BuildRequires: gobject-introspection-devel >= 0.10.8 |
9cac6a75 | 41 | BuildRequires: harfbuzz-devel >= 2.0.0 |
17f42d6a | 42 | BuildRequires: libtool >= 2:2.0 |
6a2651b7 | 43 | BuildRequires: libxml2-devel >= 1:2.9.0 |
c9f09dba | 44 | BuildRequires: pango-devel >= 1:1.48.11 |
c4caf50c | 45 | BuildRequires: pkgconfig |
4fa27e6c | 46 | BuildRequires: rpm-build >= 4.6 |
836d8cf1 | 47 | BuildRequires: rpm-pythonprov |
b4b630d8 | 48 | BuildRequires: rpmbuild(macros) >= 1.752 |
4390f224 | 49 | BuildRequires: rust >= 1.65.0 |
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 |
de4d9271 | 55 | Requires(post,postun): gdk-pixbuf2 |
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 |
6a2651b7 | 61 | Requires: libxml2 >= 1:2.9.0 |
c9f09dba | 62 | Requires: pango >= 1:1.48.11 |
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 | |
51a4d23f | 66 | Obsoletes: librsvg0 < 2 |
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 |
6a2651b7 | 106 | Requires: libxml2-devel >= 1:2.9.0 |
c9f09dba | 107 | Requires: pango-devel >= 1:1.48.11 |
51a4d23f | 108 | Obsoletes: librsvg0-devel < 2 |
cc99da29 KT |
109 | |
110 | %description devel | |
d4c0a792 MM |
111 | This package provides the necessary development libraries and include |
112 | files to allow you to develop with librsvg. | |
e03e3432 | 113 | |
1ad972be JR |
114 | %description devel -l pl.UTF-8 |
115 | Pakiet zawiera pliki nagłówkowe potrzebne do tworzenia oprogramowania | |
0780b304 | 116 | z wykorzystaniem librsvg. |
cc99da29 | 117 | |
1ad972be JR |
118 | %description devel -l pt_BR.UTF-8 |
119 | Este pacote contém os arquivos necessários para desenvolver com base | |
080ab56a | 120 | na biblioteca librsvg. |
121 | ||
1ad972be JR |
122 | %description devel -l ru.UTF-8 |
123 | Этот пакет содержит необходимые файлы для разработки программ с | |
124 | использованием librsvg. | |
a3344f74 | 125 | |
1ad972be JR |
126 | %description devel -l uk.UTF-8 |
127 | Цей пакет містить необхідні файли для розробки програм з використанням | |
a3344f74 | 128 | librsvg. |
129 | ||
944586bf | 130 | %package static |
0780b304 | 131 | Summary: Static libraries for developing with librsvg |
a0a0a705 ER |
132 | Summary(es.UTF-8): Archivos estáticos necesarios para el desarrollo de aplicaciones con librsvg |
133 | Summary(pl.UTF-8): Statyczne biblioteki librsvg | |
134 | Summary(pt_BR.UTF-8): Arquivos estáticos necessários para o desenvolvimento de aplicações com librsvg | |
adb8dade | 135 | Group: X11/Development/Libraries |
cfb03eca | 136 | Requires: %{name}-devel = %{epoch}:%{version}-%{release} |
944586bf PG |
137 | |
138 | %description static | |
0780b304 | 139 | This package contains static version of librsvg libraries. |
944586bf | 140 | |
1ad972be | 141 | %description static -l pl.UTF-8 |
0780b304 | 142 | Statyczna wersja bibliotek librsvg. |
944586bf | 143 | |
1ad972be JR |
144 | %description static -l pt_BR.UTF-8 |
145 | Bibliotecas estáticas para o desenvolvimento de aplicações com | |
080ab56a | 146 | librsvg. |
147 | ||
4983a7a9 MB |
148 | %package apidocs |
149 | Summary: librsvg API documentation | |
150 | Summary(pl.UTF-8): Dokumentacja API biblioteki librsvg | |
151 | Group: Documentation | |
152 | Requires: gtk-doc-common | |
ca0684e9 | 153 | BuildArch: noarch |
4983a7a9 MB |
154 | |
155 | %description apidocs | |
156 | librsvg API documentation. | |
157 | ||
158 | %description apidocs -l pl.UTF-8 | |
159 | Dokumentacja API biblioteki librsvg. | |
160 | ||
5bf5690c JB |
161 | %package -n vala-librsvg |
162 | Summary: Vala API for librsvg library | |
163 | Summary(pl.UTF-8): API języka Vala do biblioteki librsvg | |
164 | Group: Development/Libraries | |
194cbae9 | 165 | Requires: %{name}-devel = %{epoch}:%{version}-%{release} |
fc65f7f1 | 166 | Requires: vala >= 2:0.40 |
ca0684e9 | 167 | BuildArch: noarch |
5bf5690c JB |
168 | |
169 | %description -n vala-librsvg | |
170 | Vala API for librsvg library. | |
171 | ||
172 | %description -n vala-librsvg -l pl.UTF-8 | |
173 | API języka Vala do biblioteki librsvg. | |
174 | ||
cc99da29 | 175 | %prep |
ea1b3016 | 176 | %setup -q -a1 |
daf1fb3b | 177 | %patch0 -p1 |
3f3d0e1a | 178 | |
b4b630d8 | 179 | %ifarch x32 |
1bafbd46 | 180 | %{__sed} -i -e 's/test "\?x\?\$cross_compiling"\? = "\?x\?yes"\?/true/' configure.ac |
b4b630d8 JB |
181 | %endif |
182 | ||
ea1b3016 JP |
183 | %{__mv} librsvg-%{crates_ver}/* . |
184 | sed -i -e 's/@@VERSION@@/%{version}/' Cargo.lock | |
185 | ||
186 | # use our offline registry | |
187 | export CARGO_HOME="$(pwd)/.cargo" | |
188 | ||
189 | mkdir -p "$CARGO_HOME" | |
190 | cat >.cargo/config <<EOF | |
191 | [source.crates-io] | |
192 | registry = 'https://github.com/rust-lang/crates.io-index' | |
193 | replace-with = 'vendored-sources' | |
194 | ||
195 | [source.vendored-sources] | |
196 | directory = '$PWD/vendor' | |
197 | EOF | |
198 | ||
cc99da29 | 199 | %build |
ea1b3016 | 200 | export CARGO_HOME="$(pwd)/.cargo" |
094e0ffa | 201 | %{__libtoolize} |
1e016fce | 202 | %{__aclocal} -I m4 |
094e0ffa | 203 | %{__autoconf} |
adb8dade | 204 | %{__autoheader} |
094e0ffa | 205 | %{__automake} |
d4f197ce | 206 | %configure \ |
b4b630d8 JB |
207 | %ifarch x32 |
208 | RUST_TARGET=x86_64-unknown-linux-gnux32 \ | |
209 | %endif | |
b2963635 | 210 | %{__enable_disable apidocs gtk-doc} \ |
cfdffb08 | 211 | --enable-introspection \ |
5bf5690c JB |
212 | --disable-silent-rules \ |
213 | %{__enable_disable static_libs static} \ | |
c9f09dba JP |
214 | %{?with_vala:--enable-vala} |
215 | ||
c4caf50c | 216 | %{__make} |
217 | ||
cc99da29 | 218 | %install |
2d89ab37 | 219 | rm -rf $RPM_BUILD_ROOT |
2aca8b1a | 220 | |
ea1b3016 JP |
221 | export CARGO_HOME="$(pwd)/.cargo" |
222 | ||
d4c0a792 MM |
223 | %{__make} install \ |
224 | DESTDIR=$RPM_BUILD_ROOT \ | |
cfb03eca | 225 | pkgconfigdir=%{_pkgconfigdir} |
2aca8b1a | 226 | |
11846de8 JP |
227 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/gdk-pixbuf-2.0/2.*.*/loaders/*.la |
228 | %if %{with static_libs} | |
229 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/gdk-pixbuf-2.0/2.*.*/loaders/*.a | |
230 | %endif | |
47b8d8a4 | 231 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/librsvg-2.la |
9cf84f83 | 232 | |
ea1b3016 | 233 | cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_bindir} |
c2e97a8f | 234 | |
b2963635 | 235 | %if %{with apidocs} |
c9f09dba | 236 | install -d $RPM_BUILD_ROOT%{_gtkdocdir} |
cc5ba8f2 | 237 | %{__mv} $RPM_BUILD_ROOT%{_datadir}/doc/Rsvg-2.0 $RPM_BUILD_ROOT%{_gtkdocdir} |
b2963635 | 238 | %endif |
cc5ba8f2 JB |
239 | # README.md packaged as %doc, the rest useful just for developers |
240 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/librsvg | |
c9f09dba | 241 | |
2aca8b1a PG |
242 | %clean |
243 | rm -rf $RPM_BUILD_ROOT | |
244 | ||
3974ae74 | 245 | %post |
246 | /sbin/ldconfig | |
f9f85140 | 247 | umask 022 |
47b8d8a4 | 248 | %{_bindir}/gdk-pixbuf-query-loaders%{pqext} --update-cache || : |
3974ae74 | 249 | |
250 | %postun | |
251 | /sbin/ldconfig | |
f9f85140 | 252 | umask 022 |
3f3d0e1a | 253 | if [ -x %{_bindir}/gdk-pixbuf-query-loaders%{pqext} ]; then |
9e46e2bc | 254 | %{_bindir}/gdk-pixbuf-query-loaders%{pqext} --update-cache |
3f3d0e1a | 255 | fi |
094e0ffa | 256 | |
5c0daa49 | 257 | %files |
2d89ab37 | 258 | %defattr(644,root,root,755) |
452869d4 | 259 | %doc AUTHORS NEWS README.md |
adb8dade PZ |
260 | %attr(755,root,root) %{_bindir}/rsvg |
261 | %attr(755,root,root) %{_bindir}/rsvg-convert | |
edb6ae5a | 262 | %attr(755,root,root) %{_libdir}/librsvg-2.so.*.*.* |
2a1baa24 | 263 | %attr(755,root,root) %ghost %{_libdir}/librsvg-2.so.2 |
cfdffb08 | 264 | %{_libdir}/girepository-1.0/Rsvg-2.0.typelib |
d2f85f61 | 265 | %attr(755,root,root) %{_libdir}/gdk-pixbuf-2.0/2.*.*/loaders/libpixbufloader-svg.so |
0adb73af | 266 | %{_datadir}/thumbnailers/librsvg.thumbnailer |
725978de | 267 | %{_mandir}/man1/rsvg-convert.1* |
cc99da29 KT |
268 | |
269 | %files devel | |
2d89ab37 | 270 | %defattr(644,root,root,755) |
edb6ae5a | 271 | %attr(755,root,root) %{_libdir}/librsvg-2.so |
9e46e2bc | 272 | %{_includedir}/librsvg-2.0 |
cfdffb08 | 273 | %{_datadir}/gir-1.0/Rsvg-2.0.gir |
d2f85f61 | 274 | %{_pkgconfigdir}/librsvg-2.0.pc |
944586bf | 275 | |
3f3d0e1a | 276 | %if %{with static_libs} |
944586bf PG |
277 | %files static |
278 | %defattr(644,root,root,755) | |
edb6ae5a | 279 | %{_libdir}/librsvg-2.a |
3f3d0e1a | 280 | %endif |
4983a7a9 | 281 | |
b2963635 | 282 | %if %{with apidocs} |
4983a7a9 MB |
283 | %files apidocs |
284 | %defattr(644,root,root,755) | |
cc5ba8f2 | 285 | %{_gtkdocdir}/Rsvg-2.0 |
b2963635 | 286 | %endif |
d2f85f61 | 287 | |
5bf5690c JB |
288 | %if %{with vala} |
289 | %files -n vala-librsvg | |
290 | %defattr(644,root,root,755) | |
291 | %{_datadir}/vala/vapi/librsvg-2.0.vapi | |
292 | %endif |