]> git.pld-linux.org Git - packages/librsvg.git/blob - librsvg.spec
5bd12e57c9f3051ee8e68493a6e9014361750868
[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.48
8 %define         pver    6
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:  9e12b3560609cf66302f0b0d14a73f9f
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:  libcroco-devel >= 0.6.1
42 BuildRequires:  libtool >= 2:2.0
43 BuildRequires:  libxml2-devel >= 1:2.9.0
44 BuildRequires:  pango-devel >= 1:1.38.0
45 BuildRequires:  pkgconfig
46 BuildRequires:  rpm-pythonprov
47 BuildRequires:  rust >= 1.39
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:       libcroco >= 0.6.1
58 Requires:       libxml2 >= 1:2.9.0
59 Requires:       pango >= 1:1.38.0
60 Obsoletes:      browser-plugin-librsvg
61 Obsoletes:      librsvg-gtk+2
62 Obsoletes:      librsvg-gtk+3
63 Obsoletes:      librsvg0
64 Obsoletes:      mozilla-plugin-rsvg
65 # rust archs
66 ExclusiveArch:  %{x8664} %{ix86} aarch64
67 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
68
69 # see gdk-pixbuf2.spec for source of these ifdefs
70 %if "%{_lib}" != "lib"
71 %define         libext          %(lib="%{_lib}"; echo ${lib#lib})
72 %define         pqext           -%{libext}
73 %else
74 %define         pqext           %{nil}
75 %endif
76
77 %description
78 An library to render SVG (scalable vector graphics), databased upon
79 libart.
80
81 %description -l pl.UTF-8
82 Biblioteka do renderowania SVG (skalowalnej grafiki wektorowej) oparta
83 na kodzie libart.
84
85 %description -l ru.UTF-8
86 Библиотека SVG, базирующаяся на libart.
87
88 %description -l uk.UTF-8
89 Бібліотека SVG, базована на libart.
90
91 %package devel
92 Summary:        Include files for developing with librsvg
93 Summary(pl.UTF-8):      Pliki nagłówkowe do tworzenia oprogramowania z użyciem librsvg
94 Summary(pt_BR.UTF-8):   Bibliotecas e arquivos de inclusão para desenvolvimento com a librsvg
95 Summary(ru.UTF-8):      Библиотечные линки и файлы заголовков для разработки с librsvg
96 Summary(uk.UTF-8):      Бібліотечні лінки та файли заголовків для розробки з librsvg
97 Group:          X11/Development/Libraries
98 Requires:       %{name} = %{epoch}:%{version}-%{release}
99 Requires:       cairo-gobject-devel >= 1.16.0
100 Requires:       freetype-devel >= 1:2.8
101 Requires:       gdk-pixbuf2-devel >= 2.20
102 Requires:       glib2-devel >= 1:2.50.0
103 Requires:       libcroco-devel >= 0.6.1
104 Requires:       libxml2-devel >= 1:2.9.0
105 Requires:       pango-devel >= 1:1.38.0
106 Obsoletes:      librsvg0-devel
107
108 %description devel
109 This package provides the necessary development libraries and include
110 files to allow you to develop with librsvg.
111
112 %description devel -l pl.UTF-8
113 Pakiet zawiera pliki nagłówkowe potrzebne do tworzenia oprogramowania
114 z wykorzystaniem librsvg.
115
116 %description devel -l pt_BR.UTF-8
117 Este pacote contém os arquivos necessários para desenvolver com base
118 na biblioteca librsvg.
119
120 %description devel -l ru.UTF-8
121 Этот пакет содержит необходимые файлы для разработки программ с
122 использованием librsvg.
123
124 %description devel -l uk.UTF-8
125 Цей пакет містить необхідні файли для розробки програм з використанням
126 librsvg.
127
128 %package static
129 Summary:        Static libraries for developing with librsvg
130 Summary(es.UTF-8):      Archivos estáticos necesarios para el desarrollo de aplicaciones con librsvg
131 Summary(pl.UTF-8):      Statyczne biblioteki librsvg
132 Summary(pt_BR.UTF-8):   Arquivos estáticos necessários para o desenvolvimento de aplicações com librsvg
133 Group:          X11/Development/Libraries
134 Requires:       %{name}-devel = %{epoch}:%{version}-%{release}
135
136 %description static
137 This package contains static version of librsvg libraries.
138
139 %description static -l pl.UTF-8
140 Statyczna wersja bibliotek librsvg.
141
142 %description static -l pt_BR.UTF-8
143 Bibliotecas estáticas para o desenvolvimento de aplicações com
144 librsvg.
145
146 %package apidocs
147 Summary:        librsvg API documentation
148 Summary(pl.UTF-8):      Dokumentacja API biblioteki librsvg
149 Group:          Documentation
150 Requires:       gtk-doc-common
151 %if "%{_rpmversion}" >= "4.6"
152 BuildArch:      noarch
153 %endif
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
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 %patch1 -p1
178
179 %if %{without apidocs}
180 echo 'CLEANFILES=' > gtk-doc.make
181 echo 'AC_DEFUN([GTK_DOC_CHECK],[])' >> acinclude.m4
182 %endif
183
184 %build
185 %{?with_apidocs:%{__gtkdocize}}
186 %{__libtoolize}
187 %{__aclocal} -I m4
188 %{__autoconf}
189 %{__autoheader}
190 %{__automake}
191 %configure \
192         %{__enable_disable apidocs gtk-doc} \
193         --enable-introspection \
194         --disable-silent-rules \
195         %{__enable_disable static_libs static} \
196         %{?with_vala:--enable-vala} \
197         --with-html-dir=%{_gtkdocdir}/%{name}
198 %{__make}
199
200 %install
201 rm -rf $RPM_BUILD_ROOT
202
203 %{__make} install \
204         DESTDIR=$RPM_BUILD_ROOT \
205         pkgconfigdir=%{_pkgconfigdir}
206
207 %{__rm} $RPM_BUILD_ROOT%{_libdir}/gdk-pixbuf-2.0/2.*.*/loaders/*.la
208 %if %{with static_libs}
209 %{__rm} $RPM_BUILD_ROOT%{_libdir}/gdk-pixbuf-2.0/2.*.*/loaders/*.a
210 %endif
211 %{__rm} $RPM_BUILD_ROOT%{_libdir}/librsvg-2.la
212
213 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}
214
215 %find_lang %{name}
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 -f %{name}.lang
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 %if %{with apidocs}
258 %files apidocs
259 %defattr(644,root,root,755)
260 %{_gtkdocdir}/%{name}
261 %endif
262
263 %if %{with vala}
264 %files -n vala-librsvg
265 %defattr(644,root,root,755)
266 %{_datadir}/vala/vapi/librsvg-2.0.vapi
267 %endif
This page took 0.078226 seconds and 2 git commands to generate.