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