3 %bcond_with dbus # DBus interface
4 %bcond_with relocation # Enable binary relocation support
5 %bcond_with imagick # ImageMagick 6.x instead of GraphicsMagick
8 Summary: Scalable vector graphics editor
9 Summary(pl.UTF-8): Edytor skalowalnej grafiki wektorowej
13 License: GPL v2+, LGPL v2.1+
14 Group: X11/Applications/Graphics
15 # download: follow https://inkscape.org/release/
16 Source0: https://media.inkscape.org/dl/resources/file/%{name}-%{version}.tar.xz
17 # Source0-md5: 490c40bbb3ce3441ceee88e61775bbf4
18 URL: https://inkscape.org/
19 %{!?with_imagick:BuildRequires: GraphicsMagick-c++-devel}
20 %{?with_imagick:BuildRequires: ImageMagick6-c++-devel < 7}
21 BuildRequires: aspell-devel
22 BuildRequires: boost-devel >= 1.36
23 BuildRequires: cairo-devel >= 1.10
24 BuildRequires: cairomm-devel >= 1.9.8
25 BuildRequires: cmake >= 3.1.0
27 BuildRequires: dbus-devel
28 BuildRequires: dbus-glib-devel
30 BuildRequires: double-conversion-devel
31 BuildRequires: fontconfig-devel
32 BuildRequires: freetype-devel >= 2.0
33 BuildRequires: gc-devel >= 7.2
34 BuildRequires: gdl-devel >= 3.6
35 BuildRequires: gettext-tools >= 0.17
36 BuildRequires: glib2-devel >= 1:2.28
37 BuildRequires: glibmm-devel >= 2.28
38 BuildRequires: gsl-devel
39 BuildRequires: gspell-devel >= 1.0
40 BuildRequires: gtk+3-devel >= 3.22
41 BuildRequires: gtkmm3-devel >= 3.22
42 BuildRequires: harfbuzz-devel
43 BuildRequires: lcms2-devel >= 2
44 BuildRequires: lib2geom-devel >= 1.1
45 BuildRequires: libcdr-devel >= 0.1
46 BuildRequires: libexif-devel
47 BuildRequires: libgomp-devel
48 BuildRequires: libjpeg-devel
49 BuildRequires: libpng-devel >= 1.2
50 BuildRequires: librevenge-devel
51 BuildRequires: libsigc++-devel >= 2.0.17
52 BuildRequires: libsoup-devel >= 2.42
53 BuildRequires: libstdc++-devel >= 6:4.7
54 BuildRequires: libvisio-devel >= 0.1
55 BuildRequires: libwpd-devel >= 0.9
56 BuildRequires: libwpg-devel >= 0.3
57 BuildRequires: libxml2-devel >= 1:2.6.26
58 BuildRequires: libxslt-devel >= 1.1.17
59 BuildRequires: pango-devel >= 1:1.24
60 BuildRequires: perl-tools-pod
61 BuildRequires: pkgconfig
62 BuildRequires: poppler-glib-devel >= 0.29.0
63 BuildRequires: popt-devel
64 BuildRequires: potrace-devel
65 BuildRequires: rpm-build >= 4.6
66 BuildRequires: rpm-pythonprov
67 BuildRequires: rpmbuild(macros) >= 1.752
68 BuildRequires: sed >= 4.0
69 BuildRequires: tar >= 1:1.22
70 BuildRequires: xorg-lib-libX11-devel
72 BuildRequires: zlib-devel
73 Requires(post,postun): desktop-file-utils
74 Requires: cairo >= 1.10
75 Requires: cairomm >= 1.9.8
78 Requires: glib2 >= 1:2.28
79 Requires: glibmm >= 2.28
80 Requires: gtk+3 >= 3.22
81 Requires: gtkmm3 >= 3.22
82 Requires: libsigc++ >= 2.0.17
83 Requires: libxml2 >= 1:2.6.26
84 Requires: libxslt >= 1.1.17
85 Requires: pango >= 1:1.24
86 Requires: perl-XML-XQL
87 Requires: poppler-glib >= 0.29.0
89 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
92 Inkscape is a program for viewing, making, and editing two-dimensional
95 %description -l pl.UTF-8
96 Inkscape jest programem do przeglądania, tworzenia i edycji
97 dwuwymiarowej grafiki wektorowej.
99 %package -n bash-completion-inkscape
100 Summary: Bash completion for inkscape arguments
101 Summary(pl.UTF-8): Bashowe dopełnianie argumentów programu inkscape
102 Group: Applications/Shells
103 Requires: %{name} = %{version}-%{release}
104 Requires: bash-completion >= 1:2.0
107 %description -n bash-completion-inkscape
108 Bash completion for inkscape arguments.
110 %description -n bash-completion-inkscape -l pl.UTF-8
111 Bashowe dopełnianie argumentów programu inkscape.
114 %setup -q -n %{name}-%{version}_2022-12-01_b0a8486541
117 %{__sed} -i -e '1s,/usr/bin/env python3,%{__python3},' \
118 CMakeScripts/cmake_consistency_check.py \
119 buildtools/check_license_headers.py \
120 share/extensions/*.py \
121 share/extensions/tests/add_pylint.py \
124 # look python2/3 compatible
125 %{__sed} -i -e '1s,/usr/bin/env python$,%{__python3},' \
126 buildtools/msys2checkdeps.py \
127 share/extensions/*.py \
128 share/extensions/inkex/tester/inx.py \
129 share/extensions/tests/test_*.py \
132 %{__sed} -i -e '1s,/usr/bin/python$,%{__python},' \
133 packaging/scripts/lp-mark-bugs-released
135 %{__sed} -i -e '1s,/usr/bin/env perl$,%{__perl},' \
136 share/attributes/genMapDataCSS.pl \
137 share/attributes/genMapDataSVG.pl
144 -DBUILD_SHARED_LIBS:BOOL=OFF \
145 %{cmake_on_off relocation ENABLE_BINRELOC} \
146 %{cmake_on_off dbus WITH_DBUS} \
147 %{cmake_on_off imagick WITH_IMAGE_MAGICK}
152 rm -rf $RPM_BUILD_ROOT
154 %{__make} -C build install \
155 DESTDIR=$RPM_BUILD_ROOT
157 # unify locale name, overwrite outdated bn
158 %{__mv} $RPM_BUILD_ROOT%{_localedir}/{bn_BD,bn}/LC_MESSAGES/inkscape.mo
160 %{__mv} $RPM_BUILD_ROOT%{_localedir}/{ks@aran,ks}
161 %{__mv} $RPM_BUILD_ROOT%{_localedir}/{ks@deva,ks@devanagari}
162 %{__mv} $RPM_BUILD_ROOT%{_localedir}/{sd@deva,sd@devanagari}
163 # unsupported variants
164 %{__rm} -r $RPM_BUILD_ROOT%{_localedir}/{kok@latin,mni@beng,sat@deva}
166 %{__rm} $RPM_BUILD_ROOT%{_datadir}/inkscape/extensions/{.darglint,.pre-commit-config.yaml,.pylintrc,CONTRIBUTING.md,LICENSE.txt,MANIFEST.in,README.md,TESTING.md,doxygen-main.dox,poetry.lock,pyproject.toml,tox.ini}
167 %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/inkscape/extensions/docs
172 rm -rf $RPM_BUILD_ROOT
175 %update_desktop_database_post
178 %update_desktop_database_postun
180 %files -f %{name}.lang
181 %defattr(644,root,root,755)
182 %doc AUTHORS CONTRIBUTING.md NEWS.md README.md
183 %attr(755,root,root) %{_bindir}/inkscape
184 %attr(755,root,root) %{_bindir}/inkview
185 %dir %{_datadir}/inkscape
186 %{_datadir}/inkscape/[!e]*
187 %{_datadir}/inkscape/examples
188 %dir %{_datadir}/inkscape/extensions
189 %{_datadir}/inkscape/extensions/Poly3DObjects
190 %{_datadir}/inkscape/extensions/alphabet_soup
191 %{_datadir}/inkscape/extensions/barcode
192 %{_datadir}/inkscape/extensions/ink2canvas_lib
193 %{_datadir}/inkscape/extensions/inkex
194 %{_datadir}/inkscape/extensions/inkman
195 %{_datadir}/inkscape/extensions/other
196 %{_datadir}/inkscape/extensions/svg_fonts
197 %{_datadir}/inkscape/extensions/tools
198 %{_datadir}/inkscape/extensions/xaml2svg
199 %attr(755,root,root) %{_datadir}/inkscape/extensions/*.py
200 %attr(755,root,root) %{_datadir}/inkscape/extensions/*.sh
201 %{_datadir}/inkscape/extensions/dxf14_*.txt
202 %{_datadir}/inkscape/extensions/*.inx
203 %{_datadir}/inkscape/extensions/*.js
204 %{_datadir}/inkscape/extensions/*.svg
205 %{_datadir}/inkscape/extensions/*.xml
206 %{_datadir}/inkscape/extensions/*.xsl
207 %{_datadir}/inkscape/extensions/*.xslt
208 %{_datadir}/inkscape/extensions/fontfix.conf
209 %{_datadir}/inkscape/extensions/inkscape.extension.rng
210 %{_datadir}/inkscape/extensions/inkscape.extension.schema
211 %{_datadir}/metainfo/org.inkscape.Inkscape.appdata.xml
212 %{_iconsdir}/hicolor/*/apps/org.inkscape.Inkscape.png
213 %{_iconsdir}/hicolor/scalable/apps/org.inkscape.Inkscape.svg
214 %{_iconsdir}/hicolor/symbolic/apps/org.inkscape.Inkscape-symbolic.svg
215 %{_desktopdir}/org.inkscape.Inkscape.desktop
216 %{_mandir}/man1/inkscape.1*
217 %{_mandir}/man1/inkview.1*
218 %lang(de) %{_mandir}/de/man1/inkscape.1*
219 %lang(fr) %{_mandir}/fr/man1/inkscape.1*
220 %lang(hr) %{_mandir}/hr/man1/inkscape.1*
221 %lang(hu) %{_mandir}/hu/man1/inkscape.1*
222 %lang(zh_TW) %{_mandir}/zh_TW/man1/inkscape.1*
223 %lang(de) %{_mandir}/de/man1/inkview.1*
224 %lang(es) %{_mandir}/es/man1/inkview.1*
225 %lang(fr) %{_mandir}/fr/man1/inkview.1*
226 %lang(hr) %{_mandir}/hr/man1/inkview.1*
227 %lang(hu) %{_mandir}/hu/man1/inkview.1*
228 %lang(pt_BR) %{_mandir}/pt_BR/man1/inkview.1*
229 %lang(zh_TW) %{_mandir}/zh_TW/man1/inkview.1*
231 %files -n bash-completion-inkscape
232 %defattr(644,root,root,755)
233 %{bash_compdir}/inkscape