]> git.pld-linux.org Git - packages/librsvg.git/blob - librsvg.spec
- updated to 2.54.5
[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.5
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:  eb56ffb37a7db48491177eb9bd135cb5
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(post,postun):  gdk-pixbuf2
53 Requires:       cairo-gobject >= 1.16.0
54 Requires:       freetype >= 1:2.8
55 Requires:       gdk-pixbuf2 >= 2.20
56 Requires:       glib2 >= 1:2.50.0
57 Requires:       harfbuzz >= 2.0.0
58 Requires:       libcroco >= 0.6.1
59 Requires:       libxml2 >= 1:2.9.0
60 Requires:       pango >= 1:1.48.11
61 Obsoletes:      browser-plugin-librsvg < 1:2.15
62 Obsoletes:      librsvg-gtk+2 < 1:2.40
63 Obsoletes:      librsvg-gtk+3 < 1:2.46
64 Obsoletes:      librsvg0 < 2
65 Obsoletes:      mozilla-plugin-rsvg < 1:2.16.1
66 # rust archs
67 ExclusiveArch:  %{x8664} %{ix86} x32 aarch64 armv6hl armv7hl armv7hnl
68 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
69
70 # see gdk-pixbuf2.spec for source of these ifdefs
71 %if "%{_lib}" != "lib"
72 %define         libext          %(lib="%{_lib}"; echo ${lib#lib})
73 %define         pqext           -%{libext}
74 %else
75 %define         pqext           %{nil}
76 %endif
77
78 %description
79 An library to render SVG (scalable vector graphics), databased upon
80 libart.
81
82 %description -l pl.UTF-8
83 Biblioteka do renderowania SVG (skalowalnej grafiki wektorowej) oparta
84 na kodzie libart.
85
86 %description -l ru.UTF-8
87 Библиотека SVG, базирующаяся на libart.
88
89 %description -l uk.UTF-8
90 Бібліотека SVG, базована на libart.
91
92 %package devel
93 Summary:        Include files for developing with librsvg
94 Summary(pl.UTF-8):      Pliki nagłówkowe do tworzenia oprogramowania z użyciem librsvg
95 Summary(pt_BR.UTF-8):   Bibliotecas e arquivos de inclusão para desenvolvimento com a librsvg
96 Summary(ru.UTF-8):      Библиотечные линки и файлы заголовков для разработки с librsvg
97 Summary(uk.UTF-8):      Бібліотечні лінки та файли заголовків для розробки з librsvg
98 Group:          X11/Development/Libraries
99 Requires:       %{name} = %{epoch}:%{version}-%{release}
100 Requires:       cairo-gobject-devel >= 1.16.0
101 Requires:       freetype-devel >= 1:2.8
102 Requires:       gdk-pixbuf2-devel >= 2.20
103 Requires:       glib2-devel >= 1:2.50.0
104 Requires:       libcroco-devel >= 0.6.1
105 Requires:       libxml2-devel >= 1:2.9.0
106 Requires:       pango-devel >= 1:1.48.11
107 Obsoletes:      librsvg0-devel < 2
108
109 %description devel
110 This package provides the necessary development libraries and include
111 files to allow you to develop with librsvg.
112
113 %description devel -l pl.UTF-8
114 Pakiet zawiera pliki nagłówkowe potrzebne do tworzenia oprogramowania
115 z wykorzystaniem librsvg.
116
117 %description devel -l pt_BR.UTF-8
118 Este pacote contém os arquivos necessários para desenvolver com base
119 na biblioteca librsvg.
120
121 %description devel -l ru.UTF-8
122 Этот пакет содержит необходимые файлы для разработки программ с
123 использованием librsvg.
124
125 %description devel -l uk.UTF-8
126 Цей пакет містить необхідні файли для розробки програм з використанням
127 librsvg.
128
129 %package static
130 Summary:        Static libraries for developing with librsvg
131 Summary(es.UTF-8):      Archivos estáticos necesarios para el desarrollo de aplicaciones con librsvg
132 Summary(pl.UTF-8):      Statyczne biblioteki librsvg
133 Summary(pt_BR.UTF-8):   Arquivos estáticos necessários para o desenvolvimento de aplicações com librsvg
134 Group:          X11/Development/Libraries
135 Requires:       %{name}-devel = %{epoch}:%{version}-%{release}
136
137 %description static
138 This package contains static version of librsvg libraries.
139
140 %description static -l pl.UTF-8
141 Statyczna wersja bibliotek librsvg.
142
143 %description static -l pt_BR.UTF-8
144 Bibliotecas estáticas para o desenvolvimento de aplicações com
145 librsvg.
146
147 %package apidocs
148 Summary:        librsvg API documentation
149 Summary(pl.UTF-8):      Dokumentacja API biblioteki librsvg
150 Group:          Documentation
151 Requires:       gtk-doc-common
152 BuildArch:      noarch
153
154 %description apidocs
155 librsvg API documentation.
156
157 %description apidocs -l pl.UTF-8
158 Dokumentacja API biblioteki librsvg.
159
160 %package -n vala-librsvg
161 Summary:        Vala API for librsvg library
162 Summary(pl.UTF-8):      API języka Vala do biblioteki librsvg
163 Group:          Development/Libraries
164 Requires:       %{name}-devel = %{epoch}:%{version}-%{release}
165 Requires:       vala >= 2:0.40
166 BuildArch:      noarch
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
174 %prep
175 %setup -q
176 %patch0 -p1
177
178 %ifarch x32
179 %{__sed} -i -e 's/test "\?x\?\$cross_compiling"\? = "\?x\?yes"\?/true/' configure.ac
180 %endif
181
182 %build
183 %{__libtoolize}
184 %{__aclocal} -I m4
185 %{__autoconf}
186 %{__autoheader}
187 %{__automake}
188 %configure \
189 %ifarch x32
190         RUST_TARGET=x86_64-unknown-linux-gnux32 \
191 %endif
192         %{__enable_disable apidocs gtk-doc} \
193         --enable-introspection \
194         --disable-silent-rules \
195         %{__enable_disable static_libs static} \
196         %{?with_vala:--enable-vala}
197
198 %{__make}
199
200 %install
201 rm -rf $RPM_BUILD_ROOT
202
203 %{__make} install \
204         DESTDIR=$RPM_BUILD_ROOT \
205         pkgconfigdir=%{_pkgconfigdir}
206
207 %{__rm} $RPM_BUILD_ROOT%{_libdir}/gdk-pixbuf-2.0/2.*.*/loaders/*.la
208 %if %{with static_libs}
209 %{__rm} $RPM_BUILD_ROOT%{_libdir}/gdk-pixbuf-2.0/2.*.*/loaders/*.a
210 %endif
211 %{__rm} $RPM_BUILD_ROOT%{_libdir}/librsvg-2.la
212
213 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}
214
215 %if %{with apidocs}
216 install -d $RPM_BUILD_ROOT%{_gtkdocdir}
217 %{__mv} $RPM_BUILD_ROOT%{_datadir}/doc/Rsvg-2.0 $RPM_BUILD_ROOT%{_gtkdocdir}
218 %endif
219 # README.md packaged as %doc, the rest useful just for developers
220 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/librsvg
221
222 %clean
223 rm -rf $RPM_BUILD_ROOT
224
225 %post
226 /sbin/ldconfig
227 umask 022
228 %{_bindir}/gdk-pixbuf-query-loaders%{pqext} --update-cache || :
229
230 %postun
231 /sbin/ldconfig
232 umask 022
233 if [ -x %{_bindir}/gdk-pixbuf-query-loaders%{pqext} ]; then
234         %{_bindir}/gdk-pixbuf-query-loaders%{pqext} --update-cache
235 fi
236
237 %files
238 %defattr(644,root,root,755)
239 %doc AUTHORS NEWS README.md
240 %attr(755,root,root) %{_bindir}/rsvg
241 %attr(755,root,root) %{_bindir}/rsvg-convert
242 %attr(755,root,root) %{_libdir}/librsvg-2.so.*.*.*
243 %attr(755,root,root) %ghost %{_libdir}/librsvg-2.so.2
244 %{_libdir}/girepository-1.0/Rsvg-2.0.typelib
245 %attr(755,root,root) %{_libdir}/gdk-pixbuf-2.0/2.*.*/loaders/libpixbufloader-svg.so
246 %{_datadir}/thumbnailers/librsvg.thumbnailer
247 %{_mandir}/man1/rsvg-convert.1*
248
249 %files devel
250 %defattr(644,root,root,755)
251 %attr(755,root,root) %{_libdir}/librsvg-2.so
252 %{_includedir}/librsvg-2.0
253 %{_datadir}/gir-1.0/Rsvg-2.0.gir
254 %{_pkgconfigdir}/librsvg-2.0.pc
255
256 %if %{with static_libs}
257 %files static
258 %defattr(644,root,root,755)
259 %{_libdir}/librsvg-2.a
260 %endif
261
262 %if %{with apidocs}
263 %files apidocs
264 %defattr(644,root,root,755)
265 %{_gtkdocdir}/Rsvg-2.0
266 %endif
267
268 %if %{with vala}
269 %files -n vala-librsvg
270 %defattr(644,root,root,755)
271 %{_datadir}/vala/vapi/librsvg-2.0.vapi
272 %endif
This page took 0.074218 seconds and 4 git commands to generate.