1 |
%define Werror_cflags %nil |
2 |
|
3 |
# Use ./update.sh to generate latest tarballs and the corresponding |
4 |
# specfile fragment |
5 |
|
6 |
%define date 20130725 |
7 |
%define revision 4024 |
8 |
|
9 |
%define docname kicad-doc |
10 |
%define docdate 20130926 |
11 |
%define docrevision 493 |
12 |
%define docversion %{docdate}.bzr%{docrevision} |
13 |
|
14 |
%define libname kicad-library |
15 |
%define libdate 20130923 |
16 |
%define librevision 274 |
17 |
%define libversion %{libdate}.bzr%{librevision} |
18 |
|
19 |
|
20 |
Name: kicad |
21 |
Summary: An open source program for the creation of electronic schematic diagrams |
22 |
Version: %{date}.bzr%{revision} |
23 |
Release: %mkrel 3 |
24 |
Source0: %{name}-sources-bzr%{revision}.tar.bz2 |
25 |
Source1: %{docname}-bzr%{docrevision}.tar.bz2 |
26 |
Source2: %{libname}-bzr%{librevision}.tar.bz2 |
27 |
Source3: eeschema.svg |
28 |
License: GPLv2+ |
29 |
Group: Sciences/Computer science |
30 |
Url: http://www.lis.inpg.fr/realise_au_lis/kicad/ |
31 |
BuildRequires: libwxgtku-devel >= 2.6 |
32 |
BuildRequires: mesa-common-devel |
33 |
BuildRequires: imagemagick |
34 |
BuildRequires: boost-devel |
35 |
BuildRequires: cmake |
36 |
BuildRequires: desktop-file-utils |
37 |
Requires: %{libname} |
38 |
Requires: %{docname} |
39 |
Suggests: %{name}-locale |
40 |
|
41 |
%description |
42 |
Kicad is an open source (GPL) program for the creation of electronic |
43 |
schematic diagrams and printed circuit board artwork. |
44 |
|
45 |
Kicad is a set of four programs and a project manager: |
46 |
|
47 |
* Eeschema: Schematic entry. |
48 |
* Pcbnew: Board editor. |
49 |
* Gerbview: GERBER viewer (photoplotter documents). |
50 |
* Cvpcb: footprint selector for components used in the circuit design. |
51 |
* Kicad: project manager. |
52 |
|
53 |
%package doc |
54 |
Summary: Documentation for kicad (creation of electronic schematic diagrams) |
55 |
Version: %{docversion} |
56 |
Release: %mkrel 3 |
57 |
License: GPL |
58 |
Requires: %{name} |
59 |
BuildArch: noarch |
60 |
|
61 |
%description doc |
62 |
Kicad is an open source (GPL) program for the creation of electronic |
63 |
schematic diagrams and printed circuit board artwork. |
64 |
|
65 |
Kicad-doc is the documentation for kicad. |
66 |
|
67 |
%package locales-ca |
68 |
Summary: Catalan Kicad locales |
69 |
Version: %{docversion} |
70 |
Release: %mkrel 3 |
71 |
License: GPL |
72 |
Requires: %{name} |
73 |
Requires: locales-ca |
74 |
Provides: %{name}-locale |
75 |
BuildArch: noarch |
76 |
|
77 |
%description locales-ca |
78 |
Kicad is an open source (GPL) program for the creation of electronic |
79 |
schematic diagrams and printed circuit board artwork. |
80 |
|
81 |
Kicad-locales provides Catalan locales for kicad. |
82 |
|
83 |
%package locales-cs |
84 |
Summary: Czech Kicad locales |
85 |
Version: %{docversion} |
86 |
Release: %mkrel 3 |
87 |
License: GPL |
88 |
Requires: %{name} |
89 |
Requires: locales-cs |
90 |
Provides: %{name}-locale |
91 |
BuildArch: noarch |
92 |
|
93 |
%description locales-cs |
94 |
Kicad is an open source (GPL) program for the creation of electronic |
95 |
schematic diagrams and printed circuit board artwork. |
96 |
|
97 |
Kicad-locales provides Czech locales for kicad. |
98 |
|
99 |
%package locales-de |
100 |
Summary: German Kicad locales |
101 |
Version: %{docversion} |
102 |
Release: %mkrel 3 |
103 |
License: GPL |
104 |
Requires: %{name} |
105 |
Requires: locales-de |
106 |
Provides: %{name}-locale |
107 |
BuildArch: noarch |
108 |
|
109 |
%description locales-de |
110 |
Kicad is an open source (GPL) program for the creation of electronic |
111 |
schematic diagrams and printed circuit board artwork. |
112 |
|
113 |
Kicad-locales provides German locales for kicad. |
114 |
|
115 |
%package locales-en |
116 |
Summary: English Kicad locales |
117 |
Version: %{docversion} |
118 |
Release: %mkrel 3 |
119 |
License: GPL |
120 |
Requires: %{name} |
121 |
Requires: locales-en |
122 |
Provides: %{name}-locale |
123 |
BuildArch: noarch |
124 |
|
125 |
%description locales-en |
126 |
Kicad is an open source (GPL) program for the creation of electronic |
127 |
schematic diagrams and printed circuit board artwork. |
128 |
|
129 |
Kicad-locales provides English locales for kicad. |
130 |
|
131 |
%package locales-es |
132 |
Summary: Spanish Kicad locales |
133 |
Version: %{docversion} |
134 |
Release: %mkrel 3 |
135 |
License: GPL |
136 |
Requires: %{name} |
137 |
Requires: locales-es |
138 |
Provides: %{name}-locale |
139 |
BuildArch: noarch |
140 |
|
141 |
%description locales-es |
142 |
Kicad is an open source (GPL) program for the creation of electronic |
143 |
schematic diagrams and printed circuit board artwork. |
144 |
|
145 |
Kicad-locales provides Spanish locales for kicad. |
146 |
|
147 |
%package locales-fi |
148 |
Summary: Finnish Kicad locales |
149 |
Version: %{docversion} |
150 |
Release: %mkrel 3 |
151 |
License: GPL |
152 |
Requires: %{name} |
153 |
Requires: locales-fi |
154 |
Provides: %{name}-locale |
155 |
BuildArch: noarch |
156 |
|
157 |
%description locales-fi |
158 |
Kicad is an open source (GPL) program for the creation of electronic |
159 |
schematic diagrams and printed circuit board artwork. |
160 |
|
161 |
Kicad-locales provides Finnish locales for kicad. |
162 |
|
163 |
%package locales-fr |
164 |
Summary: French Kicad locales |
165 |
Version: %{docversion} |
166 |
Release: %mkrel 3 |
167 |
License: GPL |
168 |
Requires: %{name} |
169 |
Requires: locales-fr |
170 |
Provides: %{name}-locale |
171 |
BuildArch: noarch |
172 |
|
173 |
%description locales-fr |
174 |
Kicad is an open source (GPL) program for the creation of electronic |
175 |
schematic diagrams and printed circuit board artwork. |
176 |
|
177 |
Kicad-locales provides French locales for kicad. |
178 |
|
179 |
%package locales-hu |
180 |
Summary: Hungarian Kicad locales |
181 |
Version: %{docversion} |
182 |
Release: %mkrel 3 |
183 |
License: GPL |
184 |
Requires: %{name} |
185 |
Requires: locales-hu |
186 |
Provides: %{name}-locale |
187 |
BuildArch: noarch |
188 |
|
189 |
%description locales-hu |
190 |
Kicad is an open source (GPL) program for the creation of electronic |
191 |
schematic diagrams and printed circuit board artwork. |
192 |
|
193 |
Kicad-locales provides Hungarian locales for kicad. |
194 |
|
195 |
%package locales-it |
196 |
Summary: Italian Kicad locales |
197 |
Version: %{docversion} |
198 |
Release: %mkrel 3 |
199 |
License: GPL |
200 |
Requires: %{name} |
201 |
Requires: locales-it |
202 |
Provides: %{name}-locale |
203 |
BuildArch: noarch |
204 |
|
205 |
%description locales-it |
206 |
Kicad is an open source (GPL) program for the creation of electronic |
207 |
schematic diagrams and printed circuit board artwork. |
208 |
|
209 |
Kicad-locales provides Italian locales for kicad. |
210 |
|
211 |
%package locales-ja |
212 |
Summary: Japanese Kicad locales |
213 |
Version: %{docversion} |
214 |
Release: %mkrel 3 |
215 |
License: GPL |
216 |
Requires: %{name} |
217 |
Requires: locales-ja |
218 |
Provides: %{name}-locale |
219 |
BuildArch: noarch |
220 |
|
221 |
%description locales-ja |
222 |
Kicad is an open source (GPL) program for the creation of electronic |
223 |
schematic diagrams and printed circuit board artwork. |
224 |
|
225 |
Kicad-locales provides Japanese locales for kicad. |
226 |
|
227 |
%package locales-ko |
228 |
Summary: Korean Kicad locales |
229 |
Version: %{docversion} |
230 |
Release: %mkrel 3 |
231 |
License: GPL |
232 |
Requires: %{name} |
233 |
Requires: locales-ko |
234 |
Provides: %{name}-locale |
235 |
BuildArch: noarch |
236 |
|
237 |
%description locales-ko |
238 |
Kicad is an open source (GPL) program for the creation of electronic |
239 |
schematic diagrams and printed circuit board artwork. |
240 |
|
241 |
Kicad-locales provides Korean locales for kicad. |
242 |
|
243 |
%package locales-nl |
244 |
Summary: Dutch Kicad locales |
245 |
Version: %{docversion} |
246 |
Release: %mkrel 3 |
247 |
License: GPL |
248 |
Requires: %{name} |
249 |
Requires: locales-nl |
250 |
Provides: %{name}-locale |
251 |
BuildArch: noarch |
252 |
|
253 |
%description locales-nl |
254 |
Kicad is an open source (GPL) program for the creation of electronic |
255 |
schematic diagrams and printed circuit board artwork. |
256 |
|
257 |
Kicad-locales provides Dutch locales for kicad. |
258 |
|
259 |
%package locales-pl |
260 |
Summary: Polish Kicad locales |
261 |
Version: %{docversion} |
262 |
Release: %mkrel 3 |
263 |
License: GPL |
264 |
Requires: %{name} |
265 |
Requires: locales-pl |
266 |
Provides: %{name}-locale |
267 |
BuildArch: noarch |
268 |
|
269 |
%description locales-pl |
270 |
Kicad is an open source (GPL) program for the creation of electronic |
271 |
schematic diagrams and printed circuit board artwork. |
272 |
|
273 |
Kicad-locales provides Polish locales for kicad. |
274 |
|
275 |
%package locales-pt |
276 |
Summary: Portuguese Kicad locales |
277 |
Version: %{docversion} |
278 |
Release: %mkrel 3 |
279 |
License: GPL |
280 |
Requires: %{name} |
281 |
Requires: locales-pt |
282 |
Provides: %{name}-locale |
283 |
BuildArch: noarch |
284 |
|
285 |
%description locales-pt |
286 |
Kicad is an open source (GPL) program for the creation of electronic |
287 |
schematic diagrams and printed circuit board artwork. |
288 |
|
289 |
Kicad-locales provides Portuguese locales for kicad. |
290 |
|
291 |
%package locales-ru |
292 |
Summary: Russian Kicad locales |
293 |
Version: %{docversion} |
294 |
Release: %mkrel 3 |
295 |
License: GPL |
296 |
Requires: %{name} |
297 |
Requires: locales-ru |
298 |
Provides: %{name}-locale |
299 |
BuildArch: noarch |
300 |
|
301 |
%description locales-ru |
302 |
Kicad is an open source (GPL) program for the creation of electronic |
303 |
schematic diagrams and printed circuit board artwork. |
304 |
|
305 |
Kicad-locales provides Russian locales for kicad. |
306 |
|
307 |
%package locales-sl |
308 |
Summary: Slovenian Kicad locales |
309 |
Version: %{docversion} |
310 |
Release: %mkrel 3 |
311 |
License: GPL |
312 |
Requires: %{name} |
313 |
Requires: locales-sl |
314 |
Provides: %{name}-locale |
315 |
BuildArch: noarch |
316 |
|
317 |
%description locales-sl |
318 |
Kicad is an open source (GPL) program for the creation of electronic |
319 |
schematic diagrams and printed circuit board artwork. |
320 |
|
321 |
Kicad-locales provides Slovenian locales for kicad. |
322 |
|
323 |
%package locales-sv |
324 |
Summary: Salvadoran Kicad locales |
325 |
Version: %{docversion} |
326 |
Release: %mkrel 3 |
327 |
License: GPL |
328 |
Requires: %{name} |
329 |
Requires: locales-sv |
330 |
Provides: %{name}-locale |
331 |
BuildArch: noarch |
332 |
|
333 |
%description locales-sv |
334 |
Kicad is an open source (GPL) program for the creation of electronic |
335 |
schematic diagrams and printed circuit board artwork. |
336 |
|
337 |
Kicad-locales provides Salvadoran locales for kicad. |
338 |
|
339 |
%package locales-zh-cn |
340 |
Summary: Chinese Kicad locales |
341 |
Version: %{docversion} |
342 |
Release: %mkrel 3 |
343 |
License: GPL |
344 |
Requires: %{name} |
345 |
Requires: locales-zh |
346 |
Provides: %{name}-locale |
347 |
BuildArch: noarch |
348 |
|
349 |
%description locales-zh-cn |
350 |
Kicad is an open source (GPL) program for the creation of electronic |
351 |
schematic diagrams and printed circuit board artwork. |
352 |
|
353 |
Kicad-locales provides Chinese locales for kicad. |
354 |
|
355 |
%package library |
356 |
Summary: Library for kicad (creation of electronic schematic diagrams) |
357 |
Version: %{libversion} |
358 |
Release: %mkrel 3 |
359 |
License: GPL |
360 |
Requires: %{name} |
361 |
BuildArch: noarch |
362 |
|
363 |
%description library |
364 |
Kicad is an open source (GPL) program for the creation of electronic |
365 |
schematic diagrams and printed circuit board artwork. |
366 |
|
367 |
Kicad-library is a set of library needed by kicad. |
368 |
|
369 |
%prep |
370 |
%setup -q -T -b 0 -n %{name} |
371 |
%setup -q -T -b 1 -n %{docname} |
372 |
%setup -q -T -b 2 -n %{libname} |
373 |
cd .. |
374 |
|
375 |
%build |
376 |
export LC_ALL=C |
377 |
cd ../ |
378 |
|
379 |
# Building kicad-doc |
380 |
pushd %{docname} |
381 |
%cmake \ |
382 |
-DKICAD_STABLE_VERSION:BOOL=ON \ |
383 |
-DCMAKE_BUILD_TYPE=Release |
384 |
%make |
385 |
popd |
386 |
|
387 |
# Building kicad-library |
388 |
pushd %{libname} |
389 |
%cmake \ |
390 |
-DKICAD_STABLE_VERSION:BOOL=ON \ |
391 |
-DCMAKE_BUILD_TYPE=Release |
392 |
%make |
393 |
popd |
394 |
|
395 |
# Building kicad |
396 |
pushd %{name} |
397 |
%cmake \ |
398 |
-DBUILD_SHARED_LIBS:BOOL=OFF \ |
399 |
-DKICAD_STABLE_VERSION:BOOL=ON \ |
400 |
-DCMAKE_BUILD_TYPE=Release |
401 |
|
402 |
#ugly workaround to fix build |
403 |
#dunno what causes the extra ; in CXX_FLAGS which causes the failure |
404 |
find . -name flags.make -exec sed -i -e 's,-pthread;-fpermissive,-pthread -fpermissive,g' {} \; |
405 |
find . -name link.txt -exec sed -i -e 's,-pthread;-fpermissive,-pthread -fpermissive,g' {} \; |
406 |
|
407 |
%make |
408 |
popd |
409 |
|
410 |
%install |
411 |
cd ../ |
412 |
|
413 |
# Installing kicad-doc |
414 |
pushd %{docname} |
415 |
make -C build DESTDIR=%buildroot install |
416 |
popd |
417 |
|
418 |
# Installing kicad-library |
419 |
pushd %{libname} |
420 |
make -C build DESTDIR=%buildroot install |
421 |
popd |
422 |
|
423 |
# Installing kicad |
424 |
pushd %{name} |
425 |
make -C build DESTDIR=%buildroot install |
426 |
|
427 |
# create desktop file |
428 |
desktop-file-install --vendor='' \ |
429 |
--remove-category='Scientific' \ |
430 |
--add-category='Science;Electronics;Education' \ |
431 |
--dir=%buildroot%{_datadir}/applications \ |
432 |
%buildroot%{_datadir}/applications/*.desktop |
433 |
|
434 |
# create icons |
435 |
mkdir -p %{buildroot}%{_miconsdir} %{buildroot}%{_iconsdir} %{buildroot}%{_liconsdir} |
436 |
convert -resize 16x16 %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg %{buildroot}%{_miconsdir}/%{name}.png |
437 |
convert -resize 32x32 %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg %{buildroot}%{_iconsdir}/%{name}.png |
438 |
convert -resize 48x48 %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg %{buildroot}%{_liconsdir}/%{name}.png |
439 |
# add icon for eeschema, mga#8425 |
440 |
install -m 0644 %{SOURCE3} %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/eeschema.svg |
441 |
convert -resize 16x16 %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/eeschema.svg %{buildroot}%{_miconsdir}/eeschema.png |
442 |
convert -resize 32x32 %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/eeschema.svg %{buildroot}%{_iconsdir}/eeschema.png |
443 |
convert -resize 48x48 %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/eeschema.svg %{buildroot}%{_liconsdir}/eeschema.png |
444 |
popd |
445 |
|
446 |
%files |
447 |
%{_bindir}/* |
448 |
%{_prefix}/lib/%{name}/plugins/netlist_form_pads-pcb.xsl |
449 |
%{_iconsdir}/*/*/* |
450 |
%{_iconsdir}/%{name}.png |
451 |
%{_liconsdir}/%{name}.png |
452 |
%{_miconsdir}/%{name}.png |
453 |
%{_iconsdir}/eeschema.png |
454 |
%{_liconsdir}/eeschema.png |
455 |
%{_miconsdir}/eeschema.png |
456 |
%{_datadir}/%{name}/demos/ |
457 |
%{_datadir}/%{name}/template/ |
458 |
%{_datadir}/applications |
459 |
%{_datadir}/mime/packages/kicad.xml |
460 |
%{_datadir}/mimelnk/application/x-kicad-project.desktop |
461 |
%{_datadir}/mimelnk/application/x-kicad-schematic.desktop |
462 |
|
463 |
%files doc |
464 |
%doc %{_datadir}/doc/%{name} |
465 |
|
466 |
%files locales-ca |
467 |
%{_datadir}/%{name}/internat/ca/ |
468 |
|
469 |
%files locales-cs |
470 |
%{_datadir}/%{name}/internat/cs/ |
471 |
|
472 |
%files locales-de |
473 |
%{_datadir}/%{name}/internat/de/ |
474 |
|
475 |
%files locales-en |
476 |
# No files in this package |
477 |
|
478 |
%files locales-es |
479 |
%{_datadir}/%{name}/internat/es/ |
480 |
|
481 |
%files locales-fi |
482 |
%{_datadir}/%{name}/internat/fi/ |
483 |
|
484 |
%files locales-fr |
485 |
%{_datadir}/%{name}/internat/fr/ |
486 |
|
487 |
%files locales-hu |
488 |
%{_datadir}/%{name}/internat/hu/ |
489 |
|
490 |
%files locales-it |
491 |
%{_datadir}/%{name}/internat/it/ |
492 |
|
493 |
%files locales-ja |
494 |
%{_datadir}/%{name}/internat/ja/ |
495 |
|
496 |
%files locales-ko |
497 |
%{_datadir}/%{name}/internat/ko/ |
498 |
|
499 |
%files locales-nl |
500 |
%{_datadir}/%{name}/internat/nl/ |
501 |
|
502 |
%files locales-pl |
503 |
%{_datadir}/%{name}/internat/pl/ |
504 |
|
505 |
%files locales-pt |
506 |
%{_datadir}/%{name}/internat/pt/ |
507 |
|
508 |
%files locales-ru |
509 |
%{_datadir}/%{name}/internat/ru/ |
510 |
|
511 |
%files locales-sl |
512 |
%{_datadir}/%{name}/internat/sl |
513 |
|
514 |
%files locales-sv |
515 |
%{_datadir}/%{name}/internat/sv/ |
516 |
|
517 |
%files locales-zh-cn |
518 |
%{_datadir}/%{name}/internat/zh_CN/ |
519 |
|
520 |
%files library |
521 |
%{_datadir}/%{name}/library |
522 |
%{_datadir}/%{name}/modules |