This repository has been archived by the owner on Dec 2, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
/
kicad.spec.template
224 lines (181 loc) · 5.15 KB
/
kicad.spec.template
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
%global full_version @FULL_VERSION@
Name: kicad
Version: @VERSION@
# Higher epoch than stable builds to make sure your nightly builds are prioritized
# if you enabled the nightly build repo
Epoch: @EPOCH@
Release: @RELEASE@%{?dist}
Summary: Electronic schematic diagrams and printed circuit board artwork
License: AGPLv3+
URL: http://www.kicad-pcb.org
# Source files generated by builder.sh
Source0: %{name}-%{full_version}.tar.gz
Source1: %{name}-i18n-%{full_version}.tar.gz
Source2: %{name}-templates-%{full_version}.tar.gz
Source3: %{name}-symbols-%{full_version}.tar.gz
Source4: %{name}-footprints-%{full_version}.tar.gz
Source5: %{name}-packages3D-%{full_version}.tar.gz
Source6: %{name}-doc-%{full_version}.tar.gz
# https://bugs.launchpad.net/kicad/+bug/1755752
ExclusiveArch: %{ix86} x86_64 %{arm} aarch64 ppc64le
BuildRequires: cmake
BuildRequires: desktop-file-utils
BuildRequires: doxygen
BuildRequires: gcc-c++
BuildRequires: gettext
BuildRequires: git
BuildRequires: libappstream-glib
BuildRequires: swig
BuildRequires: boost-devel
BuildRequires: glew-devel
BuildRequires: glm-devel
BuildRequires: libcurl-devel
BuildRequires: libngspice-devel
BuildRequires: openssl-devel
BuildRequires: python3-wxpython4
BuildRequires: python3-devel
BuildRequires: wxGTK3-devel
BuildRequires: opencascade-devel
# Documentation
BuildRequires: asciidoc
BuildRequires: po4a
Requires: electronics-menu
Requires: python3-wxpython4
%description
KiCad is an open-source software tool for the creation of electronic schematic
diagrams and PCB artwork. It does not present any board-size limitation and it
can handle up to 32 copper layers, 14 technical layers and 4 auxiliary layers.
Beneath its singular surface, KiCad incorporates an elegant ensemble of the
following software tools: KiCad (project manager), Eeschema (schematic editor
and component editor), Pcbnew (circuit board layout editor and footprint
editor) and GerbView (Gerber viewer).
%package packages3d
Summary: 3D models for KiCad
License: CC-BY-SA
BuildArch: noarch
Requires: kicad
%description packages3d
3D models for KiCad.
%package doc
Summary: Documentation for KiCad
License: GPLv3+
BuildArch: noarch
%description doc
Documentation for KiCad.
%prep
%setup -q -n %{name}-%{full_version} -a 1 -a 2 -a 3 -a 4 -a 5 -a 6
%build
# KiCad application
%cmake \
-DUSE_WX_GRAPHICS_CONTEXT=OFF \
-DUSE_WX_OVERLAY=OFF \
-DKICAD_SCRIPTING=ON \
-DKICAD_SCRIPTING_MODULES=ON \
-DKICAD_SCRIPTING_WXPYTHON=ON \
-DKICAD_SCRIPTING_WXPYTHON_PHOENIX=ON \
-DKICAD_SCRIPTING_PYTHON3=ON \
-DKICAD_SCRIPTING_ACTION_MENU=ON \
-DKICAD_USE_OCC=ON \
-DKICAD_INSTALL_DEMOS=ON \
-DBUILD_GITHUB_PLUGIN=ON \
-DKICAD_SPICE=ON \
@VERSION_EXTRA@ \
-DCMAKE_BUILD_TYPE=@BUILD_TYPE@ \
.
%make_build
# Localization
mkdir %{name}-i18n-%{full_version}/build/
pushd %{name}-i18n-%{full_version}/build/
%cmake \
-DKICAD_I18N_UNIX_STRICT_PATH=ON \
..
%make_build
popd
# Templates
pushd %{name}-templates-%{full_version}/
%cmake .
%make_build
popd
# Symbol libraries
pushd %{name}-symbols-%{full_version}/
%cmake .
%make_build
popd
# Footprint libraries
pushd %{name}-footprints-%{full_version}/
%cmake .
%make_build
popd
# 3D models
pushd %{name}-packages3D-%{full_version}/
%cmake .
%make_build
popd
# Documentation (HTML only)
mkdir %{name}-doc-%{full_version}/build/
pushd %{name}-doc-%{full_version}/build/
%cmake \
-DBUILD_FORMATS=html \
..
%make_build
popd
%install
# KiCad application
%make_install
%{__cp} -p AUTHORS.txt %{buildroot}%{_docdir}/%{name}/
# Localization
pushd %{name}-i18n-%{full_version}/build/
%make_install
popd
# Desktop integration
for desktopfile in %{buildroot}%{_datadir}/applications/*.desktop ; do
desktop-file-install \
--dir %{buildroot}%{_datadir}/applications \
--remove-category Development \
--delete-original \
${desktopfile}
done
# Templates
pushd %{name}-templates-%{full_version}/
%make_install
popd
# Symbol libraries
pushd %{name}-symbols-%{full_version}/
%make_install
popd
# Footprint libraries
pushd %{name}-footprints-%{full_version}/
%make_install
popd
# 3D models
pushd %{name}-packages3D-%{full_version}/
%make_install
popd
# Documentation
pushd %{name}-doc-%{full_version}/build/
%make_install
popd
%find_lang %{name}
%check
appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/appdata/*.appdata.xml
%files -f %{name}.lang
%{_bindir}/*
%{_libdir}/%{name}/
%{_libdir}/libkicad_3dsg.so*
%{python3_sitelib}/*pcbnew*
%{python3_sitelib}/__pycache__/*
%{_datadir}/%{name}/
%exclude %{_datadir}/%{name}/modules/packages3d/*
%{_datadir}/appdata/*.xml
%{_datadir}/applications/*.desktop
%{_datadir}/icons/hicolor/*/mimetypes/application-x-*.*
%{_datadir}/icons/hicolor/*/apps/*.*
%{_datadir}/mime/packages/*.xml
%license LICENSE.README LICENSE.GPLv3 LICENSE.AGPLv3
%files packages3d
%{_datadir}/%{name}/modules/packages3d/*.3dshapes/
%license %{name}-packages3D-%{full_version}/LICENSE.md
%files doc
%{_docdir}/%{name}/
%license %{name}-doc-%{full_version}/LICENSE.adoc
%changelog