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