]> git.pld-linux.org Git - packages/librsvg.git/blob - librsvg.spec
a1cc91e192a4e43ef30ba7a836a29281a5c95492
[packages/librsvg.git] / librsvg.spec
1 #
2 # Conditional build
3 %bcond_without  apidocs         # gtk-doc based API documentation
4 %bcond_without  static_libs     # static library
5 %bcond_without  vala            # Vala API (vala up to 0.38.x already contains librsvg-2.0.vapi)
6
7 %define         mver    2.50
8 %define         pver    4
9 Summary:        A Raph's Library for Rendering SVG Data
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 бібліотека
14 Name:           librsvg
15 Version:        %{mver}.%{pver}
16 Release:        1
17 Epoch:          1
18 License:        LGPL v2+
19 Group:          X11/Libraries
20 Source0:        https://download.gnome.org/sources/librsvg/%{mver}/%{name}-%{version}.tar.xz
21 # Source0-md5:  94764e3dfbf9392afc986a42f2af0639
22 Source1:        rsvg
23 Patch0:         x32.patch
24 Patch1:         %{name}-gtkdoc.patch
25 URL:            http://librsvg.sourceforge.net/
26 BuildRequires:  autoconf >= 2.50
27 BuildRequires:  automake >= 1:1.9
28 BuildRequires:  cairo-devel >= 1.16.0
29 BuildRequires:  cairo-gobject-devel >= 1.16.0
30 BuildRequires:  cargo
31 BuildRequires:  docbook-dtd43-xml
32 BuildRequires:  fontconfig-devel
33 # pkgconfig(freetype) >= 20.0.14
34 BuildRequires:  freetype-devel >= 1:2.8
35 BuildRequires:  gdk-pixbuf2-devel >= 2.20
36 BuildRequires:  gettext-tools >= 0.19.8
37 BuildRequires:  glib2-devel >= 1:2.50.0
38 BuildRequires:  gobject-introspection-devel >= 0.10.8
39 %{?with_apidocs:BuildRequires:  gtk-doc >= 1.13}
40 %{?with_apidocs:BuildRequires:  gtk-doc-automake >= 1.13}
41 BuildRequires:  harfbuzz-devel >= 2.0.0
42 BuildRequires:  libcroco-devel >= 0.6.1
43 BuildRequires:  libtool >= 2:2.0
44 BuildRequires:  libxml2-devel >= 1:2.9.0
45 BuildRequires:  pango-devel >= 1:1.38.0
46 BuildRequires:  pkgconfig
47 BuildRequires:  rpm-build >= 4.6
48 BuildRequires:  rpm-pythonprov
49 BuildRequires:  rpmbuild(macros) >= 1.752
50 BuildRequires:  rust >= 1.40
51 BuildRequires:  sed >= 4.0
52 BuildRequires:  tar >= 1:1.22
53 %{?with_vala:BuildRequires:     vala >= 2:0.18}
54 BuildRequires:  xz
55 Requires(post,postun):  /sbin/ldconfig
56 Requires:       cairo-gobject >= 1.16.0
57 Requires:       freetype >= 1:2.8
58 Requires:       gdk-pixbuf2 >= 2.20
59 Requires:       glib2 >= 1:2.50.0
60 Requires:       harfbuzz >= 2.0.0
61 Requires:       libcroco >= 0.6.1
62 Requires:       libxml2 >= 1:2.9.0
63 Requires:       pango >= 1:1.38.0
64 Obsoletes:      browser-plugin-librsvg < 1:2.15
65 Obsoletes:      librsvg-gtk+2 < 1:2.40
66 Obsoletes:      librsvg-gtk+3 < 1:2.46
67 Obsoletes:      librsvg0
68 Obsoletes:      mozilla-plugin-rsvg < 1:2.16.1
69 # rust archs
70 ExclusiveArch:  %{x8664} %{ix86} x32 aarch64 armv6hl armv7hl armv7hnl
71 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
72
73 # see gdk-pixbuf2.spec for source of these ifdefs
74 %if "%{_lib}" != "lib"
75 %define         libext          %(lib="%{_lib}"; echo ${lib#lib})
76 %define         pqext           -%{libext}
77 %else
78 %define         pqext           %{nil}
79 %endif
80
81 %description
82 An library to render SVG (scalable vector graphics), databased upon
83 libart.
84
85 %description -l pl.UTF-8
86 Biblioteka do renderowania SVG (skalowalnej grafiki wektorowej) oparta
87 na kodzie libart.
88
89 %description -l ru.UTF-8
90 Библиотека SVG, базирующаяся на libart.
91
92 %description -l uk.UTF-8
93 Бібліотека SVG, базована на libart.
94
95 %package devel
96 Summary:        Include files for developing with librsvg
97 Summary(pl.UTF-8):      Pliki nagłówkowe do tworzenia oprogramowania z użyciem librsvg
98 Summary(pt_BR.UTF-8):   Bibliotecas e arquivos de inclusão para desenvolvimento com a librsvg
99 Summary(ru.UTF-8):      Библиотечные линки и файлы заголовков для разработки с librsvg
100 Summary(uk.UTF-8):      Бібліотечні лінки та файли заголовків для розробки з librsvg
101 Group:          X11/Development/Libraries
102 Requires:       %{name} = %{epoch}:%{version}-%{release}
103 Requires:       cairo-gobject-devel >= 1.16.0
104 Requires:       freetype-devel >= 1:2.8
105 Requires:       gdk-pixbuf2-devel >= 2.20
106 Requires:       glib2-devel >= 1:2.50.0
107 Requires:       libcroco-devel >= 0.6.1
108 Requires:       libxml2-devel >= 1:2.9.0
109 Requires:       pango-devel >= 1:1.38.0
110 Obsoletes:      librsvg0-devel
111
112 %description devel
113 This package provides the necessary development libraries and include
114 files to allow you to develop with librsvg.
115
116 %description devel -l pl.UTF-8
117 Pakiet zawiera pliki nagłówkowe potrzebne do tworzenia oprogramowania
118 z wykorzystaniem librsvg.
119
120 %description devel -l pt_BR.UTF-8
121 Este pacote contém os arquivos necessários para desenvolver com base
122 na biblioteca librsvg.
123
124 %description devel -l ru.UTF-8
125 Этот пакет содержит необходимые файлы для разработки программ с
126 использованием librsvg.
127
128 %description devel -l uk.UTF-8
129 Цей пакет містить необхідні файли для розробки програм з використанням
130 librsvg.
131
132 %package static
133 Summary:        Static libraries for developing with librsvg
134 Summary(es.UTF-8):      Archivos estáticos necesarios para el desarrollo de aplicaciones con librsvg
135 Summary(pl.UTF-8):      Statyczne biblioteki librsvg
136 Summary(pt_BR.UTF-8):   Arquivos estáticos necessários para o desenvolvimento de aplicações com librsvg
137 Group:          X11/Development/Libraries
138 Requires:       %{name}-devel = %{epoch}:%{version}-%{release}
139
140 %description static
141 This package contains static version of librsvg libraries.
142
143 %description static -l pl.UTF-8
144 Statyczna wersja bibliotek librsvg.
145
146 %description static -l pt_BR.UTF-8
147 Bibliotecas estáticas para o desenvolvimento de aplicações com
148 librsvg.
149
150 %package apidocs
151 Summary:        librsvg API documentation
152 Summary(pl.UTF-8):      Dokumentacja API biblioteki librsvg
153 Group:          Documentation
154 Requires:       gtk-doc-common
155 BuildArch:      noarch
156
157 %description apidocs
158 librsvg API documentation.
159
160 %description apidocs -l pl.UTF-8
161 Dokumentacja API biblioteki librsvg.
162
163 %package -n vala-librsvg
164 Summary:        Vala API for librsvg library
165 Summary(pl.UTF-8):      API języka Vala do biblioteki librsvg
166 Group:          Development/Libraries
167 Requires:       %{name}-devel = %{epoch}:%{version}-%{release}
168 Requires:       vala >= 2:0.40
169 BuildArch:      noarch
170
171 %description -n vala-librsvg
172 Vala API for librsvg library.
173
174 %description -n vala-librsvg -l pl.UTF-8
175 API języka Vala do biblioteki librsvg.
176
177 %prep
178 %setup -q
179 %patch0 -p1
180 %patch1 -p1
181
182 %if %{without apidocs}
183 cat <<EOF > gtk-doc.make
184 CLEANFILES=
185 EXTRA_DIST=
186 EOF
187 cat <<EOF >> acinclude.m4
188 AC_DEFUN([GTK_DOC_CHECK],[
189 AM_CONDITIONAL([ENABLE_GTK_DOC], [/bin/false])
190 ])
191 EOF
192 %endif
193
194 %ifarch x32
195 %{__sed} -i -e 's/test "\?x\?\$cross_compiling"\? = "\?x\?yes"\?/true/' configure.ac
196 %endif
197
198 %build
199 %{?with_apidocs:%{__gtkdocize}}
200 %{__libtoolize}
201 %{__aclocal} -I m4
202 %{__autoconf}
203 %{__autoheader}
204 %{__automake}
205 %configure \
206 %ifarch x32
207         RUST_TARGET=x86_64-unknown-linux-gnux32 \
208 %endif
209         %{__enable_disable apidocs gtk-doc} \
210         --enable-introspection \
211         --disable-silent-rules \
212         %{__enable_disable static_libs static} \
213         %{?with_vala:--enable-vala} \
214         --with-html-dir=%{_gtkdocdir}/%{name}
215 %{__make}
216
217 %install
218 rm -rf $RPM_BUILD_ROOT
219
220 %{__make} install \
221         DESTDIR=$RPM_BUILD_ROOT \
222         pkgconfigdir=%{_pkgconfigdir}
223
224 %{__rm} $RPM_BUILD_ROOT%{_libdir}/gdk-pixbuf-2.0/2.*.*/loaders/*.la
225 %if %{with static_libs}
226 %{__rm} $RPM_BUILD_ROOT%{_libdir}/gdk-pixbuf-2.0/2.*.*/loaders/*.a
227 %endif
228 %{__rm} $RPM_BUILD_ROOT%{_libdir}/librsvg-2.la
229
230 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}
231
232 %find_lang %{name}
233
234 %clean
235 rm -rf $RPM_BUILD_ROOT
236
237 %post
238 /sbin/ldconfig
239 umask 022
240 %{_bindir}/gdk-pixbuf-query-loaders%{pqext} --update-cache || :
241
242 %postun
243 /sbin/ldconfig
244 umask 022
245 if [ -x %{_bindir}/gdk-pixbuf-query-loaders%{pqext} ]; then
246         %{_bindir}/gdk-pixbuf-query-loaders%{pqext} --update-cache
247 fi
248
249 %files -f %{name}.lang
250 %defattr(644,root,root,755)
251 %doc AUTHORS NEWS
252 %attr(755,root,root) %{_bindir}/rsvg
253 %attr(755,root,root) %{_bindir}/rsvg-convert
254 %attr(755,root,root) %{_libdir}/librsvg-2.so.*.*.*
255 %attr(755,root,root) %ghost %{_libdir}/librsvg-2.so.2
256 %{_libdir}/girepository-1.0/Rsvg-2.0.typelib
257 %attr(755,root,root) %{_libdir}/gdk-pixbuf-2.0/2.*.*/loaders/libpixbufloader-svg.so
258 %{_datadir}/thumbnailers/librsvg.thumbnailer
259 %{_mandir}/man1/rsvg-convert.1*
260
261 %files devel
262 %defattr(644,root,root,755)
263 %attr(755,root,root) %{_libdir}/librsvg-2.so
264 %{_includedir}/librsvg-2.0
265 %{_datadir}/gir-1.0/Rsvg-2.0.gir
266 %{_pkgconfigdir}/librsvg-2.0.pc
267
268 %if %{with static_libs}
269 %files static
270 %defattr(644,root,root,755)
271 %{_libdir}/librsvg-2.a
272 %endif
273
274 %if %{with apidocs}
275 %files apidocs
276 %defattr(644,root,root,755)
277 %{_gtkdocdir}/%{name}
278 %endif
279
280 %if %{with vala}
281 %files -n vala-librsvg
282 %defattr(644,root,root,755)
283 %{_datadir}/vala/vapi/librsvg-2.0.vapi
284 %endif
This page took 0.039542 seconds and 2 git commands to generate.