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