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