]>
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 | |
9cac6a75 | 7 | %define mver 2.50 |
6cc68522 | 8 | %define pver 1 |
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 |
6cc68522 | 21 | # Source0-md5: 61624dced1f1a53383cf72e752e154a4 |
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 |
290dc84d | 37 | BuildRequires: glib2-devel >= 1:2.50.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} |
9cac6a75 | 41 | BuildRequires: harfbuzz-devel >= 2.0.0 |
274a8440 | 42 | BuildRequires: libcroco-devel >= 0.6.1 |
17f42d6a | 43 | BuildRequires: libtool >= 2:2.0 |
6a2651b7 JB |
44 | BuildRequires: libxml2-devel >= 1:2.9.0 |
45 | BuildRequires: pango-devel >= 1:1.38.0 | |
c4caf50c | 46 | BuildRequires: pkgconfig |
836d8cf1 | 47 | BuildRequires: rpm-pythonprov |
b4b630d8 | 48 | BuildRequires: rpmbuild(macros) >= 1.752 |
9cac6a75 | 49 | BuildRequires: rust >= 1.40 |
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 |
f20df4f5 | 55 | Requires: cairo-gobject >= 1.16.0 |
fc65f7f1 | 56 | Requires: freetype >= 1:2.8 |
41efbe2b | 57 | Requires: gdk-pixbuf2 >= 2.20 |
290dc84d | 58 | Requires: glib2 >= 1:2.50.0 |
9cac6a75 | 59 | Requires: harfbuzz >= 2.0.0 |
274a8440 | 60 | Requires: libcroco >= 0.6.1 |
6a2651b7 JB |
61 | Requires: libxml2 >= 1:2.9.0 |
62 | Requires: pango >= 1:1.38.0 | |
6681b37f | 63 | Obsoletes: browser-plugin-librsvg |
41efbe2b | 64 | Obsoletes: librsvg-gtk+2 |
f20df4f5 | 65 | Obsoletes: librsvg-gtk+3 |
29233d8a | 66 | Obsoletes: librsvg0 |
7fc8862e | 67 | Obsoletes: mozilla-plugin-rsvg |
f948888f | 68 | # rust archs |
b4b630d8 | 69 | ExclusiveArch: %{x8664} %{ix86} x32 aarch64 |
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 |
274a8440 | 106 | Requires: libcroco-devel >= 0.6.1 |
6a2651b7 JB |
107 | Requires: libxml2-devel >= 1:2.9.0 |
108 | Requires: pango-devel >= 1:1.38.0 | |
080ab56a | 109 | Obsoletes: librsvg0-devel |
cc99da29 KT |
110 | |
111 | %description devel | |
d4c0a792 MM |
112 | This package provides the necessary development libraries and include |
113 | files to allow you to develop with librsvg. | |
e03e3432 | 114 | |
1ad972be JR |
115 | %description devel -l pl.UTF-8 |
116 | Pakiet zawiera pliki nagłówkowe potrzebne do tworzenia oprogramowania | |
0780b304 | 117 | z wykorzystaniem librsvg. |
cc99da29 | 118 | |
1ad972be JR |
119 | %description devel -l pt_BR.UTF-8 |
120 | Este pacote contém os arquivos necessários para desenvolver com base | |
080ab56a | 121 | na biblioteca librsvg. |
122 | ||
1ad972be JR |
123 | %description devel -l ru.UTF-8 |
124 | Этот пакет содержит необходимые файлы для разработки программ с | |
125 | использованием librsvg. | |
a3344f74 | 126 | |
1ad972be JR |
127 | %description devel -l uk.UTF-8 |
128 | Цей пакет містить необхідні файли для розробки програм з використанням | |
a3344f74 | 129 | librsvg. |
130 | ||
944586bf | 131 | %package static |
0780b304 | 132 | Summary: Static libraries for developing with librsvg |
a0a0a705 ER |
133 | Summary(es.UTF-8): Archivos estáticos necesarios para el desarrollo de aplicaciones con librsvg |
134 | Summary(pl.UTF-8): Statyczne biblioteki librsvg | |
135 | Summary(pt_BR.UTF-8): Arquivos estáticos necessários para o desenvolvimento de aplicações com librsvg | |
adb8dade | 136 | Group: X11/Development/Libraries |
cfb03eca | 137 | Requires: %{name}-devel = %{epoch}:%{version}-%{release} |
944586bf PG |
138 | |
139 | %description static | |
0780b304 | 140 | This package contains static version of librsvg libraries. |
944586bf | 141 | |
1ad972be | 142 | %description static -l pl.UTF-8 |
0780b304 | 143 | Statyczna wersja bibliotek librsvg. |
944586bf | 144 | |
1ad972be JR |
145 | %description static -l pt_BR.UTF-8 |
146 | Bibliotecas estáticas para o desenvolvimento de aplicações com | |
080ab56a | 147 | librsvg. |
148 | ||
4983a7a9 MB |
149 | %package apidocs |
150 | Summary: librsvg API documentation | |
151 | Summary(pl.UTF-8): Dokumentacja API biblioteki librsvg | |
152 | Group: Documentation | |
153 | Requires: gtk-doc-common | |
b4b630d8 | 154 | %{?noarchpackage} |
4983a7a9 MB |
155 | |
156 | %description apidocs | |
157 | librsvg API documentation. | |
158 | ||
159 | %description apidocs -l pl.UTF-8 | |
160 | Dokumentacja API biblioteki librsvg. | |
161 | ||
5bf5690c JB |
162 | %package -n vala-librsvg |
163 | Summary: Vala API for librsvg library | |
164 | Summary(pl.UTF-8): API języka Vala do biblioteki librsvg | |
165 | Group: Development/Libraries | |
194cbae9 | 166 | Requires: %{name}-devel = %{epoch}:%{version}-%{release} |
fc65f7f1 | 167 | Requires: vala >= 2:0.40 |
b4b630d8 | 168 | %{?noarchpackage} |
5bf5690c JB |
169 | |
170 | %description -n vala-librsvg | |
171 | Vala API for librsvg library. | |
172 | ||
173 | %description -n vala-librsvg -l pl.UTF-8 | |
174 | API języka Vala do biblioteki librsvg. | |
175 | ||
cc99da29 | 176 | %prep |
e4690d22 | 177 | %setup -q |
daf1fb3b | 178 | %patch0 -p1 |
1e016fce | 179 | %patch1 -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 | ||
b4b630d8 JB |
186 | %ifarch x32 |
187 | %{__sed} -i -e '/CROSS_COMPILING/ s/test \$cross_compiling = yes/true/' configure.ac | |
188 | %endif | |
189 | ||
cc99da29 | 190 | %build |
934cfd64 | 191 | %{?with_apidocs:%{__gtkdocize}} |
094e0ffa | 192 | %{__libtoolize} |
1e016fce | 193 | %{__aclocal} -I m4 |
094e0ffa | 194 | %{__autoconf} |
adb8dade | 195 | %{__autoheader} |
094e0ffa | 196 | %{__automake} |
d4f197ce | 197 | %configure \ |
b4b630d8 JB |
198 | %ifarch x32 |
199 | RUST_TARGET=x86_64-unknown-linux-gnux32 \ | |
200 | %endif | |
ff22cf0f | 201 | %{__enable_disable apidocs gtk-doc} \ |
cfdffb08 | 202 | --enable-introspection \ |
5bf5690c JB |
203 | --disable-silent-rules \ |
204 | %{__enable_disable static_libs static} \ | |
205 | %{?with_vala:--enable-vala} \ | |
cfb03eca | 206 | --with-html-dir=%{_gtkdocdir}/%{name} |
c4caf50c | 207 | %{__make} |
208 | ||
cc99da29 | 209 | %install |
2d89ab37 | 210 | rm -rf $RPM_BUILD_ROOT |
2aca8b1a | 211 | |
d4c0a792 MM |
212 | %{__make} install \ |
213 | DESTDIR=$RPM_BUILD_ROOT \ | |
cfb03eca | 214 | pkgconfigdir=%{_pkgconfigdir} |
2aca8b1a | 215 | |
11846de8 JP |
216 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/gdk-pixbuf-2.0/2.*.*/loaders/*.la |
217 | %if %{with static_libs} | |
218 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/gdk-pixbuf-2.0/2.*.*/loaders/*.a | |
219 | %endif | |
47b8d8a4 | 220 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/librsvg-2.la |
9cf84f83 | 221 | |
e64a7c86 | 222 | cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_bindir} |
c2e97a8f | 223 | |
f20df4f5 JB |
224 | %find_lang %{name} |
225 | ||
2aca8b1a PG |
226 | %clean |
227 | rm -rf $RPM_BUILD_ROOT | |
228 | ||
3974ae74 | 229 | %post |
230 | /sbin/ldconfig | |
f9f85140 | 231 | umask 022 |
47b8d8a4 | 232 | %{_bindir}/gdk-pixbuf-query-loaders%{pqext} --update-cache || : |
3974ae74 | 233 | |
234 | %postun | |
235 | /sbin/ldconfig | |
f9f85140 | 236 | umask 022 |
3f3d0e1a | 237 | if [ -x %{_bindir}/gdk-pixbuf-query-loaders%{pqext} ]; then |
9e46e2bc | 238 | %{_bindir}/gdk-pixbuf-query-loaders%{pqext} --update-cache |
3f3d0e1a | 239 | fi |
094e0ffa | 240 | |
f20df4f5 | 241 | %files -f %{name}.lang |
2d89ab37 | 242 | %defattr(644,root,root,755) |
775f4438 | 243 | %doc AUTHORS NEWS |
adb8dade PZ |
244 | %attr(755,root,root) %{_bindir}/rsvg |
245 | %attr(755,root,root) %{_bindir}/rsvg-convert | |
edb6ae5a | 246 | %attr(755,root,root) %{_libdir}/librsvg-2.so.*.*.* |
2a1baa24 | 247 | %attr(755,root,root) %ghost %{_libdir}/librsvg-2.so.2 |
cfdffb08 | 248 | %{_libdir}/girepository-1.0/Rsvg-2.0.typelib |
d2f85f61 | 249 | %attr(755,root,root) %{_libdir}/gdk-pixbuf-2.0/2.*.*/loaders/libpixbufloader-svg.so |
0adb73af | 250 | %{_datadir}/thumbnailers/librsvg.thumbnailer |
725978de | 251 | %{_mandir}/man1/rsvg-convert.1* |
cc99da29 KT |
252 | |
253 | %files devel | |
2d89ab37 | 254 | %defattr(644,root,root,755) |
edb6ae5a | 255 | %attr(755,root,root) %{_libdir}/librsvg-2.so |
9e46e2bc | 256 | %{_includedir}/librsvg-2.0 |
cfdffb08 | 257 | %{_datadir}/gir-1.0/Rsvg-2.0.gir |
d2f85f61 | 258 | %{_pkgconfigdir}/librsvg-2.0.pc |
944586bf | 259 | |
3f3d0e1a | 260 | %if %{with static_libs} |
944586bf PG |
261 | %files static |
262 | %defattr(644,root,root,755) | |
edb6ae5a | 263 | %{_libdir}/librsvg-2.a |
3f3d0e1a | 264 | %endif |
4983a7a9 MB |
265 | |
266 | %if %{with apidocs} | |
267 | %files apidocs | |
268 | %defattr(644,root,root,755) | |
269 | %{_gtkdocdir}/%{name} | |
270 | %endif | |
d2f85f61 | 271 | |
5bf5690c JB |
272 | %if %{with vala} |
273 | %files -n vala-librsvg | |
274 | %defattr(644,root,root,755) | |
275 | %{_datadir}/vala/vapi/librsvg-2.0.vapi | |
276 | %endif |