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