]> git.pld-linux.org Git - packages/librsvg.git/blob - librsvg.spec
756148d3ba7dd6a1cb91a7b672f87f8b8bcdac3e
[packages/librsvg.git] / librsvg.spec
1 #
2 # Conditional build
3 %bcond_without  apidocs         # disable gtk-doc
4 %bcond_without  gtk2            # legacy gtk+2 support
5 %bcond_without  static_libs     # don't build static library
6 %bcond_without  vala            # Vala API (vala up to 0.38.x already contains librsvg-2.0.vapi)
7
8 %define         mver    2.44
9 %define         pver    13
10 Summary:        A Raph's Library for Rendering SVG Data
11 Summary(pl.UTF-8):      Biblioteka Raph's SVG do renderowania danych SVG
12 Summary(pt_BR.UTF-8):   Biblioteca SVG
13 Summary(ru.UTF-8):      SVG библиотека
14 Summary(uk.UTF-8):      SVG бібліотека
15 Name:           librsvg
16 Version:        %{mver}.%{pver}
17 Release:        1
18 Epoch:          1
19 License:        LGPL v2+
20 Group:          X11/Libraries
21 Source0:        http://ftp.gnome.org/pub/GNOME/sources/librsvg/%{mver}/%{name}-%{version}.tar.xz
22 # Source0-md5:  5be17e248dfbf0259c14922a52193b26
23 Source1:        rsvg
24 Patch0:         x32.patch
25 URL:            http://librsvg.sourceforge.net/
26 BuildRequires:  autoconf >= 2.50
27 BuildRequires:  automake >= 1:1.9
28 BuildRequires:  cairo-devel >= 1.15.12
29 BuildRequires:  cargo
30 BuildRequires:  docbook-dtd412-xml
31 # pkgconfig(freetype) >= 20.0.14
32 BuildRequires:  freetype-devel >= 1:2.8
33 BuildRequires:  gdk-pixbuf2-devel >= 2.20
34 BuildRequires:  glib2-devel >= 1:2.48.0
35 BuildRequires:  gobject-introspection-devel >= 0.10.8
36 %{?with_gtk2:BuildRequires:     gtk+2-devel >= 2:2.16.0}
37 BuildRequires:  gtk+3-devel >= 3.10.0
38 %{?with_apidocs:BuildRequires:  gtk-doc >= 1.13}
39 %{?with_apidocs:BuildRequires:  gtk-doc-automake >= 1.13}
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.38.0
44 BuildRequires:  pkgconfig
45 BuildRequires:  rpm-pythonprov
46 BuildRequires:  rust >= 1.27
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 >= 1.15.12
53 Requires:       freetype >= 1:2.8
54 Requires:       gdk-pixbuf2 >= 2.20
55 Requires:       glib2 >= 1:2.48.0
56 Requires:       libcroco >= 0.6.1
57 Requires:       libxml2 >= 1:2.9.0
58 Requires:       pango >= 1:1.38.0
59 Obsoletes:      browser-plugin-librsvg
60 Obsoletes:      librsvg-gtk+2
61 Obsoletes:      librsvg0
62 Obsoletes:      mozilla-plugin-rsvg
63 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
64
65 # see gdk-pixbuf2.spec for source of these ifdefs
66 %if "%{_lib}" != "lib"
67 %define         libext          %(lib="%{_lib}"; echo ${lib#lib})
68 %define         pqext           -%{libext}
69 %else
70 %define         pqext           %{nil}
71 %endif
72
73 %description
74 An library to render SVG (scalable vector graphics), databased upon
75 libart.
76
77 %description -l pl.UTF-8
78 Biblioteka do renderowania SVG (skalowalnej grafiki wektorowej) oparta
79 na kodzie libart.
80
81 %description -l ru.UTF-8
82 Библиотека SVG, базирующаяся на libart.
83
84 %description -l uk.UTF-8
85 Бібліотека SVG, базована на libart.
86
87 %package devel
88 Summary:        Include files for developing with librsvg
89 Summary(pl.UTF-8):      Pliki nagłówkowe do tworzenia oprogramowania z użyciem librsvg
90 Summary(pt_BR.UTF-8):   Bibliotecas e arquivos de inclusão para desenvolvimento com a librsvg
91 Summary(ru.UTF-8):      Библиотечные линки и файлы заголовков для разработки с librsvg
92 Summary(uk.UTF-8):      Бібліотечні лінки та файли заголовків для розробки з librsvg
93 Group:          X11/Development/Libraries
94 Requires:       %{name} = %{epoch}:%{version}-%{release}
95 Requires:       cairo-devel >= 1.15.12
96 Requires:       freetype-devel >= 1:2.8
97 Requires:       gdk-pixbuf2-devel >= 2.20
98 Requires:       glib2-devel >= 1:2.48.0
99 Requires:       gtk+3-devel >= 3.10.0
100 Requires:       libcroco-devel >= 0.6.1
101 Requires:       libxml2-devel >= 1:2.9.0
102 Requires:       pango-devel >= 1:1.38.0
103 Obsoletes:      librsvg0-devel
104
105 %description devel
106 This package provides the necessary development libraries and include
107 files to allow you to develop with librsvg.
108
109 %description devel -l pl.UTF-8
110 Pakiet zawiera pliki nagłówkowe potrzebne do tworzenia oprogramowania
111 z wykorzystaniem librsvg.
112
113 %description devel -l pt_BR.UTF-8
114 Este pacote contém os arquivos necessários para desenvolver com base
115 na biblioteca librsvg.
116
117 %description devel -l ru.UTF-8
118 Этот пакет содержит необходимые файлы для разработки программ с
119 использованием librsvg.
120
121 %description devel -l uk.UTF-8
122 Цей пакет містить необхідні файли для розробки програм з використанням
123 librsvg.
124
125 %package static
126 Summary:        Static libraries for developing with librsvg
127 Summary(es.UTF-8):      Archivos estáticos necesarios para el desarrollo de aplicaciones con librsvg
128 Summary(pl.UTF-8):      Statyczne biblioteki librsvg
129 Summary(pt_BR.UTF-8):   Arquivos estáticos necessários para o desenvolvimento de aplicações com librsvg
130 Group:          X11/Development/Libraries
131 Requires:       %{name}-devel = %{epoch}:%{version}-%{release}
132
133 %description static
134 This package contains static version of librsvg libraries.
135
136 %description static -l pl.UTF-8
137 Statyczna wersja bibliotek librsvg.
138
139 %description static -l pt_BR.UTF-8
140 Bibliotecas estáticas para o desenvolvimento de aplicações com
141 librsvg.
142
143 %package apidocs
144 Summary:        librsvg API documentation
145 Summary(pl.UTF-8):      Dokumentacja API biblioteki librsvg
146 Group:          Documentation
147 Requires:       gtk-doc-common
148 %if "%{_rpmversion}" >= "5"
149 BuildArch:      noarch
150 %endif
151
152 %description apidocs
153 librsvg API documentation.
154
155 %description apidocs -l pl.UTF-8
156 Dokumentacja API biblioteki librsvg.
157
158 %package -n vala-librsvg
159 Summary:        Vala API for librsvg library
160 Summary(pl.UTF-8):      API języka Vala do biblioteki librsvg
161 Group:          Development/Libraries
162 Requires:       vala >= 2:0.40
163
164 %description -n vala-librsvg
165 Vala API for librsvg library.
166
167 %description -n vala-librsvg -l pl.UTF-8
168 API języka Vala do biblioteki librsvg.
169
170 %package gtk+3
171 Summary:        librsvg/GTK+3 based SVG viewer
172 Summary(pl.UTF-8):      Przeglądarka plików SVG oparta na bibliotekach librsvg/GTK+3
173 Group:          X11/Applications/Graphics
174 Requires:       %{name} = %{epoch}:%{version}-%{release}
175 Requires:       gtk+3 >= 3.10.0
176
177 %description gtk+3
178 librsvg/GTK+3 based SVG viewer.
179
180 %description gtk+3 -l pl.UTF-8
181 Przeglądarka plików SVG oparta na bibliotekach librsvg/GTK+3.
182
183 %prep
184 %setup -q
185 %patch0 -p1
186
187 %if %{without apidocs}
188 echo 'CLEANFILES=' > gtk-doc.make
189 echo 'AC_DEFUN([GTK_DOC_CHECK],[])' >> acinclude.m4
190 %endif
191
192 %build
193 %{?with_apidocs:%{__gtkdocize}}
194 %{__libtoolize}
195 %{__aclocal}
196 %{__autoconf}
197 %{__autoheader}
198 %{__automake}
199 %configure \
200         %{__enable_disable apidocs gtk-doc} \
201         --enable-introspection \
202         --disable-silent-rules \
203         %{__enable_disable static_libs static} \
204         %{?with_vala:--enable-vala} \
205         --with-html-dir=%{_gtkdocdir}/%{name}
206 %{__make}
207
208 %install
209 rm -rf $RPM_BUILD_ROOT
210
211 %{__make} install \
212         DESTDIR=$RPM_BUILD_ROOT \
213         pkgconfigdir=%{_pkgconfigdir}
214
215 %{__rm} $RPM_BUILD_ROOT%{_libdir}/gdk-pixbuf-2.0/2.*.*/loaders/*.{la,a}
216 %{__rm} $RPM_BUILD_ROOT%{_libdir}/librsvg-2.la
217
218 %{__ln_s} rsvg-view-3 $RPM_BUILD_ROOT%{_bindir}/rsvg-view
219
220 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}
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
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}/%{name}
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
273
274 %files gtk+3
275 %defattr(644,root,root,755)
276 %attr(755,root,root) %{_bindir}/rsvg-view
277 %attr(755,root,root) %{_bindir}/rsvg-view-3
This page took 0.063814 seconds and 3 git commands to generate.