]>
Commit | Line | Data |
---|---|---|
74131d84 AM |
1 | # TODO: |
2 | # - fix mimelnk installation | |
3 | # | |
b76338ad | 4 | # Conditional build: |
d8fd94ea | 5 | %bcond_without packages3D # do not build packages3D |
1de26e2a | 6 | %bcond_without tests # unit tests |
b76338ad | 7 | |
6910bb76 JR |
8 | %ifarch %{ix86} |
9 | %undefine with_tests | |
10 | %endif | |
11 | ||
4b5aca64 | 12 | Summary: KiCad - is a GPL'd suite of programs for EDA |
34a5277b | 13 | Summary(pl.UTF-8): KiCad - zestaw programów na licencji GPL zaliczany do kategorii EDA |
4b5aca64 | 14 | Name: kicad |
d8fd94ea | 15 | Version: 7.0.7 |
72576aa7 | 16 | Release: 2 |
14ef21aa | 17 | Epoch: 1 |
22291059 | 18 | License: GPL v2+ |
34a5277b | 19 | Group: X11/Applications |
d8fd94ea JR |
20 | Source0: https://gitlab.com/kicad/code/kicad/-/archive/%{version}/%{name}-%{version}.tar.bz2 |
21 | # Source0-md5: 24a74335b414fd326caa057f659611cd | |
22 | Source1: https://gitlab.com/kicad/services/kicad-doc/-/archive/%{version}/%{name}-doc-%{version}.tar.bz2 | |
23 | # Source1-md5: 46663e145076127743c21a9503c74cae | |
1e16fbc7 | 24 | Source3: https://gitlab.com/kicad/libraries/kicad-symbols/-/archive/%{version}/%{name}-symbols-%{version}.tar.bz2 |
d8fd94ea | 25 | # Source3-md5: 7cdf8677c33d182fcceca4a368dfae84 |
1e16fbc7 | 26 | Source4: https://gitlab.com/kicad/libraries/kicad-footprints/-/archive/%{version}/%{name}-footprints-%{version}.tar.bz2 |
d8fd94ea | 27 | # Source4-md5: 6892e24da695bdf82d97c4a46c2382a5 |
1e16fbc7 | 28 | Source5: https://gitlab.com/kicad/libraries/kicad-packages3D/-/archive/%{version}/%{name}-packages3D-%{version}.tar.bz2 |
d8fd94ea | 29 | # Source5-md5: f2bd1e8cd3c2c067b629a5b516b456ae |
1e16fbc7 | 30 | Source6: https://gitlab.com/kicad/libraries/kicad-templates/-/archive/%{version}/%{name}-templates-%{version}.tar.bz2 |
d8fd94ea | 31 | # Source6-md5: 1c597abf18b943172988277ebe1f1203 |
050daee7 | 32 | URL: http://www.kicad.org/ |
84732aaf | 33 | BuildRequires: GLM >= 0.9.9.4 |
d8fd94ea | 34 | BuildRequires: OpenCASCADE-devel >= 7.3.0 |
c4549a7b JR |
35 | BuildRequires: appstream-glib |
36 | BuildRequires: asciidoc | |
254fbc44 | 37 | BuildRequires: boost-devel |
8f50c340 | 38 | BuildRequires: cairo-devel >= 1.12 |
b3e6c3ec | 39 | BuildRequires: cmake >= 2.6.4 |
c4549a7b JR |
40 | BuildRequires: curl-devel |
41 | BuildRequires: dblatex | |
42 | BuildRequires: desktop-file-utils | |
43 | BuildRequires: doxygen | |
44 | BuildRequires: glew-devel | |
8f50c340 | 45 | BuildRequires: gtk+3-devel |
26c94a74 | 46 | BuildRequires: ngspice-devel |
c4549a7b JR |
47 | BuildRequires: openssl-devel |
48 | BuildRequires: perl-Unicode-LineBreak | |
49 | BuildRequires: po4a >= 0.51 | |
d8fd94ea | 50 | BuildRequires: python3-wxPython-devel |
22291059 | 51 | BuildRequires: rpmbuild(macros) >= 1.600 |
d8fd94ea | 52 | BuildRequires: ruby-asciidoctor |
34a5277b | 53 | BuildRequires: sed >= 4.0 |
254fbc44 | 54 | BuildRequires: which |
8f50c340 JR |
55 | BuildRequires: wxGTK3-unicode-devel >= 3.2.2 |
56 | BuildRequires: wxGTK3-unicode-gl-devel >= 3.2.2 | |
7e103374 | 57 | BuildRequires: wxWidgets-devel >= 3.0.0 |
b3e6c3ec | 58 | BuildRequires: zlib-devel |
14ef21aa | 59 | Obsoletes: kicad-doc-hu < 1:4.0.6-1 |
ce396805 | 60 | Obsoletes: kicad-doc-nl < 1:5.1.0-1 |
14ef21aa JR |
61 | Obsoletes: kicad-doc-pt < 1:4.0.6-1 |
62 | Obsoletes: kicad-doc-zh_CN < 1:4.0.6-1 | |
d8fd94ea | 63 | Obsoletes: kicad-library < 1:7.0.7 |
4b5aca64 | 64 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
65 | ||
66 | %description | |
67 | KiCad consists of a project manager and four main programs: | |
68 | - kicad - the project manager. | |
69 | - eeschema - the schematic editor. | |
70 | - cvpcb - the footprint selector for components used in the circuit | |
71 | design. | |
72 | - pcbnew - the PCB layout program. | |
73 | - gerbview - the Gerber (photoplotter documents) viewer. | |
74 | ||
75 | %description -l pl.UTF-8 | |
22291059 | 76 | KiCad składa się z menadżera projektów oraz czterech głównych |
4b5aca64 | 77 | programów: |
78 | - kicad - menadżer projektów. | |
79 | - eeschema - edytor schematów. | |
34a5277b JB |
80 | - cvpcb - narzędzie do wybierania elementów używanych przy |
81 | projektowaniu płytek drukowanych. | |
82 | - pcbnew - program do projektowania płytek drukowanych. | |
83 | - gerbview - przeglądarka plików Gerber (dokumentów dla fotoplotera). | |
4b5aca64 | 84 | |
26c94a74 BS |
85 | %package packages3D |
86 | Summary: Packages3D for kicad | |
87 | Summary(pl.UTF-8): Trójwymiarowe modele obudów dla kicad | |
26c94a74 | 88 | Requires: kicad >= 1:5.0.0 |
d8fd94ea | 89 | BuildArch: noarch |
26c94a74 BS |
90 | |
91 | %description packages3D | |
92 | Packages3D for kicad | |
93 | ||
1de26e2a | 94 | %description packages3D -l pl.UTF-8 |
26c94a74 BS |
95 | Trójwymiarowe modele obudów dla kicad. |
96 | ||
88bfc3ad ER |
97 | %package doc |
98 | Summary: Documentation for kicad | |
99 | Summary(fr.UTF-8): Documentations pour kicad en anglais | |
100 | License: GPL v2+ | |
101 | Group: Documentation | |
88bfc3ad | 102 | BuildArch: noarch |
88bfc3ad ER |
103 | |
104 | %description doc | |
105 | Documentation and tutorials for kicad in English | |
106 | ||
c4549a7b | 107 | %package doc-ca |
0af3e185 | 108 | Summary: Documentation for Kicad in Catalan |
c4549a7b | 109 | Group: Documentation |
d2529fc6 | 110 | Requires: %{name}-doc = %{epoch}:%{version}-%{release} |
c4549a7b | 111 | BuildArch: noarch |
c4549a7b JR |
112 | |
113 | %description doc-ca | |
0af3e185 | 114 | Documentation and tutorials for Kicad in Catalan. |
c4549a7b | 115 | |
88bfc3ad ER |
116 | %package doc-de |
117 | Summary: Documentation for Kicad in German | |
118 | Summary(fr.UTF-8): Documentations pour kicad en allemand | |
119 | Group: Documentation | |
d2529fc6 | 120 | Requires: %{name}-doc = %{epoch}:%{version}-%{release} |
88bfc3ad | 121 | BuildArch: noarch |
88bfc3ad ER |
122 | |
123 | %description doc-de | |
0af3e185 | 124 | Documentation and tutorials for Kicad in German. |
88bfc3ad ER |
125 | |
126 | %package doc-es | |
127 | Summary: Documentation for Kicad in Spanish | |
128 | Summary(fr.UTF-8): Documentations pour kicad en espagnol | |
129 | Group: Documentation | |
d2529fc6 | 130 | Requires: %{name}-doc = %{epoch}:%{version}-%{release} |
88bfc3ad | 131 | BuildArch: noarch |
88bfc3ad ER |
132 | |
133 | %description doc-es | |
0af3e185 | 134 | Documentation and tutorials for Kicad in Spanish. |
88bfc3ad ER |
135 | |
136 | %package doc-fr | |
137 | Summary: Documentation for Kicad in French | |
138 | Summary(fr.UTF-8): Documentations pour kicad en français | |
139 | Group: Documentation | |
d2529fc6 | 140 | Requires: %{name}-doc = %{epoch}:%{version}-%{release} |
88bfc3ad | 141 | BuildArch: noarch |
88bfc3ad ER |
142 | |
143 | %description doc-fr | |
0af3e185 | 144 | Documentation and tutorials for Kicad in French. |
88bfc3ad | 145 | |
c4549a7b | 146 | %package doc-id |
0af3e185 | 147 | Summary: Documentation for Kicad in Indonesian |
88bfc3ad | 148 | Group: Documentation |
d2529fc6 | 149 | Requires: %{name}-doc = %{epoch}:%{version}-%{release} |
88bfc3ad | 150 | BuildArch: noarch |
88bfc3ad | 151 | |
c4549a7b | 152 | %description doc-id |
0af3e185 | 153 | Documentation and tutorials for Kicad in Indonesian. |
88bfc3ad ER |
154 | |
155 | %package doc-it | |
156 | Summary: Documentation for Kicad in Italian | |
157 | Summary(fr.UTF-8): Documentations pour kicad en italien | |
158 | Group: Documentation | |
d2529fc6 | 159 | Requires: %{name}-doc = %{epoch}:%{version}-%{release} |
88bfc3ad | 160 | BuildArch: noarch |
88bfc3ad ER |
161 | |
162 | %description doc-it | |
0af3e185 | 163 | Documentation and tutorials for Kicad in Italian. |
88bfc3ad ER |
164 | |
165 | %package doc-ja | |
166 | Summary: Documentation for Kicad in Japanese | |
167 | Summary(fr.UTF-8): Documentations pour kicad en japonais | |
168 | Group: Documentation | |
d2529fc6 | 169 | Requires: %{name}-doc = %{epoch}:%{version}-%{release} |
88bfc3ad | 170 | BuildArch: noarch |
88bfc3ad ER |
171 | |
172 | %description doc-ja | |
0af3e185 | 173 | Documentation and tutorials for Kicad in Japanese. |
88bfc3ad | 174 | |
c4549a7b JR |
175 | %package doc-pl |
176 | Summary: Documentation for Kicad in Polish | |
177 | Summary(fr.UTF-8): Documentations pour kicad en polonais | |
88bfc3ad | 178 | Group: Documentation |
d2529fc6 | 179 | Requires: %{name}-doc = %{epoch}:%{version}-%{release} |
88bfc3ad | 180 | BuildArch: noarch |
88bfc3ad | 181 | |
c4549a7b | 182 | %description doc-pl |
0af3e185 | 183 | Documentation and tutorials for Kicad in Polish. |
88bfc3ad ER |
184 | |
185 | %package doc-ru | |
186 | Summary: Documentation for Kicad in Russian | |
187 | Summary(fr.UTF-8): Documentations pour kicad en russe | |
188 | Group: Documentation | |
d2529fc6 | 189 | Requires: %{name}-doc = %{epoch}:%{version}-%{release} |
88bfc3ad | 190 | BuildArch: noarch |
88bfc3ad ER |
191 | |
192 | %description doc-ru | |
0af3e185 | 193 | Documentation and tutorials for Kicad in Russian. |
88bfc3ad | 194 | |
26c94a74 BS |
195 | %package doc-zh |
196 | Summary: Documentation for Kicad in Chinese | |
197 | Summary(fr.UTF-8): Documentations pour kicad en chinois | |
198 | Group: Documentation | |
199 | Requires: %{name}-doc = %{epoch}:%{version}-%{release} | |
26c94a74 | 200 | BuildArch: noarch |
26c94a74 BS |
201 | |
202 | %description doc-zh | |
203 | Documentation and tutorials for Kicad in Chinese. | |
204 | ||
4b5aca64 | 205 | %prep |
d8fd94ea | 206 | %setup -q -a 1 -a 3 -a 4 %{?with_packages3D:-a 5} -a 6 |
c7773671 | 207 | |
93c5b63a JR |
208 | %ifarch x32 |
209 | %{__sed} -i -e '/test_coroutine.cpp/d' qa/unittests/common/CMakeLists.txt | |
210 | %endif | |
211 | ||
4b5aca64 | 212 | %build |
26c94a74 BS |
213 | |
214 | build_library() { | |
d8fd94ea | 215 | mkdir -p "$1/build" |
26c94a74 BS |
216 | cd "$1/build" |
217 | %cmake .. | |
218 | %{__make} VERBOSE=1 | |
219 | cd ../.. | |
220 | } | |
c4549a7b | 221 | # Symbols libraries |
26c94a74 BS |
222 | build_library %{name}-symbols-%{version} |
223 | build_library %{name}-footprints-%{version} | |
224 | build_library %{name}-templates-%{version} | |
b76338ad | 225 | %if %{with packages3D} |
26c94a74 | 226 | build_library %{name}-packages3D-%{version} |
b76338ad | 227 | %endif |
74131d84 | 228 | |
c4549a7b | 229 | # Documentation |
d8fd94ea | 230 | mkdir -p %{name}-doc-%{version}/build |
ed1b91c8 JR |
231 | cd %{name}-doc-%{version}/build |
232 | %cmake .. \ | |
233 | -DBUILD_FORMATS=html | |
1046b699 | 234 | %{__make} VERBOSE=1 |
ed1b91c8 | 235 | cd ../.. |
7e103374 | 236 | |
7e103374 | 237 | # Core components |
d8fd94ea | 238 | mkdir -p build |
ed1b91c8 JR |
239 | cd build |
240 | %cmake .. \ | |
c4549a7b | 241 | -DKICAD_BUILD_VERSION="%{version}-%{release}" \ |
d8fd94ea JR |
242 | -DKICAD_BUILD_I18N=ON \ |
243 | -DKICAD_I18N_UNIX_STRICT_PATH=ON \ | |
244 | -DwxWidgets_CONFIG_EXECUTABLE=%{_bindir}/wx-gtk3-unicode-config \ | |
245 | -DKICAD_USE_OCC=ON \ | |
246 | -DKICAD_USE_EGL=ON \ | |
6910bb76 | 247 | -DKICAD_USE_BUNDLED_GLEW=OFF \ |
1de26e2a | 248 | -DKICAD_SCRIPTING=ON \ |
d8fd94ea | 249 | -DKICAD_SCRIPTING_PYTHON3=ON \ |
1de26e2a | 250 | -DKICAD_SCRIPTING_MODULES=ON \ |
d8fd94ea JR |
251 | -DKICAD_SCRIPTING_WXPYTHON=OFF \ |
252 | -DKICAD_SCRIPTING_WXPYTHON_PHOENIX=ON \ | |
1de26e2a | 253 | %{cmake_on_off tests KICAD_BUILD_QA_TESTS} |
c4549a7b JR |
254 | |
255 | %{__make} VERBOSE=1 | |
4b5aca64 | 256 | |
1de26e2a BS |
257 | %if %{with tests} |
258 | %{__make} test ARGS=--output-on-failure | |
259 | %endif | |
260 | ||
4b5aca64 | 261 | %install |
262 | rm -rf $RPM_BUILD_ROOT | |
263 | ||
26c94a74 BS |
264 | install_library() { |
265 | %{__make} -C $1/build install \ | |
266 | DESTDIR=$RPM_BUILD_ROOT | |
267 | } | |
268 | ||
c4549a7b | 269 | # KiCAD itself |
ed1b91c8 | 270 | %{__make} -C build install \ |
c4549a7b JR |
271 | DESTDIR=$RPM_BUILD_ROOT |
272 | ||
273 | # Symbols libraries | |
26c94a74 BS |
274 | install_library %{name}-symbols-%{version} |
275 | install_library %{name}-footprints-%{version} | |
276 | install_library %{name}-templates-%{version} | |
b76338ad | 277 | %if %{with packages3D} |
26c94a74 | 278 | install_library %{name}-packages3D-%{version} |
b76338ad BS |
279 | %else |
280 | install -d $RPM_BUILD_ROOT%{_datadir}/%{name}/modules/packages3d | |
281 | %endif | |
ed1b91c8 JR |
282 | |
283 | # Documentation | |
284 | %{__make} -C %{name}-doc-%{version}/build install \ | |
285 | DESTDIR=$RPM_BUILD_ROOT | |
286 | ||
72576aa7 JR |
287 | %{__mv} $RPM_BUILD_ROOT%{_localedir}/{no,nb} |
288 | %{__mv} $RPM_BUILD_ROOT%{_localedir}/pt_{br,BR} | |
289 | ||
74131d84 AM |
290 | %find_lang %{name} |
291 | ||
292 | %post | |
26c94a74 | 293 | /sbin/ldconfig |
74131d84 AM |
294 | %update_mime_database |
295 | %update_desktop_database_post | |
296 | %update_icon_cache hicolor | |
2a9578af | 297 | |
74131d84 | 298 | %postun |
26c94a74 | 299 | /sbin/ldconfig |
74131d84 AM |
300 | %update_mime_database |
301 | %update_desktop_database_postun | |
302 | %update_icon_cache hicolor | |
7a3fb9b5 | 303 | |
4b5aca64 | 304 | %clean |
305 | rm -rf $RPM_BUILD_ROOT | |
306 | ||
74131d84 | 307 | %files -f %{name}.lang |
4b5aca64 | 308 | %defattr(644,root,root,755) |
d8fd94ea | 309 | %doc AUTHORS.txt README.md |
74131d84 | 310 | %attr(755,root,root) %{_bindir}/bitmap2component |
c4549a7b JR |
311 | %attr(755,root,root) %{_bindir}/_cvpcb.kiface |
312 | %attr(755,root,root) %{_bindir}/dxf2idf | |
2d418e55 | 313 | %attr(755,root,root) %{_bindir}/eeschema |
c4549a7b | 314 | %attr(755,root,root) %{_bindir}/_eeschema.kiface |
2d418e55 | 315 | %attr(755,root,root) %{_bindir}/gerbview |
c4549a7b JR |
316 | %attr(755,root,root) %{_bindir}/_gerbview.kiface |
317 | %attr(755,root,root) %{_bindir}/idf2vrml | |
318 | %attr(755,root,root) %{_bindir}/idfcyl | |
319 | %attr(755,root,root) %{_bindir}/idfrect | |
74131d84 | 320 | %attr(755,root,root) %{_bindir}/kicad |
d8fd94ea JR |
321 | %attr(755,root,root) %{_bindir}/kicad-cli |
322 | %attr(755,root,root) %{_bindir}/_kipython.kiface | |
74131d84 | 323 | %attr(755,root,root) %{_bindir}/pcb_calculator |
c4549a7b | 324 | %attr(755,root,root) %{_bindir}/_pcb_calculator.kiface |
74131d84 | 325 | %attr(755,root,root) %{_bindir}/pcbnew |
c4549a7b JR |
326 | %attr(755,root,root) %{_bindir}/_pcbnew.kiface |
327 | %attr(755,root,root) %{_bindir}/pl_editor | |
328 | %attr(755,root,root) %{_bindir}/_pl_editor.kiface | |
26c94a74 BS |
329 | %attr(755,root,root) %{_libdir}/libkicad_3dsg.so.*.*.* |
330 | %ghost %{_libdir}/libkicad_3dsg.so | |
7a3fb9b5 ŁK |
331 | %dir %{_libdir}/%{name} |
332 | %dir %{_libdir}/%{name}/plugins | |
26c94a74 BS |
333 | %dir %{_libdir}/%{name}/plugins/3d |
334 | %attr(755,root,root) %{_libdir}/%{name}/plugins/3d/*.so | |
335 | #python - to subpackage? | |
d8fd94ea JR |
336 | %attr(755,root,root) %{py3_sitedir}/_pcbnew.so |
337 | %{py3_sitedir}/pcbnew.py | |
26c94a74 BS |
338 | %dir %{_datadir}/%{name} |
339 | %{_datadir}/%{name}/demos | |
d8fd94ea | 340 | %{_datadir}/%{name}/footprints |
d8fd94ea JR |
341 | %{_datadir}/%{name}/plugins |
342 | %{_datadir}/%{name}/resources | |
343 | %{_datadir}/%{name}/schemas | |
344 | %{_datadir}/%{name}/scripting | |
345 | %{_datadir}/%{name}/symbols | |
346 | %{_datadir}/%{name}/template | |
74131d84 AM |
347 | %{_iconsdir}/hicolor/*x*/*/*.png |
348 | %{_iconsdir}/hicolor/scalable/*/*.svg | |
26c94a74 | 349 | %{_datadir}/mime/packages/kicad-*.xml |
d8fd94ea JR |
350 | %{_metainfodir}/org.kicad.kicad.metainfo.xml |
351 | %{_desktopdir}/org.kicad.eeschema.desktop | |
352 | %{_desktopdir}/org.kicad.kicad.desktop | |
353 | %{_desktopdir}/org.kicad.bitmap2component.desktop | |
354 | %{_desktopdir}/org.kicad.gerbview.desktop | |
355 | %{_desktopdir}/org.kicad.pcbcalculator.desktop | |
356 | %{_desktopdir}/org.kicad.pcbnew.desktop | |
c4549a7b JR |
357 | #%{_datadir}/mimelnk/application/x-kicad-pcb.desktop |
358 | #%{_datadir}/mimelnk/application/x-kicad-project.desktop | |
359 | #%{_datadir}/mimelnk/application/x-kicad-schematic.desktop | |
88bfc3ad ER |
360 | |
361 | %dir %{_docdir}/%{name} | |
26c94a74 | 362 | |
b76338ad | 363 | %if %{with packages3D} |
26c94a74 BS |
364 | %files packages3D |
365 | %defattr(644,root,root,755) | |
93c5b63a | 366 | %{_datadir}/%{name}/3dmodels |
b76338ad | 367 | %endif |
88bfc3ad ER |
368 | |
369 | %files doc | |
370 | %defattr(644,root,root,755) | |
371 | %dir %{_docdir}/%{name} | |
88bfc3ad ER |
372 | %dir %{_docdir}/%{name}/help |
373 | %{_docdir}/%{name}/help/en | |
88bfc3ad | 374 | |
c4549a7b JR |
375 | %files doc-ca |
376 | %defattr(644,root,root,755) | |
377 | %lang(ca) %{_docdir}/%{name}/help/ca | |
378 | ||
88bfc3ad ER |
379 | %files doc-de |
380 | %defattr(644,root,root,755) | |
381 | %lang(de) %{_docdir}/%{name}/help/de | |
88bfc3ad ER |
382 | |
383 | %files doc-es | |
384 | %defattr(644,root,root,755) | |
385 | %lang(es) %{_docdir}/%{name}/help/es | |
88bfc3ad ER |
386 | |
387 | %files doc-fr | |
388 | %defattr(644,root,root,755) | |
389 | %lang(fr) %{_docdir}/%{name}/help/fr | |
88bfc3ad | 390 | |
c4549a7b | 391 | %files doc-id |
88bfc3ad | 392 | %defattr(644,root,root,755) |
c4549a7b | 393 | %lang(id) %{_docdir}/%{name}/help/id |
88bfc3ad ER |
394 | |
395 | %files doc-it | |
396 | %defattr(644,root,root,755) | |
397 | %lang(it) %{_docdir}/%{name}/help/it | |
88bfc3ad ER |
398 | |
399 | %files doc-ja | |
400 | %defattr(644,root,root,755) | |
401 | %lang(ja) %{_docdir}/%{name}/help/ja | |
88bfc3ad | 402 | |
c4549a7b | 403 | %files doc-pl |
88bfc3ad | 404 | %defattr(644,root,root,755) |
c4549a7b | 405 | %lang(pl) %{_docdir}/%{name}/help/pl |
88bfc3ad ER |
406 | |
407 | %files doc-ru | |
408 | %defattr(644,root,root,755) | |
409 | %lang(ru) %{_docdir}/%{name}/help/ru | |
26c94a74 BS |
410 | |
411 | %files doc-zh | |
412 | %defattr(644,root,root,755) | |
413 | %lang(zh) %{_docdir}/%{name}/help/zh |