]> git.pld-linux.org Git - packages/librsvg.git/blob - librsvg.spec
bring back apidocs bcond
[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 %define         mver    2.54
8 %define         pver    2
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:  f9dfb2b16e9e747394ef9019b256b755
22 Source1:        rsvg
23 Patch0:         x32.patch
24 URL:            https://wiki.gnome.org/Projects/LibRsvg
25 BuildRequires:  autoconf >= 2.69
26 BuildRequires:  automake >= 1:1.9
27 BuildRequires:  cairo-devel >= 1.16.0
28 BuildRequires:  cairo-gobject-devel >= 1.16.0
29 BuildRequires:  cargo
30 BuildRequires:  docbook-dtd43-xml
31 BuildRequires:  docutils
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 %{?with_apidocs:BuildRequires:  gi-docgen}
37 BuildRequires:  glib2-devel >= 1:2.50.0
38 BuildRequires:  gobject-introspection-devel >= 0.10.8
39 BuildRequires:  harfbuzz-devel >= 2.0.0
40 BuildRequires:  libcroco-devel >= 0.6.1
41 BuildRequires:  libtool >= 2:2.0
42 BuildRequires:  libxml2-devel >= 1:2.9.0
43 BuildRequires:  pango-devel >= 1:1.48.11
44 BuildRequires:  pkgconfig
45 BuildRequires:  rpm-build >= 4.6
46 BuildRequires:  rpm-pythonprov
47 BuildRequires:  rpmbuild(macros) >= 1.752
48 BuildRequires:  rust >= 1.56
49 BuildRequires:  sed >= 4.0
50 BuildRequires:  tar >= 1:1.22
51 %{?with_vala:BuildRequires:     vala >= 2:0.18}
52 BuildRequires:  xz
53 Requires(post,postun):  /sbin/ldconfig
54 Requires:       cairo-gobject >= 1.16.0
55 Requires:       freetype >= 1:2.8
56 Requires:       gdk-pixbuf2 >= 2.20
57 Requires:       glib2 >= 1:2.50.0
58 Requires:       harfbuzz >= 2.0.0
59 Requires:       libcroco >= 0.6.1
60 Requires:       libxml2 >= 1:2.9.0
61 Requires:       pango >= 1:1.48.11
62 Obsoletes:      browser-plugin-librsvg < 1:2.15
63 Obsoletes:      librsvg-gtk+2 < 1:2.40
64 Obsoletes:      librsvg-gtk+3 < 1:2.46
65 Obsoletes:      librsvg0 < 2
66 Obsoletes:      mozilla-plugin-rsvg < 1:2.16.1
67 # rust archs
68 ExclusiveArch:  %{x8664} %{ix86} x32 aarch64 armv6hl armv7hl armv7hnl
69 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
70
71 # see gdk-pixbuf2.spec for source of these ifdefs
72 %if "%{_lib}" != "lib"
73 %define         libext          %(lib="%{_lib}"; echo ${lib#lib})
74 %define         pqext           -%{libext}
75 %else
76 %define         pqext           %{nil}
77 %endif
78
79 %description
80 An library to render SVG (scalable vector graphics), databased upon
81 libart.
82
83 %description -l pl.UTF-8
84 Biblioteka do renderowania SVG (skalowalnej grafiki wektorowej) oparta
85 na kodzie libart.
86
87 %description -l ru.UTF-8
88 Библиотека SVG, базирующаяся на libart.
89
90 %description -l uk.UTF-8
91 Бібліотека SVG, базована на libart.
92
93 %package devel
94 Summary:        Include files for developing with librsvg
95 Summary(pl.UTF-8):      Pliki nagłówkowe do tworzenia oprogramowania z użyciem librsvg
96 Summary(pt_BR.UTF-8):   Bibliotecas e arquivos de inclusão para desenvolvimento com a librsvg
97 Summary(ru.UTF-8):      Библиотечные линки и файлы заголовков для разработки с librsvg
98 Summary(uk.UTF-8):      Бібліотечні лінки та файли заголовків для розробки з librsvg
99 Group:          X11/Development/Libraries
100 Requires:       %{name} = %{epoch}:%{version}-%{release}
101 Requires:       cairo-gobject-devel >= 1.16.0
102 Requires:       freetype-devel >= 1:2.8
103 Requires:       gdk-pixbuf2-devel >= 2.20
104 Requires:       glib2-devel >= 1:2.50.0
105 Requires:       libcroco-devel >= 0.6.1
106 Requires:       libxml2-devel >= 1:2.9.0
107 Requires:       pango-devel >= 1:1.48.11
108 Obsoletes:      librsvg0-devel < 2
109
110 %description devel
111 This package provides the necessary development libraries and include
112 files to allow you to develop with librsvg.
113
114 %description devel -l pl.UTF-8
115 Pakiet zawiera pliki nagłówkowe potrzebne do tworzenia oprogramowania
116 z wykorzystaniem librsvg.
117
118 %description devel -l pt_BR.UTF-8
119 Este pacote contém os arquivos necessários para desenvolver com base
120 na biblioteca librsvg.
121
122 %description devel -l ru.UTF-8
123 Этот пакет содержит необходимые файлы для разработки программ с
124 использованием librsvg.
125
126 %description devel -l uk.UTF-8
127 Цей пакет містить необхідні файли для розробки програм з використанням
128 librsvg.
129
130 %package static
131 Summary:        Static libraries for developing with librsvg
132 Summary(es.UTF-8):      Archivos estáticos necesarios para el desarrollo de aplicaciones con librsvg
133 Summary(pl.UTF-8):      Statyczne biblioteki librsvg
134 Summary(pt_BR.UTF-8):   Arquivos estáticos necessários para o desenvolvimento de aplicações com librsvg
135 Group:          X11/Development/Libraries
136 Requires:       %{name}-devel = %{epoch}:%{version}-%{release}
137
138 %description static
139 This package contains static version of librsvg libraries.
140
141 %description static -l pl.UTF-8
142 Statyczna wersja bibliotek librsvg.
143
144 %description static -l pt_BR.UTF-8
145 Bibliotecas estáticas para o desenvolvimento de aplicações com
146 librsvg.
147
148 %package apidocs
149 Summary:        librsvg API documentation
150 Summary(pl.UTF-8):      Dokumentacja API biblioteki librsvg
151 Group:          Documentation
152 Requires:       gtk-doc-common
153 BuildArch:      noarch
154
155 %description apidocs
156 librsvg API documentation.
157
158 %description apidocs -l pl.UTF-8
159 Dokumentacja API biblioteki librsvg.
160
161 %package -n vala-librsvg
162 Summary:        Vala API for librsvg library
163 Summary(pl.UTF-8):      API języka Vala do biblioteki librsvg
164 Group:          Development/Libraries
165 Requires:       %{name}-devel = %{epoch}:%{version}-%{release}
166 Requires:       vala >= 2:0.40
167 BuildArch:      noarch
168
169 %description -n vala-librsvg
170 Vala API for librsvg library.
171
172 %description -n vala-librsvg -l pl.UTF-8
173 API języka Vala do biblioteki librsvg.
174
175 %prep
176 %setup -q
177 %patch0 -p1
178
179 %ifarch x32
180 %{__sed} -i -e 's/test "\?x\?\$cross_compiling"\? = "\?x\?yes"\?/true/' configure.ac
181 %endif
182
183 %build
184 %{__libtoolize}
185 %{__aclocal} -I m4
186 %{__autoconf}
187 %{__autoheader}
188 %{__automake}
189 %configure \
190 %ifarch x32
191         RUST_TARGET=x86_64-unknown-linux-gnux32 \
192 %endif
193         %{__enable_disable apidocs gtk-doc} \
194         --enable-introspection \
195         --disable-silent-rules \
196         %{__enable_disable static_libs static} \
197         %{?with_vala:--enable-vala}
198
199 %{__make}
200
201 %install
202 rm -rf $RPM_BUILD_ROOT
203
204 %{__make} install \
205         DESTDIR=$RPM_BUILD_ROOT \
206         pkgconfigdir=%{_pkgconfigdir}
207
208 %{__rm} $RPM_BUILD_ROOT%{_libdir}/gdk-pixbuf-2.0/2.*.*/loaders/*.la
209 %if %{with static_libs}
210 %{__rm} $RPM_BUILD_ROOT%{_libdir}/gdk-pixbuf-2.0/2.*.*/loaders/*.a
211 %endif
212 %{__rm} $RPM_BUILD_ROOT%{_libdir}/librsvg-2.la
213
214 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}
215
216 %if %{with apidocs}
217 install -d $RPM_BUILD_ROOT%{_gtkdocdir}
218 %{__mv} $RPM_BUILD_ROOT%{_datadir}/doc/librsvg $RPM_BUILD_ROOT%{_gtkdocdir}
219 %endif
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
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}/%{name}
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.073097 seconds and 3 git commands to generate.