1 |
%define Werror_cflags %nil |
2 |
|
3 |
%define docname kicad-doc |
4 |
%define symname kicad-symbols |
5 |
%define p3dname kicad-packages3D |
6 |
%define templname kicad-templates |
7 |
%define fpname kicad-footprints |
8 |
%define i18nname kicad-i18n |
9 |
|
10 |
%define branch 5.0 |
11 |
|
12 |
|
13 |
Name: kicad |
14 |
Summary: An open source program for the creation of electronic schematic diagrams |
15 |
Epoch: 1 |
16 |
Version: 5.1.2 |
17 |
Release: %mkrel 2 |
18 |
License: GPLv3+ |
19 |
Group: Sciences/Computer science |
20 |
Url: http://kicad-pcb.org/ |
21 |
Source0: https://launchpad.net/%{name}/%{branch}/%{version}/+download/%{name}-%{version}.tar.xz |
22 |
Source1: https://github.com/KiCad/%{docname}/archive/%{version}/%{docname}-%{version}.tar.gz |
23 |
Source2: https://github.com/KiCad/%{symname}/archive/%{version}/%{symname}-%{version}.tar.gz |
24 |
Source3: https://github.com/KiCad/%{p3dname}/archive/%{version}/%{p3dname}-%{version}.tar.gz |
25 |
Source4: https://github.com/KiCad/%{templname}/archive/%{version}/%{templname}-%{version}.tar.gz |
26 |
Source5: https://github.com/KiCad/%{fpname}/archive/%{version}/%{fpname}-%{version}.tar.gz |
27 |
Source6: https://github.com/KiCad/%{i18nname}/archive/%{version}/%{i18nname}-%{version}.tar.gz |
28 |
|
29 |
# This needs to be aligned with kicad-library-*/template/fp-lib-table.for-pretty |
30 |
|
31 |
Patch1: kicad-5.1.0-nostrip.patch |
32 |
|
33 |
BuildRequires: wxgtk-devel >= 3.0 |
34 |
BuildRequires: mesa-common-devel |
35 |
BuildRequires: imagemagick |
36 |
BuildRequires: boost-devel |
37 |
BuildRequires: glm-devel |
38 |
BuildRequires: oce-devel |
39 |
BuildRequires: ngspice-devel |
40 |
BuildRequires: pkgconfig(glew) |
41 |
BuildRequires: pkgconfig(cairo) |
42 |
BuildRequires: pkgconfig(openssl) >= 1.1 |
43 |
BuildRequires: libgomp-devel |
44 |
BuildRequires: pkgconfig(libcurl) |
45 |
BuildRequires: cmake |
46 |
# doc |
47 |
BuildRequires: dblatex |
48 |
BuildRequires: po4a |
49 |
BuildRequires: asciidoc |
50 |
BuildRequires: git |
51 |
BuildRequires: perl(Unicode::LineBreak) |
52 |
BuildRequires: source-highlight |
53 |
# python scripting |
54 |
BuildRequires: pkgconfig(python3) |
55 |
BuildRequires: python3-wxpython4 |
56 |
BuildRequires: swig |
57 |
|
58 |
BuildRequires: desktop-file-utils |
59 |
Requires: %{name}-library |
60 |
Requires: %{docname} |
61 |
Requires: %{i18nname} |
62 |
Requires: python3-wxpython4 |
63 |
|
64 |
%description |
65 |
Kicad is an open source (GPL) program for the creation of electronic |
66 |
schematic diagrams and printed circuit board artwork. |
67 |
|
68 |
Kicad is a set of four programs and a project manager: |
69 |
|
70 |
* Eeschema: Schematic entry. |
71 |
* Pcbnew: Board editor. |
72 |
* Gerbview: GERBER viewer (photoplotter documents). |
73 |
* Cvpcb: footprint selector for components used in the circuit design. |
74 |
* Kicad: project manager. |
75 |
|
76 |
%package doc |
77 |
Summary: Documentation for kicad (creation of electronic schematic diagrams) |
78 |
Requires: %{name} |
79 |
BuildArch: noarch |
80 |
|
81 |
%description doc |
82 |
Kicad is an open source (GPL) program for the creation of electronic |
83 |
schematic diagrams and printed circuit board artwork. |
84 |
|
85 |
Kicad-doc is the documentation for kicad. |
86 |
|
87 |
%package i18n |
88 |
Summary: Kicad locales |
89 |
Requires: %{name} |
90 |
BuildArch: noarch |
91 |
|
92 |
Obsoletes: kicad-locales-ca |
93 |
Obsoletes: kicad-locales-cs |
94 |
Obsoletes: kicad-locales-de |
95 |
Obsoletes: kicad-locales-en |
96 |
Obsoletes: kicad-locales-es |
97 |
Obsoletes: kicad-locales-fi |
98 |
Obsoletes: kicad-locales-fr |
99 |
Obsoletes: kicad-locales-hu |
100 |
Obsoletes: kicad-locales-it |
101 |
Obsoletes: kicad-locales-ja |
102 |
Obsoletes: kicad-locales-ko |
103 |
Obsoletes: kicad-locales-lt |
104 |
Obsoletes: kicad-locales-nl |
105 |
Obsoletes: kicad-locales-pl |
106 |
Obsoletes: kicad-locales-pt |
107 |
Obsoletes: kicad-locales-ru |
108 |
Obsoletes: kicad-locales-sl |
109 |
Obsoletes: kicad-locales-sv |
110 |
Obsoletes: kicad-locales-zh-cn |
111 |
|
112 |
%description i18n |
113 |
Kicad is an open source (GPL) program for the creation of electronic |
114 |
schematic diagrams and printed circuit board artwork. |
115 |
|
116 |
Kicad-i18n provides locales for kicad. |
117 |
|
118 |
|
119 |
%package library |
120 |
Summary: Library for kicad (creation of electronic schematic diagrams) |
121 |
License: LGPLv2 |
122 |
Requires: %{name} |
123 |
BuildArch: noarch |
124 |
|
125 |
%description library |
126 |
Kicad is an open source (GPL) program for the creation of electronic |
127 |
schematic diagrams and printed circuit board artwork. |
128 |
|
129 |
Kicad-library is a set of libraries needed by kicad. |
130 |
|
131 |
%prep |
132 |
%setup -q -a 1 -a 2 -a 3 -a 4 -a 5 -a 6 |
133 |
%patch1 -p1 |
134 |
|
135 |
%build |
136 |
export LC_ALL=C |
137 |
|
138 |
# Building kicad |
139 |
# Set CMAKE_PREFIX_PATH because of a misconfiguration in opencascade |
140 |
%cmake \ |
141 |
-DBUILD_SHARED_LIBS:BOOL=OFF \ |
142 |
-DCMAKE_BUILD_TYPE=Release \ |
143 |
-DKICAD_BUILD_VERSION=%{version} \ |
144 |
-DBUILD_GITHUB_PLUGIN=ON \ |
145 |
-DKICAD_SCRIPTING=ON \ |
146 |
-DKICAD_SCRIPTING_MODULES=ON \ |
147 |
-DKICAD_SCRIPTING_WXPYTHON=ON \ |
148 |
-DKICAD_SCRIPTING_WXPYTHON_PHOENIX=ON \ |
149 |
-DKICAD_SCRIPTING_PYTHON3=ON \ |
150 |
-DKICAD_SCRIPTING_ACTION_MENU=ON \ |
151 |
-DCPACK_DO_STRIP=OFF |
152 |
%make_build |
153 |
# for %%cmake: |
154 |
cd .. |
155 |
|
156 |
# Building kicad-doc |
157 |
pushd %{docname}-%{version} |
158 |
%cmake \ |
159 |
-DCMAKE_BUILD_TYPE=Release \ |
160 |
-DBUILD_FORMATS=html |
161 |
%make_build |
162 |
popd |
163 |
|
164 |
# Building kicad-symbols |
165 |
pushd %{symname}-%{version} |
166 |
%cmake \ |
167 |
-DCMAKE_BUILD_TYPE=Release |
168 |
%make_build |
169 |
popd |
170 |
|
171 |
# Building kicad-packages3D |
172 |
pushd %{p3dname}-%{version} |
173 |
%cmake \ |
174 |
-DCMAKE_BUILD_TYPE=Release |
175 |
%make_build |
176 |
popd |
177 |
|
178 |
# Building kicad-templates |
179 |
pushd %{templname}-%{version} |
180 |
%cmake \ |
181 |
-DCMAKE_BUILD_TYPE=Release |
182 |
%make_build |
183 |
popd |
184 |
|
185 |
# Building kicad-footprints |
186 |
pushd %{fpname}-%{version} |
187 |
%cmake \ |
188 |
-DCMAKE_BUILD_TYPE=Release |
189 |
%make_build |
190 |
popd |
191 |
|
192 |
|
193 |
# Building kicad-i18n |
194 |
pushd %{i18nname}-%{version} |
195 |
%cmake \ |
196 |
-DCMAKE_BUILD_TYPE=Release \ |
197 |
-DKICAD_I18N_UNIX_STRICT_PATH=ON |
198 |
%make_build |
199 |
popd |
200 |
|
201 |
%install |
202 |
pushd %{docname}-%{version} |
203 |
# Installing kicad-doc |
204 |
%make_install -C build |
205 |
popd |
206 |
|
207 |
# Installing kicad-symbols |
208 |
pushd %{symname}-%{version} |
209 |
%make_install -C build |
210 |
popd |
211 |
|
212 |
# Installing kicad-packages3D |
213 |
pushd %{p3dname}-%{version} |
214 |
%make_install -C build |
215 |
popd |
216 |
|
217 |
# Installing kicad-templates |
218 |
pushd %{templname}-%{version} |
219 |
%make_install -C build |
220 |
popd |
221 |
|
222 |
# Installing kicad-footprints |
223 |
pushd %{fpname}-%{version} |
224 |
%make_install -C build |
225 |
popd |
226 |
|
227 |
# Installing kicad-i18n |
228 |
pushd %{i18nname}-%{version} |
229 |
%make_install -C build |
230 |
popd |
231 |
%find_lang %{name} |
232 |
|
233 |
# Installing kicad |
234 |
%make_install -C build |
235 |
|
236 |
# create desktop file |
237 |
desktop-file-install --vendor='' \ |
238 |
--remove-category='Scientific' \ |
239 |
--add-category='Science;Electronics;Education' \ |
240 |
--dir=%buildroot%{_datadir}/applications \ |
241 |
%buildroot%{_datadir}/applications/*.desktop |
242 |
|
243 |
# remove unwanted devel files |
244 |
rm -r %{buildroot}%{_libdir}/libkicad_3dsg.so |
245 |
|
246 |
%files |
247 |
%{_bindir}/* |
248 |
%{_libdir}/libkicad_3dsg.so.* |
249 |
%{_iconsdir}/*/*/* |
250 |
%{python3_sitelib}/_pcbnew.so |
251 |
%{python3_sitelib}/pcbnew.* |
252 |
%{python3_sitelib}/__pycache__/* |
253 |
%{_datadir}/%{name}/demos/ |
254 |
%{_datadir}/%{name}/template/ |
255 |
%{_datadir}/applications/*.desktop |
256 |
%{_datadir}/mime/packages/kicad-*.xml |
257 |
%{_datadir}/appdata/kicad.*.xml |
258 |
%{_libdir}/%{name}/plugins/ |
259 |
%{_datadir}/%{name}/plugins/ |
260 |
%{_datadir}/%{name}/scripting/ |
261 |
%dir %{_libdir}/%{name} |
262 |
%dir %{_datadir}/%{name} |
263 |
|
264 |
%files doc |
265 |
%doc %{_docdir}/%{name}/ |
266 |
|
267 |
%files i18n -f %{name}.lang |
268 |
|
269 |
%files library |
270 |
%{_datadir}/%{name}/library |
271 |
%{_datadir}/%{name}/modules |