]>
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 | |
eb8f337b | 7 | %define crates_ver 2.58.0 |
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 |
eb8f337b | 15 | Version: 2.58.0 |
d187f306 | 16 | Release: 2 |
cfb03eca | 17 | Epoch: 1 |
3e8d876b | 18 | License: LGPL v2+ |
adb8dade | 19 | Group: X11/Libraries |
eb8f337b JB |
20 | Source0: https://download.gnome.org/sources/librsvg/2.58/%{name}-%{version}.tar.xz |
21 | # Source0-md5: 21b2957a2e7ceeb7ddbd207aa2c7ed29 | |
ea1b3016 | 22 | Source1: %{name}-crates-%{crates_ver}.tar.xz |
eb8f337b | 23 | # Source1-md5: f45f6678db7009ec076f8314fa7e5a4e |
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 |
eb8f337b JB |
29 | BuildRequires: cairo-devel >= 1.17.0 |
30 | BuildRequires: cairo-gobject-devel >= 1.17.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 |
eb8f337b | 44 | BuildRequires: pango-devel >= 1:1.50.0 |
c4caf50c | 45 | BuildRequires: pkgconfig |
4fa27e6c | 46 | BuildRequires: rpm-build >= 4.6 |
836d8cf1 | 47 | BuildRequires: rpm-pythonprov |
a5ff56e5 | 48 | BuildRequires: rpmbuild(macros) >= 2.029 |
eb8f337b | 49 | BuildRequires: rust >= 1.70.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 |
eb8f337b | 56 | Requires: cairo-gobject >= 1.17.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 |
eb8f337b | 62 | Requires: pango >= 1:1.50.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 | |
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} |
eb8f337b | 102 | Requires: cairo-gobject-devel >= 1.17.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 |
eb8f337b | 107 | Requires: pango-devel >= 1:1.50.0 |
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 | |
ca0684e9 | 152 | BuildArch: noarch |
4983a7a9 MB |
153 | |
154 | %description apidocs | |
155 | librsvg API documentation. | |
156 | ||
157 | %description apidocs -l pl.UTF-8 | |
158 | Dokumentacja API biblioteki librsvg. | |
159 | ||
5bf5690c JB |
160 | %package -n vala-librsvg |
161 | Summary: Vala API for librsvg library | |
162 | Summary(pl.UTF-8): API języka Vala do biblioteki librsvg | |
163 | Group: Development/Libraries | |
194cbae9 | 164 | Requires: %{name}-devel = %{epoch}:%{version}-%{release} |
fc65f7f1 | 165 | Requires: vala >= 2:0.40 |
ca0684e9 | 166 | BuildArch: noarch |
5bf5690c JB |
167 | |
168 | %description -n vala-librsvg | |
169 | Vala API for librsvg library. | |
170 | ||
171 | %description -n vala-librsvg -l pl.UTF-8 | |
172 | API języka Vala do biblioteki librsvg. | |
173 | ||
cc99da29 | 174 | %prep |
ea1b3016 | 175 | %setup -q -a1 |
daf1fb3b | 176 | %patch0 -p1 |
3f3d0e1a | 177 | |
b4b630d8 | 178 | %ifarch x32 |
1bafbd46 | 179 | %{__sed} -i -e 's/test "\?x\?\$cross_compiling"\? = "\?x\?yes"\?/true/' configure.ac |
b4b630d8 JB |
180 | %endif |
181 | ||
ea1b3016 JP |
182 | %{__mv} librsvg-%{crates_ver}/* . |
183 | sed -i -e 's/@@VERSION@@/%{version}/' Cargo.lock | |
184 | ||
185 | # use our offline registry | |
186 | export CARGO_HOME="$(pwd)/.cargo" | |
187 | ||
188 | mkdir -p "$CARGO_HOME" | |
189 | cat >.cargo/config <<EOF | |
190 | [source.crates-io] | |
191 | registry = 'https://github.com/rust-lang/crates.io-index' | |
192 | replace-with = 'vendored-sources' | |
193 | ||
194 | [source.vendored-sources] | |
195 | directory = '$PWD/vendor' | |
196 | EOF | |
197 | ||
cc99da29 | 198 | %build |
ea1b3016 | 199 | export CARGO_HOME="$(pwd)/.cargo" |
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 | |
b2963635 | 209 | %{__enable_disable apidocs gtk-doc} \ |
cfdffb08 | 210 | --enable-introspection \ |
5bf5690c JB |
211 | --disable-silent-rules \ |
212 | %{__enable_disable static_libs static} \ | |
c9f09dba JP |
213 | %{?with_vala:--enable-vala} |
214 | ||
c4caf50c | 215 | %{__make} |
216 | ||
cc99da29 | 217 | %install |
2d89ab37 | 218 | rm -rf $RPM_BUILD_ROOT |
2aca8b1a | 219 | |
ea1b3016 JP |
220 | export CARGO_HOME="$(pwd)/.cargo" |
221 | ||
d4c0a792 MM |
222 | %{__make} install \ |
223 | DESTDIR=$RPM_BUILD_ROOT \ | |
cfb03eca | 224 | pkgconfigdir=%{_pkgconfigdir} |
2aca8b1a | 225 | |
11846de8 JP |
226 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/gdk-pixbuf-2.0/2.*.*/loaders/*.la |
227 | %if %{with static_libs} | |
228 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/gdk-pixbuf-2.0/2.*.*/loaders/*.a | |
229 | %endif | |
47b8d8a4 | 230 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/librsvg-2.la |
9cf84f83 | 231 | |
ea1b3016 | 232 | cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_bindir} |
c2e97a8f | 233 | |
b2963635 | 234 | %if %{with apidocs} |
a5ff56e5 JB |
235 | install -d $RPM_BUILD_ROOT%{_gidocdir} |
236 | %{__mv} $RPM_BUILD_ROOT%{_datadir}/doc/Rsvg-2.0 $RPM_BUILD_ROOT%{_gidocdir} | |
b2963635 | 237 | %endif |
cc5ba8f2 JB |
238 | # README.md packaged as %doc, the rest useful just for developers |
239 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/librsvg | |
c9f09dba | 240 | |
2aca8b1a PG |
241 | %clean |
242 | rm -rf $RPM_BUILD_ROOT | |
243 | ||
3974ae74 | 244 | %post |
245 | /sbin/ldconfig | |
f9f85140 | 246 | umask 022 |
47b8d8a4 | 247 | %{_bindir}/gdk-pixbuf-query-loaders%{pqext} --update-cache || : |
3974ae74 | 248 | |
249 | %postun | |
250 | /sbin/ldconfig | |
f9f85140 | 251 | umask 022 |
3f3d0e1a | 252 | if [ -x %{_bindir}/gdk-pixbuf-query-loaders%{pqext} ]; then |
9e46e2bc | 253 | %{_bindir}/gdk-pixbuf-query-loaders%{pqext} --update-cache |
3f3d0e1a | 254 | fi |
094e0ffa | 255 | |
5c0daa49 | 256 | %files |
2d89ab37 | 257 | %defattr(644,root,root,755) |
452869d4 | 258 | %doc AUTHORS NEWS README.md |
adb8dade PZ |
259 | %attr(755,root,root) %{_bindir}/rsvg |
260 | %attr(755,root,root) %{_bindir}/rsvg-convert | |
edb6ae5a | 261 | %attr(755,root,root) %{_libdir}/librsvg-2.so.*.*.* |
2a1baa24 | 262 | %attr(755,root,root) %ghost %{_libdir}/librsvg-2.so.2 |
cfdffb08 | 263 | %{_libdir}/girepository-1.0/Rsvg-2.0.typelib |
d2f85f61 | 264 | %attr(755,root,root) %{_libdir}/gdk-pixbuf-2.0/2.*.*/loaders/libpixbufloader-svg.so |
0adb73af | 265 | %{_datadir}/thumbnailers/librsvg.thumbnailer |
725978de | 266 | %{_mandir}/man1/rsvg-convert.1* |
cc99da29 KT |
267 | |
268 | %files devel | |
2d89ab37 | 269 | %defattr(644,root,root,755) |
edb6ae5a | 270 | %attr(755,root,root) %{_libdir}/librsvg-2.so |
9e46e2bc | 271 | %{_includedir}/librsvg-2.0 |
cfdffb08 | 272 | %{_datadir}/gir-1.0/Rsvg-2.0.gir |
d2f85f61 | 273 | %{_pkgconfigdir}/librsvg-2.0.pc |
944586bf | 274 | |
3f3d0e1a | 275 | %if %{with static_libs} |
944586bf PG |
276 | %files static |
277 | %defattr(644,root,root,755) | |
edb6ae5a | 278 | %{_libdir}/librsvg-2.a |
3f3d0e1a | 279 | %endif |
4983a7a9 | 280 | |
b2963635 | 281 | %if %{with apidocs} |
4983a7a9 MB |
282 | %files apidocs |
283 | %defattr(644,root,root,755) | |
a5ff56e5 | 284 | %{_gidocdir}/Rsvg-2.0 |
b2963635 | 285 | %endif |
d2f85f61 | 286 | |
5bf5690c JB |
287 | %if %{with vala} |
288 | %files -n vala-librsvg | |
289 | %defattr(644,root,root,755) | |
290 | %{_datadir}/vala/vapi/librsvg-2.0.vapi | |
291 | %endif |