]> git.pld-linux.org Git - packages/librsvg.git/blob - librsvg.spec
a451521f8d694eb393eda0c5d8175d5c31ff2de3
[packages/librsvg.git] / librsvg.spec
1 #
2 # Conditional build
3 %bcond_without  apidocs         # disable gtk-doc
4 %bcond_without  static_libs     # don't build 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.50
8 %define         pver    1
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:        http://ftp.gnome.org/pub/GNOME/sources/librsvg/%{mver}/%{name}-%{version}.tar.xz
21 # Source0-md5:  61624dced1f1a53383cf72e752e154a4
22 Source1:        rsvg
23 Patch0:         x32.patch
24 Patch1:         %{name}-gtkdoc.patch
25 URL:            http://librsvg.sourceforge.net/
26 BuildRequires:  autoconf >= 2.50
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:  gettext-tools >= 0.19.8
37 BuildRequires:  glib2-devel >= 1:2.50.0
38 BuildRequires:  gobject-introspection-devel >= 0.10.8
39 %{?with_apidocs:BuildRequires:  gtk-doc >= 1.13}
40 %{?with_apidocs:BuildRequires:  gtk-doc-automake >= 1.13}
41 BuildRequires:  harfbuzz-devel >= 2.0.0
42 BuildRequires:  libcroco-devel >= 0.6.1
43 BuildRequires:  libtool >= 2:2.0
44 BuildRequires:  libxml2-devel >= 1:2.9.0
45 BuildRequires:  pango-devel >= 1:1.38.0
46 BuildRequires:  pkgconfig
47 BuildRequires:  rpm-pythonprov
48 BuildRequires:  rust >= 1.40
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.38.0
62 Obsoletes:      browser-plugin-librsvg
63 Obsoletes:      librsvg-gtk+2
64 Obsoletes:      librsvg-gtk+3
65 Obsoletes:      librsvg0
66 Obsoletes:      mozilla-plugin-rsvg
67 # rust archs
68 ExclusiveArch:  %{x8664} %{ix86} aarch64
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.38.0
108 Obsoletes:      librsvg0-devel
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 %if "%{_rpmversion}" >= "4.6"
154 BuildArch:      noarch
155 %endif
156
157 %description apidocs
158 librsvg API documentation.
159
160 %description apidocs -l pl.UTF-8
161 Dokumentacja API biblioteki librsvg.
162
163 %package -n vala-librsvg
164 Summary:        Vala API for librsvg library
165 Summary(pl.UTF-8):      API języka Vala do biblioteki librsvg
166 Group:          Development/Libraries
167 Requires:       %{name}-devel = %{epoch}:%{version}-%{release}
168 Requires:       vala >= 2:0.40
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 echo 'CLEANFILES=' > gtk-doc.make
183 echo 'AC_DEFUN([GTK_DOC_CHECK],[])' >> acinclude.m4
184 %endif
185
186 %build
187 %{?with_apidocs:%{__gtkdocize}}
188 %{__libtoolize}
189 %{__aclocal} -I m4
190 %{__autoconf}
191 %{__autoheader}
192 %{__automake}
193 %configure \
194         %{__enable_disable apidocs gtk-doc} \
195         --enable-introspection \
196         --disable-silent-rules \
197         %{__enable_disable static_libs static} \
198         %{?with_vala:--enable-vala} \
199         --with-html-dir=%{_gtkdocdir}/%{name}
200 %{__make}
201
202 %install
203 rm -rf $RPM_BUILD_ROOT
204
205 %{__make} install \
206         DESTDIR=$RPM_BUILD_ROOT \
207         pkgconfigdir=%{_pkgconfigdir}
208
209 %{__rm} $RPM_BUILD_ROOT%{_libdir}/gdk-pixbuf-2.0/2.*.*/loaders/*.la
210 %if %{with static_libs}
211 %{__rm} $RPM_BUILD_ROOT%{_libdir}/gdk-pixbuf-2.0/2.*.*/loaders/*.a
212 %endif
213 %{__rm} $RPM_BUILD_ROOT%{_libdir}/librsvg-2.la
214
215 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}
216
217 %find_lang %{name}
218
219 %clean
220 rm -rf $RPM_BUILD_ROOT
221
222 %post
223 /sbin/ldconfig
224 umask 022
225 %{_bindir}/gdk-pixbuf-query-loaders%{pqext} --update-cache || :
226
227 %postun
228 /sbin/ldconfig
229 umask 022
230 if [ -x %{_bindir}/gdk-pixbuf-query-loaders%{pqext} ]; then
231         %{_bindir}/gdk-pixbuf-query-loaders%{pqext} --update-cache
232 fi
233
234 %files -f %{name}.lang
235 %defattr(644,root,root,755)
236 %doc AUTHORS NEWS
237 %attr(755,root,root) %{_bindir}/rsvg
238 %attr(755,root,root) %{_bindir}/rsvg-convert
239 %attr(755,root,root) %{_libdir}/librsvg-2.so.*.*.*
240 %attr(755,root,root) %ghost %{_libdir}/librsvg-2.so.2
241 %{_libdir}/girepository-1.0/Rsvg-2.0.typelib
242 %attr(755,root,root) %{_libdir}/gdk-pixbuf-2.0/2.*.*/loaders/libpixbufloader-svg.so
243 %{_datadir}/thumbnailers/librsvg.thumbnailer
244 %{_mandir}/man1/rsvg-convert.1*
245
246 %files devel
247 %defattr(644,root,root,755)
248 %attr(755,root,root) %{_libdir}/librsvg-2.so
249 %{_includedir}/librsvg-2.0
250 %{_datadir}/gir-1.0/Rsvg-2.0.gir
251 %{_pkgconfigdir}/librsvg-2.0.pc
252
253 %if %{with static_libs}
254 %files static
255 %defattr(644,root,root,755)
256 %{_libdir}/librsvg-2.a
257 %endif
258
259 %if %{with apidocs}
260 %files apidocs
261 %defattr(644,root,root,755)
262 %{_gtkdocdir}/%{name}
263 %endif
264
265 %if %{with vala}
266 %files -n vala-librsvg
267 %defattr(644,root,root,755)
268 %{_datadir}/vala/vapi/librsvg-2.0.vapi
269 %endif
This page took 0.066678 seconds and 2 git commands to generate.