]>
Commit | Line | Data |
---|---|---|
d2d8286e AM |
1 | # TODO: |
2 | # - merge all stuff from geda-*/geda-*.spec | |
3 | # | |
4 | Summary: Design Automation toolkit for electronic design | |
5 | Name: geda-gaf | |
6 | Version: 1.6.2 | |
7 | Release: 0.1 | |
8 | License: GPL v2+ | |
9 | Group: Applications/Engineering | |
10 | URL: http://gpleda.org | |
11 | Source0: http://geda.seul.org/release/v1.6/%{version}/%{name}-%{version}.tar.gz | |
12 | # Source0-md5: 35ae86aebc174ec1fc03863fde4c843c | |
13 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
14 | Patch0: %{name}-git.patch | |
15 | Patch1: %{name}-build.patch | |
16 | ||
17 | BuildRequires: desktop-file-utils | |
18 | BuildRequires: gawk | |
19 | BuildRequires: intltool | |
20 | BuildRequires: gd-devel | |
21 | BuildRequires: gettext-devel | |
22 | BuildRequires: libtool | |
23 | BuildRequires: libltdl-devel | |
24 | BuildRequires: shared-mime-info | |
25 | ||
26 | Requires: geda-docs = %{?epoch:%{epoch}:}%{version}-%{release} | |
27 | Requires: geda-gattrib = %{?epoch:%{epoch}:}%{version}-%{release} | |
28 | Requires: geda-gnetlist = %{?epoch:%{epoch}:}%{version}-%{release} | |
29 | Requires: geda-gschem = %{?epoch:%{epoch}:}%{version}-%{release} | |
30 | Requires: geda-gsymcheck = %{?epoch:%{epoch}:}%{version}-%{release} | |
31 | Requires: geda-utils = %{?epoch:%{epoch}:}%{version}-%{release} | |
32 | ||
33 | ||
34 | %description | |
35 | The GPL Electronic Design Automation (gEDA) project has produced and | |
36 | continues working on a full GPL'd suite and toolkit of Electronic | |
37 | Design Automation tools. These tools are used for electrical circuit | |
38 | design, schematic capture, simulation, prototyping, and production. | |
39 | ||
40 | Currently, the gEDA project offers a mature suite of free software | |
41 | applications for electronics design, including schematic capture, | |
42 | attribute management, bill of materials (BOM) generation, netlisting | |
43 | into over 20 netlist formats, analog and digital simulation, and | |
44 | printed circuit board (PCB) layout. | |
45 | ||
46 | ||
47 | %package -n libgeda | |
48 | Summary: Libraries for the gEDA project | |
49 | Group: Development/Libraries | |
50 | BuildRequires: gtk+2-devel | |
51 | BuildRequires: guile-devel | |
52 | Requires(post): /sbin/ldconfig | |
53 | Requires(postun): /sbin/ldconfig | |
54 | ||
55 | %description -n libgeda | |
56 | This package contains libgeda, the library needed by gEDA | |
57 | applications. | |
58 | ||
59 | ||
60 | %package -n libgeda-devel | |
61 | Summary: Development files for the libgeda library | |
62 | Group: Development/Libraries | |
63 | Requires: gtk+2-devel | |
64 | Requires: guile-devel | |
65 | Requires: libgeda = %{?epoch:%{epoch}:}%{version}-%{release} | |
66 | Requires: pkgconfig | |
67 | ||
68 | %description -n libgeda-devel | |
69 | Development files for libgeda library | |
70 | ||
71 | ||
72 | %package -n geda-symbols | |
73 | Summary: Electronic symbols for gEDA | |
74 | Group: Applications/Engineering | |
75 | BuildRequires: transfig | |
76 | ||
77 | %description -n geda-symbols | |
78 | This package contains a bunch of symbols of electronic devices used by | |
79 | gschem, the gEDA project schematic editor. | |
80 | ||
81 | ||
82 | %package -n geda-docs | |
83 | Summary: Documentation and Examples for gEDA | |
84 | Group: Applications/Engineering | |
85 | %if 0%{?fedora} > 9 || 0%{?rhel} > 5 | |
86 | BuildArch: noarch | |
87 | %endif | |
88 | Requires: geda-symbols | |
89 | Provides: geda-examples = %{?epoch:%{epoch}:}%{version}-%{release} | |
90 | Obsoletes: geda-examples < 20090830-2 | |
91 | ||
92 | %description -n geda-docs | |
93 | This package contains documentation and examples for the gEDA project. | |
94 | ||
95 | ||
96 | %package -n geda-gattrib | |
97 | Summary: Attribute editor for gEDA | |
98 | Group: Applications/Engineering | |
99 | Requires: geda-symbols | |
100 | ||
101 | %description -n geda-gattrib | |
102 | Gattrib is gEDA's attribute editor. It reads a set of gschem .sch | |
103 | files (schematic files), and creates a spreadsheet showing all | |
104 | components in rows, with the associated component attributes listed in | |
105 | the columns. It allows the user to add, modify, or delete component | |
106 | attributes outside of gschem, and then save the .sch files back out. | |
107 | When it is completed, it will allow the user to edit attributes | |
108 | attached to components, nets, and pins. (Currently, only component | |
109 | attribute editing is implemented; pin attributes are displayed only, | |
110 | and net attributes are TBD.) | |
111 | ||
112 | ||
113 | %package -n geda-gnetlist | |
114 | Summary: Netlister for the gEDA project | |
115 | Group: Applications/Engineering | |
116 | BuildRequires: libstroke-devel | |
117 | Requires: geda-symbols | |
118 | ||
119 | %description -n geda-gnetlist | |
120 | Gnetlist generates netlists from schematics drawn with gschem (the | |
121 | gEDA schematic editor). Possible output formats are: | |
122 | - native | |
123 | - tango | |
124 | - spice | |
125 | - allegro | |
126 | - PCB | |
127 | - verilog and others. | |
128 | ||
129 | ||
130 | %package -n geda-gschem | |
131 | Summary: Electronics schematics editor | |
132 | Group: Applications/Engineering | |
133 | Requires(pre): libgeda = %{?epoch:%{epoch}:}%{version}-%{release} | |
134 | Requires: geda-docs | |
135 | Requires: geda-symbols | |
136 | ||
137 | %description -n geda-gschem | |
138 | Gschem is an electronics schematic editor. It is part of the gEDA | |
139 | project. | |
140 | ||
141 | ||
142 | %package -n geda-gsymcheck | |
143 | Summary: Symbol checker for electronics schematics editor | |
144 | Group: Applications/Engineering | |
145 | Requires: geda-symbols | |
146 | ||
147 | %description -n geda-gsymcheck | |
148 | Gsymcheck is a utility to check symbols for gschem. It is part of the | |
149 | gEDA project. | |
150 | ||
151 | ||
152 | %package -n geda-utils | |
153 | Summary: Several utilities for the gEDA project | |
154 | Group: Applications/Engineering | |
155 | Requires: geda-symbols | |
156 | %if 0%{?fedora} > 6 | |
157 | BuildRequires: perl-libs | |
158 | %endif | |
159 | ||
160 | ||
161 | %description -n geda-utils | |
162 | Several utilities for the gEDA project. | |
163 | ||
164 | ||
165 | %prep | |
166 | %setup -q | |
167 | %patch0 -p1 -b .RHBZ604288 | |
168 | %patch1 -p1 | |
169 | ||
170 | # Implicit DSO linking | |
171 | # undefined reference to symbol 'atan2@@GLIBC_2.0' | |
172 | sed -i "s|(gschem_LINK) \$(gschem_OBJECTS)|(gschem_LINK) -lm \$(gschem_OBJECTS)|" gschem/src/Makefile.in | |
173 | ||
174 | # rpmlint UTF-8 | |
175 | for f in symbols/{AUTHORS,ChangeLog-1.0} gschem/ChangeLog; do | |
176 | iconv -f ISO-8859-1 -t UTF-8 $f > $f.tmp && \ | |
177 | ( touch -r $f $f.tmp ; %{__mv} -f $f.tmp $f ) || \ | |
178 | %{__rm} -f $f.tmp | |
179 | done | |
180 | ||
181 | # Fixing rpaths | |
182 | %if "%{_libdir}" != "%{_prefix}/lib" | |
183 | sed -i -e 's|"/lib /usr/lib|"/%{_lib} %{_libdir}|' configure | |
184 | %endif | |
185 | ||
186 | %build | |
187 | %configure \ | |
188 | --disable-static | |
189 | %{__make} | |
190 | ||
191 | ||
192 | %install | |
193 | rm -rf $RPM_BUILD_ROOT | |
194 | %{__make} INSTALL="%{_bindir}/install -p" install DESTDIR=$RPM_BUILD_ROOT | |
195 | ||
196 | ||
197 | desktop-file-install --vendor "" \ | |
198 | --dir $RPM_BUILD_ROOT%{_desktopdir} \ | |
199 | --delete-original \ | |
200 | $RPM_BUILD_ROOT%{_desktopdir}/geda-gschem.desktop \ | |
201 | $RPM_BUILD_ROOT%{_desktopdir}/geda-gattrib.desktop | |
202 | ||
203 | ||
204 | %{__rm} -f $RPM_BUILD_ROOT%{_libdir}/*.la | |
205 | %{__rm} -f $RPM_BUILD_ROOT%{_desktopdir}/mimeinfo.cache | |
206 | %{__rm} -f $RPM_BUILD_ROOT%{_datadir}/mime/{XMLnamespaces,aliases,generic-icons,globs,globs2,icons,magic,mime.cache,subclasses,treemagic,types} | |
207 | ||
208 | ||
209 | # locale's | |
210 | # libgeda38 => 1.6.2 | |
211 | # libgeda40 => 1.7.1 | |
212 | for i in libgeda38 libgeda40 geda-gattrib geda-gschem ; do | |
213 | if [ -d $RPM_BUILD_ROOT%{_localedir}/ ]; then | |
214 | for lang_dir in $RPM_BUILD_ROOT%{_localedir}/* ; do | |
215 | lang=$(basename $lang_dir) | |
216 | if [ -e $RPM_BUILD_ROOT%{_localedir}/$lang/LC_MESSAGES/$i.mo ] ; then | |
217 | echo "%lang($lang) %{_localedir}/$lang/LC_MESSAGES/$i.mo" >> $i.lang | |
218 | fi | |
219 | done | |
220 | fi | |
221 | done | |
222 | ||
223 | install -d $RPM_BUILD_ROOT%{_docdir}/%{name}/{examples,gnetlist,gsymcheck,utils} | |
224 | ||
225 | # gschem | |
226 | install -pm 644 gschem/examples/*.sch $RPM_BUILD_ROOT%{_docdir}/%{name}/examples | |
227 | install -pm 644 gschem/examples/README.* $RPM_BUILD_ROOT%{_docdir}/%{name}/examples | |
228 | ||
229 | # gnetlist | |
230 | %{__cp} -pr gnetlist/tests $RPM_BUILD_ROOT%{_docdir}/%{name}/gnetlist | |
231 | %{__cp} -pr gnetlist/docs/* $RPM_BUILD_ROOT%{_docdir}/%{name}/gnetlist | |
232 | %{__cp} -pr gnetlist/examples/* $RPM_BUILD_ROOT%{_docdir}/%{name}/examples | |
233 | %{__rm} -f $RPM_BUILD_ROOT%{_docdir}/%{name}/gnetlist/gnetlist.{1,doc} | |
234 | ||
235 | # gsymcheck | |
236 | %{__cp} -pr gsymcheck/tests/ $RPM_BUILD_ROOT%{_docdir}/%{name}/gsymcheck | |
237 | ||
238 | # utils | |
239 | %{__cp} -pr utils/tests $RPM_BUILD_ROOT%{_docdir}/%{name}/utils | |
240 | %{__cp} -pr utils/examples $RPM_BUILD_ROOT%{_docdir}/%{name}/utils | |
241 | ||
242 | find $RPM_BUILD_ROOT%{_docdir} -name 'Makefile*' -exec rm -f '{}' \; | |
243 | %{__rm} -f $RPM_BUILD_ROOT%{_datadir}/mime/version | |
244 | %{__rm} -f $RPM_BUILD_ROOT%{_datadir}/info/dir | |
245 | ||
246 | %post -n geda-symbols | |
247 | update-mime-database %{_datadir}/mime &> /dev/null || : | |
248 | ||
249 | %postun -n geda-symbols | |
250 | update-mime-database %{_datadir}/mime &> /dev/null || : | |
251 | ||
252 | %posttrans -n geda-symbols | |
253 | update-mime-database %{_datadir}/mime &> /dev/null || : | |
254 | ||
255 | ||
256 | %post -n geda-gschem | |
257 | %update_icon_cache_post hicolor || : | |
258 | %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || : | |
259 | update-mime-database %{_datadir}/mime &> /dev/null || : | |
260 | ||
261 | %postun -n geda-gschem | |
262 | if [ $1 -eq 0 ] ; then | |
263 | %update_icon_cache_post hicolor &>/dev/null | |
264 | gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : | |
265 | update-mime-database %{_datadir}/mime &> /dev/null || : | |
266 | fi | |
267 | ||
268 | %posttrans -n geda-gschem | |
269 | gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : | |
270 | update-mime-database %{_datadir}/mime &> /dev/null || : | |
271 | ||
272 | ||
273 | %post -n geda-gattrib | |
274 | %update_icon_cache_post hicolor || : | |
275 | %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || : | |
276 | ||
277 | %postun -n geda-gattrib | |
278 | if [ $1 -eq 0 ] ; then | |
279 | %update_icon_cache_post hicolor &>/dev/null | |
280 | gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : | |
281 | fi | |
282 | ||
283 | %posttrans -n geda-gattrib | |
284 | gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : | |
285 | ||
286 | ||
287 | %post -n libgeda | |
288 | /sbin/ldconfig | |
289 | update-mime-database %{_datadir}/mime &> /dev/null || : | |
290 | ||
291 | %postun -n libgeda | |
292 | /sbin/ldconfig | |
293 | update-mime-database %{_datadir}/mime &> /dev/null || : | |
294 | ||
295 | %posttrans -n libgeda | |
296 | update-mime-database %{_datadir}/mime &> /dev/null || : | |
297 | ||
298 | # Package Self test | |
299 | %check | |
300 | make distcheck | |
301 | ||
302 | %clean | |
303 | rm -rf $RPM_BUILD_ROOT | |
304 | ||
305 | ||
306 | %files | |
307 | %defattr(644,root,root,755) | |
308 | %doc ABOUT-NLS AUTHORS ChangeLog COPYING* README NEWS | |
309 | ||
310 | ||
311 | %files -n libgeda -f libgeda38.lang | |
312 | %defattr(644,root,root,755) | |
313 | %doc libgeda/{HACKING,ChangeLog*,BUGS,TODO} | |
314 | %dir %{_datadir}/gEDA/ | |
315 | %dir %{_datadir}/gEDA/scheme | |
316 | %{_libdir}/libgeda.so.* | |
317 | %{_datadir}/gEDA/prolog.ps | |
318 | %{_datadir}/gEDA/scheme/geda.scm | |
319 | %{_datadir}/gEDA/system-gafrc | |
320 | %{_datadir}/mime/packages/libgeda.xml | |
321 | ||
322 | %files -n libgeda-devel | |
323 | %defattr(644,root,root,755) | |
324 | %{_includedir}/libgeda/ | |
325 | %{_libdir}/libgeda.so | |
326 | %{_pkgconfigdir}/libgeda.pc | |
327 | ||
328 | ||
329 | %files -n geda-symbols | |
330 | %defattr(644,root,root,755) | |
331 | %doc symbols/{AUTHORS,ChangeLog*,README,TODO} | |
332 | %{_datadir}/gEDA/sym/ | |
333 | %dir %{_datadir}/gEDA/gafrc.d/ | |
334 | %{_datadir}/gEDA/gafrc.d/geda-clib.scm | |
335 | %{_datadir}/mime/application/x-geda-symbol.xml | |
336 | %{_iconsdir}/hicolor/*/mimetypes/application-x-geda-symbol.* | |
337 | %{_datadir}/mime/application/x-geda-gsch2pcb-project.xml | |
338 | %{_iconsdir}/hicolor/*/mimetypes/application-x-geda-gsch2pcb-project.* | |
339 | ||
340 | ||
341 | %files -n geda-docs | |
342 | %defattr(644,root,root,755) | |
343 | %dir %{_docdir}/%{name}/ | |
344 | %doc %{_docdir}/%{name}/man | |
345 | %doc %{_docdir}/%{name}/wiki | |
346 | %doc %{_docdir}/%{name}/examples | |
347 | %doc %{_docdir}/%{name}/gedadocs.html | |
348 | %doc %{_docdir}/%{name}/nc.pdf | |
349 | ||
350 | ||
351 | %files -n geda-gattrib -f geda-gattrib.lang | |
352 | %defattr(644,root,root,755) | |
353 | %doc gattrib/design/{gEDA_Structures_updated.png,ProgramArchitecture.gnumeric} | |
354 | %doc gattrib/{BUGS,ChangeLog*,NOTES,README,ToDos} | |
355 | %attr(755,root,root) %{_bindir}/gattrib | |
356 | %{_datadir}/gEDA/system-gattribrc | |
357 | %{_datadir}/gEDA/gattrib-menus.xml | |
358 | %{_desktopdir}/geda-gattrib.desktop | |
359 | %{_iconsdir}/hicolor/*/apps/geda-gattrib.* | |
360 | ||
361 | ||
362 | %files -n geda-gnetlist | |
363 | %defattr(644,root,root,755) | |
364 | %doc gnetlist/{BUGS,ChangeLog*,TODO} | |
365 | %doc %{_docdir}/%{name}/gnetlist | |
366 | %attr(755,root,root) %{_bindir}/gnetlist | |
367 | %attr(755,root,root) %{_bindir}/mk_verilog_syms | |
368 | %attr(755,root,root) %{_bindir}/sch2eaglepos.sh | |
369 | %attr(755,root,root) %{_bindir}/sw2asc | |
370 | %{_datadir}/gEDA/scheme/gnet*.scm | |
371 | %{_datadir}/gEDA/system-gnetlistrc | |
372 | %{_mandir}/man1/gnetlist.* | |
373 | ||
374 | ||
375 | %files -n geda-gschem -f geda-gschem.lang | |
376 | %defattr(644,root,root,755) | |
377 | %doc gschem/{BUGS,ChangeLog*,TODO} | |
378 | %attr(755,root,root) %{_bindir}/gschem | |
379 | %attr(755,root,root) %{_bindir}/gschemdoc | |
380 | %{_datadir}/gEDA/scheme/auto-place-attribs.scm | |
381 | %{_datadir}/gEDA/scheme/default-attrib-positions.scm | |
382 | %{_datadir}/gEDA/scheme/image.scm | |
383 | %{_datadir}/gEDA/scheme/pcb.scm | |
384 | %{_datadir}/gEDA/scheme/print.scm | |
385 | %{_datadir}/gEDA/scheme/auto-uref.scm | |
386 | %{_datadir}/gEDA/scheme/generate_netlist.scm | |
387 | %{_datadir}/gEDA/scheme/gschem.scm | |
388 | %{_datadir}/gEDA/scheme/list-keys.scm | |
389 | %{_datadir}/gEDA/scheme/print-NB-attribs.scm | |
390 | %{_datadir}/gEDA/bitmap/gschem-* | |
391 | %{_datadir}/gEDA/system-gschemrc | |
392 | %{_datadir}/gEDA/gschem-gtkrc | |
393 | %{_datadir}/gEDA/gschem-colormap-darkbg | |
394 | %{_datadir}/gEDA/gschem-colormap-lightbg | |
395 | %{_datadir}/gEDA/print-colormap-darkbg | |
396 | %{_datadir}/gEDA/print-colormap-lightbg | |
397 | %{_datadir}/gEDA/scheme/color-map.scm | |
398 | %{_datadir}/mime/application/x-geda-schematic.xml | |
399 | %{_desktopdir}/geda-gschem.desktop | |
400 | %{_mandir}/man1/gschem.* | |
401 | %{_iconsdir}/hicolor/*/apps/geda-gschem.* | |
402 | %{_iconsdir}/hicolor/*/mimetypes/application-x-geda-schematic.* | |
403 | ||
404 | ||
405 | %files -n geda-gsymcheck | |
406 | %defattr(644,root,root,755) | |
407 | %doc gsymcheck/{BUGS,ChangeLog*,TODO} | |
408 | %doc %{_docdir}/%{name}/gsymcheck | |
409 | %attr(755,root,root) %{_bindir}/gsymcheck | |
410 | %{_datadir}/gEDA/system-gsymcheckrc | |
411 | %{_mandir}/man1/gsymcheck.* | |
412 | ||
413 | ||
414 | %files -n geda-utils | |
415 | %defattr(644,root,root,755) | |
416 | %doc utils/{ChangeLog*,README,AUTHORS} | |
417 | %doc %{_docdir}/%{name}/utils | |
418 | %doc %{_docdir}/%{name}/readmes/ | |
419 | %attr(755,root,root) %{_bindir}/garchive | |
420 | %attr(755,root,root) %{_bindir}/grenum | |
421 | %attr(755,root,root) %{_bindir}/gmk_sym | |
422 | %attr(755,root,root) %{_bindir}/smash_megafile | |
423 | %attr(755,root,root) %{_bindir}/convert_sym | |
424 | %attr(755,root,root) %{_bindir}/sarlacc_schem | |
425 | %attr(755,root,root) %{_bindir}/sarlacc_sym | |
426 | %attr(755,root,root) %{_bindir}/gschupdate | |
427 | %attr(755,root,root) %{_bindir}/gsymfix.pl | |
428 | %attr(755,root,root) %{_bindir}/pcb_backannotate | |
429 | %attr(755,root,root) %{_bindir}/gschlas | |
430 | %attr(755,root,root) %{_bindir}/olib | |
431 | %attr(755,root,root) %{_bindir}/refdes_renum | |
432 | %attr(755,root,root) %{_bindir}/gsch2pcb | |
433 | %attr(755,root,root) %{_bindir}/pads_backannotate | |
434 | %attr(755,root,root) %{_bindir}/tragesym | |
435 | %attr(755,root,root) %{_bindir}/gsymupdate | |
436 | %attr(755,root,root) %{_bindir}/gxyrs | |
437 | %attr(755,root,root) %{_bindir}/gnet_hier_verilog.sh | |
438 | %{_datadir}/gEDA/system-gschlasrc | |
439 | %{_mandir}/man1/grenum.1* | |
440 | %{_datadir}/gEDA/perl/lib/gxyrs.pm |