]> git.pld-linux.org Git - packages/librsvg.git/blob - librsvg.spec
up to 2.54.0
[packages/librsvg.git] / librsvg.spec
1 #
2 # Conditional build
3 %bcond_without  static_libs     # static library
4 %bcond_without  vala            # Vala API (vala up to 0.38.x already contains librsvg-2.0.vapi)
5
6 %define         mver    2.54
7 %define         pver    0
8 Summary:        A Raph's Library for Rendering SVG Data
9 Summary(pl.UTF-8):      Biblioteka Raph's SVG do renderowania danych SVG
10 Summary(pt_BR.UTF-8):   Biblioteca SVG
11 Summary(ru.UTF-8):      SVG библиотека
12 Summary(uk.UTF-8):      SVG бібліотека
13 Name:           librsvg
14 Version:        %{mver}.%{pver}
15 Release:        1
16 Epoch:          1
17 License:        LGPL v2+
18 Group:          X11/Libraries
19 Source0:        https://download.gnome.org/sources/librsvg/%{mver}/%{name}-%{version}.tar.xz
20 # Source0-md5:  22328b7922ab04836959f669ecef1ea7
21 Source1:        rsvg
22 Patch0:         x32.patch
23 URL:            https://wiki.gnome.org/Projects/LibRsvg
24 BuildRequires:  autoconf >= 2.69
25 BuildRequires:  automake >= 1:1.9
26 BuildRequires:  cairo-devel >= 1.16.0
27 BuildRequires:  cairo-gobject-devel >= 1.16.0
28 BuildRequires:  cargo
29 BuildRequires:  docbook-dtd43-xml
30 BuildRequires:  docutils
31 BuildRequires:  fontconfig-devel
32 # pkgconfig(freetype) >= 20.0.14
33 BuildRequires:  freetype-devel >= 1:2.8
34 BuildRequires:  gdk-pixbuf2-devel >= 2.20
35 BuildRequires:  gi-docgen
36 BuildRequires:  glib2-devel >= 1:2.50.0
37 BuildRequires:  gobject-introspection-devel >= 0.10.8
38 BuildRequires:  harfbuzz-devel >= 2.0.0
39 BuildRequires:  libcroco-devel >= 0.6.1
40 BuildRequires:  libtool >= 2:2.0
41 BuildRequires:  libxml2-devel >= 1:2.9.0
42 BuildRequires:  pango-devel >= 1:1.48.11
43 BuildRequires:  pkgconfig
44 BuildRequires:  rpm-build >= 4.6
45 BuildRequires:  rpm-pythonprov
46 BuildRequires:  rpmbuild(macros) >= 1.752
47 BuildRequires:  rust >= 1.52
48 BuildRequires:  sed >= 4.0
49 BuildRequires:  tar >= 1:1.22
50 %{?with_vala:BuildRequires:     vala >= 2:0.18}
51 BuildRequires:  xz
52 Requires(post,postun):  /sbin/ldconfig
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-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 install -d $RPM_BUILD_ROOT%{_gtkdocdir}
215 %{__mv} $RPM_BUILD_ROOT%{_datadir}/doc/librsvg $RPM_BUILD_ROOT%{_gtkdocdir}
216
217 %clean
218 rm -rf $RPM_BUILD_ROOT
219
220 %post
221 /sbin/ldconfig
222 umask 022
223 %{_bindir}/gdk-pixbuf-query-loaders%{pqext} --update-cache || :
224
225 %postun
226 /sbin/ldconfig
227 umask 022
228 if [ -x %{_bindir}/gdk-pixbuf-query-loaders%{pqext} ]; then
229         %{_bindir}/gdk-pixbuf-query-loaders%{pqext} --update-cache
230 fi
231
232 %files
233 %defattr(644,root,root,755)
234 %doc AUTHORS NEWS
235 %attr(755,root,root) %{_bindir}/rsvg
236 %attr(755,root,root) %{_bindir}/rsvg-convert
237 %attr(755,root,root) %{_libdir}/librsvg-2.so.*.*.*
238 %attr(755,root,root) %ghost %{_libdir}/librsvg-2.so.2
239 %{_libdir}/girepository-1.0/Rsvg-2.0.typelib
240 %attr(755,root,root) %{_libdir}/gdk-pixbuf-2.0/2.*.*/loaders/libpixbufloader-svg.so
241 %{_datadir}/thumbnailers/librsvg.thumbnailer
242 %{_mandir}/man1/rsvg-convert.1*
243
244 %files devel
245 %defattr(644,root,root,755)
246 %attr(755,root,root) %{_libdir}/librsvg-2.so
247 %{_includedir}/librsvg-2.0
248 %{_datadir}/gir-1.0/Rsvg-2.0.gir
249 %{_pkgconfigdir}/librsvg-2.0.pc
250
251 %if %{with static_libs}
252 %files static
253 %defattr(644,root,root,755)
254 %{_libdir}/librsvg-2.a
255 %endif
256
257 %files apidocs
258 %defattr(644,root,root,755)
259 %{_gtkdocdir}/%{name}
260
261 %if %{with vala}
262 %files -n vala-librsvg
263 %defattr(644,root,root,755)
264 %{_datadir}/vala/vapi/librsvg-2.0.vapi
265 %endif
This page took 0.055292 seconds and 3 git commands to generate.