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