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