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