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