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