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