]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # Conditional build | |
3 | %bcond_with relocation # Enable binary relocation support | |
4 | %bcond_with imagick # ImageMagick 6.x instead of GraphicsMagick | |
5 | # | |
6 | ||
7 | Summary: Scalable vector graphics editor | |
8 | Summary(pl.UTF-8): Edytor skalowalnej grafiki wektorowej | |
9 | Name: inkscape | |
10 | Version: 1.3.2 | |
11 | Release: 1 | |
12 | License: GPL v2+, LGPL v2.1+ | |
13 | Group: X11/Applications/Graphics | |
14 | # download: follow https://inkscape.org/release/ | |
15 | Source0: https://media.inkscape.org/dl/resources/file/%{name}-%{version}.tar.xz | |
16 | # Source0-md5: 76ed1f4b13065e80de8b2d77b6427b83 | |
17 | Patch0: inkscape-1.3.1-missing-headers.patch | |
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 | |
26 | BuildRequires: dbus-devel | |
27 | BuildRequires: dbus-glib-devel | |
28 | BuildRequires: double-conversion-devel | |
29 | BuildRequires: fontconfig-devel | |
30 | BuildRequires: freetype-devel >= 2.0 | |
31 | BuildRequires: gc-devel >= 7.2 | |
32 | BuildRequires: gdl-devel >= 3.6 | |
33 | BuildRequires: gettext-tools >= 0.17 | |
34 | BuildRequires: glib2-devel >= 1:2.28 | |
35 | BuildRequires: glibmm-devel >= 2.28 | |
36 | BuildRequires: gsl-devel | |
37 | BuildRequires: gspell-devel >= 1.0 | |
38 | BuildRequires: gtk+3-devel >= 3.22 | |
39 | BuildRequires: gtkmm3-devel >= 3.22 | |
40 | BuildRequires: gtksourceview4-devel | |
41 | BuildRequires: harfbuzz-devel | |
42 | BuildRequires: lcms2-devel >= 2 | |
43 | BuildRequires: lib2geom-devel >= 1.3 | |
44 | BuildRequires: libcdr-devel >= 0.1 | |
45 | BuildRequires: libexif-devel | |
46 | BuildRequires: libgomp-devel | |
47 | BuildRequires: libjpeg-devel | |
48 | BuildRequires: libpng-devel >= 1.2 | |
49 | BuildRequires: librevenge-devel | |
50 | BuildRequires: libsigc++-devel >= 2.0.17 | |
51 | BuildRequires: libsoup-devel >= 2.42 | |
52 | BuildRequires: libstdc++-devel >= 6:4.7 | |
53 | BuildRequires: libvisio-devel >= 0.1 | |
54 | BuildRequires: libwpd-devel >= 0.9 | |
55 | BuildRequires: libwpg-devel >= 0.3 | |
56 | BuildRequires: libxml2-devel >= 1:2.6.26 | |
57 | BuildRequires: libxslt-devel >= 1.1.17 | |
58 | BuildRequires: pango-devel >= 1:1.24 | |
59 | BuildRequires: perl-tools-pod | |
60 | BuildRequires: pkgconfig | |
61 | BuildRequires: poppler-glib-devel >= 0.29.0 | |
62 | BuildRequires: popt-devel | |
63 | BuildRequires: potrace-devel | |
64 | BuildRequires: ragel | |
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 | |
71 | BuildRequires: xz | |
72 | BuildRequires: zlib-devel | |
73 | Requires(post,postun): desktop-file-utils | |
74 | Requires(post,postun): gtk-update-icon-cache | |
75 | Requires: cairo >= 1.10 | |
76 | Requires: cairomm >= 1.9.8 | |
77 | Requires: gc >= 7.2 | |
78 | Requires: gdl >= 3.6 | |
79 | Requires: glib2 >= 1:2.28 | |
80 | Requires: glibmm >= 2.28 | |
81 | Requires: gtk+3 >= 3.22 | |
82 | Requires: gtkmm3 >= 3.22 | |
83 | Requires: hicolor-icon-theme | |
84 | Requires: libsigc++ >= 2.0.17 | |
85 | Requires: libxml2 >= 1:2.6.26 | |
86 | Requires: libxslt >= 1.1.17 | |
87 | Requires: pango >= 1:1.24 | |
88 | Requires: perl-XML-XQL | |
89 | Requires: poppler-glib >= 0.29.0 | |
90 | Suggests: python-lxml | |
91 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
92 | ||
93 | %description | |
94 | Inkscape is a program for viewing, making, and editing two-dimensional | |
95 | vector drawings. | |
96 | ||
97 | %description -l pl.UTF-8 | |
98 | Inkscape jest programem do przeglądania, tworzenia i edycji | |
99 | dwuwymiarowej grafiki wektorowej. | |
100 | ||
101 | %package -n bash-completion-inkscape | |
102 | Summary: Bash completion for inkscape arguments | |
103 | Summary(pl.UTF-8): Bashowe dopełnianie argumentów programu inkscape | |
104 | Group: Applications/Shells | |
105 | Requires: %{name} = %{version}-%{release} | |
106 | Requires: bash-completion >= 1:2.0 | |
107 | BuildArch: noarch | |
108 | ||
109 | %description -n bash-completion-inkscape | |
110 | Bash completion for inkscape arguments. | |
111 | ||
112 | %description -n bash-completion-inkscape -l pl.UTF-8 | |
113 | Bashowe dopełnianie argumentów programu inkscape. | |
114 | ||
115 | %prep | |
116 | %setup -q -n %{name}-%{version}_2023-11-25_091e20ef0f | |
117 | %patch0 -p1 | |
118 | ||
119 | # python3-only | |
120 | %{__sed} -i -e '1s,/usr/bin/env python3,%{__python3},' \ | |
121 | CMakeScripts/cmake_consistency_check.py \ | |
122 | buildtools/check_license_headers.py \ | |
123 | share/extensions/*.py \ | |
124 | share/extensions/tests/add_pylint.py \ | |
125 | share/*/i18n.py | |
126 | ||
127 | # look python2/3 compatible | |
128 | %{__sed} -i -e '1s,/usr/bin/env python$,%{__python3},' \ | |
129 | buildtools/msys2checkdeps.py \ | |
130 | share/extensions/*.py \ | |
131 | share/extensions/inkex/tester/inx.py \ | |
132 | share/extensions/tests/test_*.py \ | |
133 | ||
134 | # python2-only | |
135 | %{__sed} -i -e '1s,/usr/bin/python$,%{__python},' \ | |
136 | packaging/scripts/lp-mark-bugs-released | |
137 | ||
138 | %{__sed} -i -e '1s,/usr/bin/env perl$,%{__perl},' \ | |
139 | share/attributes/genMapDataCSS.pl \ | |
140 | share/attributes/genMapDataSVG.pl | |
141 | ||
142 | %build | |
143 | mkdir -p build | |
144 | cd build | |
145 | ||
146 | %cmake .. \ | |
147 | -DBUILD_SHARED_LIBS:BOOL=OFF \ | |
148 | %{cmake_on_off relocation ENABLE_BINRELOC} \ | |
149 | %{cmake_on_off imagick WITH_IMAGE_MAGICK} | |
150 | ||
151 | %{__make} | |
152 | ||
153 | %install | |
154 | rm -rf $RPM_BUILD_ROOT | |
155 | ||
156 | %{__make} -C build install \ | |
157 | DESTDIR=$RPM_BUILD_ROOT | |
158 | ||
159 | # unify locale name, overwrite outdated bn | |
160 | %{__mv} $RPM_BUILD_ROOT%{_localedir}/{bn_BD,bn}/LC_MESSAGES/inkscape.mo | |
161 | # unify names | |
162 | %{__mv} $RPM_BUILD_ROOT%{_localedir}/{ks@aran,ks} | |
163 | %{__mv} $RPM_BUILD_ROOT%{_localedir}/{ks@deva,ks@devanagari} | |
164 | %{__mv} $RPM_BUILD_ROOT%{_localedir}/{sd@deva,sd@devanagari} | |
165 | # unsupported variants | |
166 | %{__rm} -r $RPM_BUILD_ROOT%{_localedir}/{kok@latin,mni@beng,sat@deva} | |
167 | ||
168 | %{__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,package-readme.md,poetry.lock,pyproject.toml,tox.ini} | |
169 | %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/inkscape/extensions/docs | |
170 | ||
171 | %find_lang %{name} | |
172 | ||
173 | %clean | |
174 | rm -rf $RPM_BUILD_ROOT | |
175 | ||
176 | %post | |
177 | %update_desktop_database_post | |
178 | %update_icon_cache hicolor | |
179 | ||
180 | %postun | |
181 | %update_desktop_database_postun | |
182 | %update_icon_cache hicolor | |
183 | ||
184 | %files -f %{name}.lang | |
185 | %defattr(644,root,root,755) | |
186 | %doc AUTHORS CONTRIBUTING.md NEWS.md README.md | |
187 | %attr(755,root,root) %{_bindir}/inkscape | |
188 | %attr(755,root,root) %{_bindir}/inkview | |
189 | %dir %{_datadir}/inkscape | |
190 | %{_datadir}/inkscape/[!e]* | |
191 | %{_datadir}/inkscape/examples | |
192 | %dir %{_datadir}/inkscape/extensions | |
193 | %dir %{_datadir}/inkscape/extensions/icons | |
194 | %{_datadir}/inkscape/extensions/Poly3DObjects | |
195 | %{_datadir}/inkscape/extensions/alphabet_soup | |
196 | %{_datadir}/inkscape/extensions/barcode | |
197 | %{_datadir}/inkscape/extensions/ink2canvas_lib | |
198 | %{_datadir}/inkscape/extensions/inkex | |
199 | %{_datadir}/inkscape/extensions/inkman | |
200 | %{_datadir}/inkscape/extensions/other | |
201 | %{_datadir}/inkscape/extensions/svg_fonts | |
202 | %{_datadir}/inkscape/extensions/tools | |
203 | %attr(755,root,root) %{_datadir}/inkscape/extensions/*.py | |
204 | %{_datadir}/inkscape/extensions/dxf14_*.txt | |
205 | %{_datadir}/inkscape/extensions/*.inx | |
206 | %{_datadir}/inkscape/extensions/*.js | |
207 | %{_datadir}/inkscape/extensions/*.svg | |
208 | %{_datadir}/inkscape/extensions/*.xml | |
209 | %{_datadir}/inkscape/extensions/*.xsl | |
210 | %{_datadir}/inkscape/extensions/*.xslt | |
211 | %{_datadir}/inkscape/extensions/fontfix.conf | |
212 | %{_datadir}/inkscape/extensions/icons/*.svg | |
213 | %{_datadir}/metainfo/org.inkscape.Inkscape.appdata.xml | |
214 | %{_iconsdir}/hicolor/*/apps/org.inkscape.Inkscape.png | |
215 | %{_iconsdir}/hicolor/scalable/apps/org.inkscape.Inkscape.svg | |
216 | %{_iconsdir}/hicolor/symbolic/apps/org.inkscape.Inkscape-symbolic.svg | |
217 | %{_desktopdir}/org.inkscape.Inkscape.desktop | |
218 | %{_mandir}/man1/inkscape.1* | |
219 | %{_mandir}/man1/inkview.1* | |
220 | %lang(de) %{_mandir}/de/man1/inkscape.1* | |
221 | %lang(fr) %{_mandir}/fr/man1/inkscape.1* | |
222 | %lang(hr) %{_mandir}/hr/man1/inkscape.1* | |
223 | %lang(hu) %{_mandir}/hu/man1/inkscape.1* | |
224 | %lang(ko) %{_mandir}/ko/man1/inkscape.1* | |
225 | %lang(zh_TW) %{_mandir}/zh_TW/man1/inkscape.1* | |
226 | %lang(de) %{_mandir}/de/man1/inkview.1* | |
227 | %lang(es) %{_mandir}/es/man1/inkview.1* | |
228 | %lang(fr) %{_mandir}/fr/man1/inkview.1* | |
229 | %lang(hr) %{_mandir}/hr/man1/inkview.1* | |
230 | %lang(hu) %{_mandir}/hu/man1/inkview.1* | |
231 | %lang(ko) %{_mandir}/ko/man1/inkview.1* | |
232 | %lang(pt_BR) %{_mandir}/pt_BR/man1/inkview.1* | |
233 | %lang(zh_TW) %{_mandir}/zh_TW/man1/inkview.1* | |
234 | ||
235 | %files -n bash-completion-inkscape | |
236 | %defattr(644,root,root,755) | |
237 | %{bash_compdir}/inkscape |