]> git.pld-linux.org Git - packages/librsvg.git/blob - librsvg.spec
f5b133fe2999d51b74b697df27a5015fb84a1ceb
[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_with     vala            # Vala API (vala up to 0.30 already contains librsvg-2.0.vapi)
7
8 %define         mver    2.40
9 %define         pver    11
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:  6b9cd1a048210a8e95bdc04c85fe997f
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.2.0
29 BuildRequires:  docbook-dtd412-xml
30 BuildRequires:  gdk-pixbuf2-devel >= 2.20
31 BuildRequires:  glib2-devel >= 1:2.24.0
32 BuildRequires:  gobject-introspection-devel >= 0.10.8
33 %{?with_gtk2:BuildRequires:     gtk+2-devel >= 2:2.16.0}
34 BuildRequires:  gtk+3-devel >= 3.10.0
35 %{?with_apidocs:BuildRequires:  gtk-doc >= 1.13}
36 %{?with_apidocs:BuildRequires:  gtk-doc-automake >= 1.13}
37 BuildRequires:  libcroco-devel >= 0.6.1
38 BuildRequires:  libtool >= 2:2.0
39 BuildRequires:  libxml2-devel >= 1:2.7.0
40 BuildRequires:  pango-devel >= 1:1.32.6
41 BuildRequires:  pkgconfig
42 BuildRequires:  rpm-pythonprov
43 BuildRequires:  sed >= 4.0
44 BuildRequires:  tar >= 1:1.22
45 %{?with_vala:BuildRequires:     vala >= 2:0.18}
46 BuildRequires:  xz
47 Requires(post,postun):  /sbin/ldconfig
48 Requires:       cairo >= 1.2.0
49 Requires:       gdk-pixbuf2 >= 2.20
50 Requires:       glib2 >= 1:2.24.0
51 Requires:       libcroco >= 0.6.1
52 Requires:       libxml2 >= 1:2.7.0
53 Requires:       pango >= 1:1.32.6
54 Obsoletes:      browser-plugin-librsvg
55 Obsoletes:      librsvg-gtk+2
56 Obsoletes:      librsvg0
57 Obsoletes:      mozilla-plugin-rsvg
58 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
59
60 # see gdk-pixbuf2.spec for source of these ifdefs
61 %if "%{_lib}" != "lib"
62 %define         libext          %(lib="%{_lib}"; echo ${lib#lib})
63 %define         pqext           -%{libext}
64 %else
65 %define         pqext           %{nil}
66 %endif
67
68 %description
69 An library to render SVG (scalable vector graphics), databased upon
70 libart.
71
72 %description -l pl.UTF-8
73 Biblioteka do renderowania SVG (skalowalnej grafiki wektorowej) oparta
74 na kodzie libart.
75
76 %description -l ru.UTF-8
77 Библиотека SVG, базирующаяся на libart.
78
79 %description -l uk.UTF-8
80 Бібліотека SVG, базована на libart.
81
82 %package devel
83 Summary:        Include files for developing with librsvg
84 Summary(pl.UTF-8):      Pliki nagłówkowe do tworzenia oprogramowania z użyciem librsvg
85 Summary(pt_BR.UTF-8):   Bibliotecas e arquivos de inclusão para desenvolvimento com a librsvg
86 Summary(ru.UTF-8):      Библиотечные линки и файлы заголовков для разработки с librsvg
87 Summary(uk.UTF-8):      Бібліотечні лінки та файли заголовків для розробки з librsvg
88 Group:          X11/Development/Libraries
89 Requires:       %{name} = %{epoch}:%{version}-%{release}
90 Requires:       cairo-devel >= 1.2.0
91 Requires:       gdk-pixbuf2-devel >= 2.20
92 Requires:       glib2-devel >= 1:2.24.0
93 Requires:       gtk+3-devel >= 3.10.0
94 Requires:       libcroco-devel >= 0.6.1
95 Requires:       libxml2-devel >= 1:2.7.0
96 Requires:       pango-devel >= 1:1.32.6
97 Obsoletes:      librsvg0-devel
98
99 %description devel
100 This package provides the necessary development libraries and include
101 files to allow you to develop with librsvg.
102
103 %description devel -l pl.UTF-8
104 Pakiet zawiera pliki nagłówkowe potrzebne do tworzenia oprogramowania
105 z wykorzystaniem librsvg.
106
107 %description devel -l pt_BR.UTF-8
108 Este pacote contém os arquivos necessários para desenvolver com base
109 na biblioteca librsvg.
110
111 %description devel -l ru.UTF-8
112 Этот пакет содержит необходимые файлы для разработки программ с
113 использованием librsvg.
114
115 %description devel -l uk.UTF-8
116 Цей пакет містить необхідні файли для розробки програм з використанням
117 librsvg.
118
119 %package static
120 Summary:        Static libraries for developing with librsvg
121 Summary(es.UTF-8):      Archivos estáticos necesarios para el desarrollo de aplicaciones con librsvg
122 Summary(pl.UTF-8):      Statyczne biblioteki librsvg
123 Summary(pt_BR.UTF-8):   Arquivos estáticos necessários para o desenvolvimento de aplicações com librsvg
124 Group:          X11/Development/Libraries
125 Requires:       %{name}-devel = %{epoch}:%{version}-%{release}
126
127 %description static
128 This package contains static version of librsvg libraries.
129
130 %description static -l pl.UTF-8
131 Statyczna wersja bibliotek librsvg.
132
133 %description static -l pt_BR.UTF-8
134 Bibliotecas estáticas para o desenvolvimento de aplicações com
135 librsvg.
136
137 %package apidocs
138 Summary:        librsvg API documentation
139 Summary(pl.UTF-8):      Dokumentacja API biblioteki librsvg
140 Group:          Documentation
141 Requires:       gtk-doc-common
142
143 %description apidocs
144 librsvg API documentation.
145
146 %description apidocs -l pl.UTF-8
147 Dokumentacja API biblioteki librsvg.
148
149 %package -n vala-librsvg
150 Summary:        Vala API for librsvg library
151 Summary(pl.UTF-8):      API języka Vala do biblioteki librsvg
152 Group:          Development/Libraries
153 Requires:       vala >= 2:0.18
154
155 %description -n vala-librsvg
156 Vala API for librsvg library.
157
158 %description -n vala-librsvg -l pl.UTF-8
159 API języka Vala do biblioteki librsvg.
160
161 %package gtk+3
162 Summary:        librsvg/GTK+3 based SVG viewer
163 Summary(pl.UTF-8):      Przeglądarka plików SVG oparta na bibliotekach librsvg/GTK+3
164 Group:          X11/Applications/Graphics
165 Requires:       %{name} = %{epoch}:%{version}-%{release}
166 Requires:       gtk+3 >= 3.10.0
167
168 %description gtk+3
169 librsvg/GTK+3 based SVG viewer.
170
171 %description gtk+3 -l pl.UTF-8
172 Przeglądarka plików SVG oparta na bibliotekach librsvg/GTK+3.
173
174 %prep
175 %setup -q
176 %patch0 -p1
177
178 %if %{without apidocs}
179 echo 'CLEANFILES=' > gtk-doc.make
180 echo 'AC_DEFUN([GTK_DOC_CHECK],[])' >> acinclude.m4
181 %endif
182
183 %build
184 %{?with_apidocs:%{__gtkdocize}}
185 %{__libtoolize}
186 %{__aclocal}
187 %{__autoconf}
188 %{__autoheader}
189 %{__automake}
190 %configure \
191         %{__enable_disable apidocs gtk-doc} \
192         --enable-introspection \
193         --disable-silent-rules \
194         %{__enable_disable static_libs static} \
195         %{?with_vala:--enable-vala} \
196         --with-html-dir=%{_gtkdocdir}/%{name}
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,a}
207 %{__rm} $RPM_BUILD_ROOT%{_libdir}/librsvg-2.la
208
209 %{__ln_s} rsvg-view-3 $RPM_BUILD_ROOT%{_bindir}/rsvg-view
210
211 install %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}
212
213 %clean
214 rm -rf $RPM_BUILD_ROOT
215
216 %post
217 /sbin/ldconfig
218 umask 022
219 %{_bindir}/gdk-pixbuf-query-loaders%{pqext} --update-cache || :
220
221 %postun
222 /sbin/ldconfig
223 umask 022
224 if [ -x %{_bindir}/gdk-pixbuf-query-loaders%{pqext} ]; then
225         %{_bindir}/gdk-pixbuf-query-loaders%{pqext} --update-cache
226 fi
227
228 %files
229 %defattr(644,root,root,755)
230 %doc ChangeLog AUTHORS NEWS
231 %attr(755,root,root) %{_bindir}/rsvg
232 %attr(755,root,root) %{_bindir}/rsvg-convert
233 %attr(755,root,root) %{_libdir}/librsvg-2.so.*.*.*
234 %attr(755,root,root) %ghost %{_libdir}/librsvg-2.so.2
235 %{_libdir}/girepository-1.0/Rsvg-2.0.typelib
236 %attr(755,root,root) %{_libdir}/gdk-pixbuf-2.0/2.*.*/loaders/libpixbufloader-svg.so
237 %{_mandir}/man1/rsvg-convert.1*
238
239 %files devel
240 %defattr(644,root,root,755)
241 %attr(755,root,root) %{_libdir}/librsvg-2.so
242 %{_includedir}/librsvg-2.0
243 %{_datadir}/gir-1.0/Rsvg-2.0.gir
244 %{_pkgconfigdir}/librsvg-2.0.pc
245
246 %if %{with static_libs}
247 %files static
248 %defattr(644,root,root,755)
249 %{_libdir}/librsvg-2.a
250 %endif
251
252 %if %{with apidocs}
253 %files apidocs
254 %defattr(644,root,root,755)
255 %{_gtkdocdir}/%{name}
256 %endif
257
258 %if %{with vala}
259 %files -n vala-librsvg
260 %defattr(644,root,root,755)
261 %{_datadir}/vala/vapi/librsvg-2.0.vapi
262 %endif
263
264 %files gtk+3
265 %defattr(644,root,root,755)
266 %attr(755,root,root) %{_bindir}/rsvg-view
267 %attr(755,root,root) %{_bindir}/rsvg-view-3
This page took 0.045643 seconds and 2 git commands to generate.