1 |
%define Werror_cflags %nil |
2 |
|
3 |
%define docname kicad-doc |
4 |
%define docversion 4.0.0 |
5 |
%define docrelease %mkrel 1 |
6 |
|
7 |
%define libname kicad-library |
8 |
%define libversion 4.0.0 |
9 |
%define librelease %mkrel 1 |
10 |
|
11 |
%define i18nname kicad-i18n |
12 |
%define i18nversion 4.0.0 |
13 |
%define i18nrelease %mkrel 1 |
14 |
|
15 |
|
16 |
Name: kicad |
17 |
Summary: An open source program for the creation of electronic schematic diagrams |
18 |
Version: 4.0.0 |
19 |
Release: %mkrel 1 |
20 |
Source0: https://launchpad.net/%{name}/4.0/%{version}/+download/%{name}-%{version}.tar.xz |
21 |
Source1: https://github.com/KiCad/kicad-doc/archive/%{version}.tar.gz#/%{docname}-%{docversion}.tar.gz |
22 |
Source2: https://github.com/KiCad/kicad-library/archive/%{version}.tar.gz#/%{libname}-%{version}.tar.gz |
23 |
Source3: https://github.com/KiCad/kicad-i18n/archive/%{version}.tar.gz#/%{i18nname}-%{version}.tar.gz |
24 |
Source4: eeschema.svg |
25 |
License: GPLv2+ |
26 |
Group: Sciences/Computer science |
27 |
Url: http://www.lis.inpg.fr/realise_au_lis/kicad/ |
28 |
BuildRequires: wxgtk-devel >= 3.0 |
29 |
BuildRequires: mesa-common-devel |
30 |
BuildRequires: imagemagick |
31 |
BuildRequires: boost-devel |
32 |
BuildRequires: glew-devel |
33 |
BuildRequires: cairo-devel |
34 |
BuildRequires: openssl-devel |
35 |
BuildRequires: libgomp-devel |
36 |
BuildRequires: cmake |
37 |
# doc |
38 |
BuildRequires: dblatex |
39 |
BuildRequires: po4a |
40 |
BuildRequires: asciidoc |
41 |
BuildRequires: git |
42 |
BuildRequires: perl(Unicode::GCString) |
43 |
BuildRequires: source-highlight |
44 |
# python scripting |
45 |
BuildRequires: python-devel |
46 |
BuildRequires: libwxPython-devel |
47 |
BuildRequires: swig |
48 |
|
49 |
BuildRequires: desktop-file-utils |
50 |
Requires: %{libname} |
51 |
Requires: %{docname} |
52 |
Requires: %{i18nname} |
53 |
|
54 |
%description |
55 |
Kicad is an open source (GPL) program for the creation of electronic |
56 |
schematic diagrams and printed circuit board artwork. |
57 |
|
58 |
Kicad is a set of four programs and a project manager: |
59 |
|
60 |
* Eeschema: Schematic entry. |
61 |
* Pcbnew: Board editor. |
62 |
* Gerbview: GERBER viewer (photoplotter documents). |
63 |
* Cvpcb: footprint selector for components used in the circuit design. |
64 |
* Kicad: project manager. |
65 |
|
66 |
%package doc |
67 |
Summary: Documentation for kicad (creation of electronic schematic diagrams) |
68 |
Version: %{docversion} |
69 |
Release: %{docrelease} |
70 |
License: GPL |
71 |
Requires: %{name} |
72 |
BuildArch: noarch |
73 |
|
74 |
%description doc |
75 |
Kicad is an open source (GPL) program for the creation of electronic |
76 |
schematic diagrams and printed circuit board artwork. |
77 |
|
78 |
Kicad-doc is the documentation for kicad. |
79 |
|
80 |
%package i18n |
81 |
Summary: Kicad locales |
82 |
Version: %{i18nversion} |
83 |
Release: %{i18nrelease} |
84 |
License: GPL |
85 |
Requires: %{name} |
86 |
BuildArch: noarch |
87 |
|
88 |
Obsoletes: kicad-locales-bg < %{i18nversion} |
89 |
Obsoletes: kicad-locales-ca < %{i18nversion} |
90 |
Obsoletes: kicad-locales-cs < %{i18nversion} |
91 |
Obsoletes: kicad-locales-de < %{i18nversion} |
92 |
Obsoletes: kicad-locales-el < %{i18nversion} |
93 |
Obsoletes: kicad-locales-en < %{i18nversion} |
94 |
Obsoletes: kicad-locales-es < %{i18nversion} |
95 |
Obsoletes: kicad-locales-fi < %{i18nversion} |
96 |
Obsoletes: kicad-locales-fr < %{i18nversion} |
97 |
Obsoletes: kicad-locales-hu < %{i18nversion} |
98 |
Obsoletes: kicad-locales-id < %{i18nversion} |
99 |
Obsoletes: kicad-locales-it < %{i18nversion} |
100 |
Obsoletes: kicad-locales-ja < %{i18nversion} |
101 |
Obsoletes: kicad-locales-ko < %{i18nversion} |
102 |
Obsoletes: kicad-locales-lt < %{i18nversion} |
103 |
Obsoletes: kicad-locales-nl < %{i18nversion} |
104 |
Obsoletes: kicad-locales-pl < %{i18nversion} |
105 |
Obsoletes: kicad-locales-pt < %{i18nversion} |
106 |
Obsoletes: kicad-locales-ru < %{i18nversion} |
107 |
Obsoletes: kicad-locales-sk < %{i18nversion} |
108 |
Obsoletes: kicad-locales-sl < %{i18nversion} |
109 |
Obsoletes: kicad-locales-sv < %{i18nversion} |
110 |
Obsoletes: kicad-locales-zh-cn < %{i18nversion} |
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 |
Version: %{libversion} |
122 |
Release: %{i18nrelease} |
123 |
License: GPL |
124 |
Requires: %{name} |
125 |
BuildArch: noarch |
126 |
|
127 |
%description library |
128 |
Kicad is an open source (GPL) program for the creation of electronic |
129 |
schematic diagrams and printed circuit board artwork. |
130 |
|
131 |
Kicad-library is a set of library needed by kicad. |
132 |
|
133 |
%prep |
134 |
%setup -q -T -b 0 -n %{name}-%{version} |
135 |
%setup -q -T -b 1 -n %{docname}-%{docversion} |
136 |
%setup -q -T -b 2 -n %{libname}-%{libversion} |
137 |
%setup -q -T -b 3 -n %{i18nname}-%{i18nversion} |
138 |
cd .. |
139 |
|
140 |
%build |
141 |
export LC_ALL=C |
142 |
cd ../ |
143 |
|
144 |
# Building kicad |
145 |
pushd %{name}-%{version} |
146 |
%cmake \ |
147 |
-DBUILD_SHARED_LIBS:BOOL=OFF \ |
148 |
-DKICAD_STABLE_VERSION:BOOL=ON \ |
149 |
-DCMAKE_BUILD_TYPE=Release \ |
150 |
-DKICAD_SKIP_BOOST=ON \ |
151 |
-DKICAD_REPO_NAME=stable \ |
152 |
-DKICAD_BUILD_VERSION=%{version} \ |
153 |
-DBUILD_GITHUB_PLUGIN=ON \ |
154 |
-DKICAD_SCRIPTING=ON \ |
155 |
-DKICAD_SCRIPTING_MODULES=ON \ |
156 |
-DKICAD_SCRIPTING_WXPYTHON=ON |
157 |
%make |
158 |
popd |
159 |
|
160 |
# Building kicad-doc |
161 |
pushd %{docname}-%{docversion} |
162 |
%cmake \ |
163 |
-DKICAD_STABLE_VERSION:BOOL=ON \ |
164 |
-DCMAKE_BUILD_TYPE=Release \ |
165 |
-DBUILD_FORMATS=html |
166 |
%make |
167 |
popd |
168 |
|
169 |
# Building kicad-library |
170 |
pushd %{libname}-%{libversion} |
171 |
%cmake \ |
172 |
-DKICAD_STABLE_VERSION:BOOL=ON \ |
173 |
-DCMAKE_BUILD_TYPE=Release |
174 |
%make |
175 |
popd |
176 |
|
177 |
# Building kicad-i18n |
178 |
pushd %{i18nname}-%{i18nversion} |
179 |
%cmake \ |
180 |
-DKICAD_STABLE_VERSION:BOOL=ON \ |
181 |
-DCMAKE_BUILD_TYPE=Release \ |
182 |
-DKICAD_I18N_UNIX_STRICT_PATH=ON |
183 |
%make |
184 |
popd |
185 |
|
186 |
%install |
187 |
cd ../ |
188 |
|
189 |
# Installing kicad-doc |
190 |
pushd %{docname}-%{docversion} |
191 |
make -C build DESTDIR=%buildroot install |
192 |
popd |
193 |
|
194 |
# Installing kicad-library |
195 |
pushd %{libname}-%{libversion} |
196 |
make -C build DESTDIR=%buildroot install |
197 |
popd |
198 |
|
199 |
# Installing kicad-i18n |
200 |
pushd %{i18nname}-%{libversion} |
201 |
make -C build DESTDIR=%buildroot install |
202 |
%find_lang %{name} |
203 |
popd |
204 |
|
205 |
# Installing kicad |
206 |
pushd %{name}-%{version} |
207 |
make -C build DESTDIR=%buildroot install |
208 |
|
209 |
# create desktop file |
210 |
desktop-file-install --vendor='' \ |
211 |
--remove-category='Scientific' \ |
212 |
--add-category='Science;Electronics;Education' \ |
213 |
--dir=%buildroot%{_datadir}/applications \ |
214 |
%buildroot%{_datadir}/applications/*.desktop |
215 |
|
216 |
# create icons |
217 |
mkdir -p %{buildroot}%{_miconsdir} %{buildroot}%{_iconsdir} %{buildroot}%{_liconsdir} |
218 |
convert -resize 16x16 %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg %{buildroot}%{_miconsdir}/%{name}.png |
219 |
convert -resize 32x32 %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg %{buildroot}%{_iconsdir}/%{name}.png |
220 |
convert -resize 48x48 %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg %{buildroot}%{_liconsdir}/%{name}.png |
221 |
# add icon for eeschema, mga#8425 |
222 |
install -m 0644 %{SOURCE4} %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/eeschema.svg |
223 |
convert -resize 16x16 %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/eeschema.svg %{buildroot}%{_miconsdir}/eeschema.png |
224 |
convert -resize 32x32 %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/eeschema.svg %{buildroot}%{_iconsdir}/eeschema.png |
225 |
convert -resize 48x48 %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/eeschema.svg %{buildroot}%{_liconsdir}/eeschema.png |
226 |
popd |
227 |
|
228 |
|
229 |
%files |
230 |
%{_bindir}/* |
231 |
%{_prefix}/lib/%{name}/plugins/*.xsl |
232 |
%{_iconsdir}/*/*/* |
233 |
%{_iconsdir}/%{name}.png |
234 |
%{_liconsdir}/%{name}.png |
235 |
%{_miconsdir}/%{name}.png |
236 |
%{_iconsdir}/eeschema.png |
237 |
%{_liconsdir}/eeschema.png |
238 |
%{_miconsdir}/eeschema.png |
239 |
%{_datadir}/%{name}/scripting/plugins/ |
240 |
%{python2_sitelib}/_pcbnew.so |
241 |
%{python2_sitelib}/pcbnew.py |
242 |
%{_datadir}/%{name}/demos/ |
243 |
%{_datadir}/%{name}/template/ |
244 |
%{_datadir}/applications |
245 |
%{_datadir}/mime/packages/kicad.xml |
246 |
%{_datadir}/mimelnk/application/x-kicad-project.desktop |
247 |
%{_datadir}/mimelnk/application/x-kicad-schematic.desktop |
248 |
%{_datadir}/mimelnk/application/x-kicad-pcb.desktop |
249 |
|
250 |
%files doc |
251 |
%doc %{_datadir}/doc/%{name} |
252 |
|
253 |
%files i18n -f %{name}.lang |
254 |
|
255 |
%files library |
256 |
%{_datadir}/%{name}/library |
257 |
%{_datadir}/%{name}/modules |