source: projects/specs/trunk/p/pcb/pcb-vl.spec @ 9043

Revision 9043, 9.9 KB checked in by inagaki, 9 years ago (diff)

2014-10-31 Ryoichi INAGAKI <ryo1@…>

  • electronics-menu, pcb: updated


Line 
1%global         pcbver    20140316
2
3Name:           pcb
4Version:        0.%{pcbver}
5Release:        1%{?_dist_release}
6
7Summary:        An interactive printed circuit board editor
8Summary(ja):    プリント基板エディタ
9License:        GPLv2
10Group:          Applications/Engineering
11URL:            http://pcb.geda-project.org/
12
13Source0:        http://downloads.sourceforge.net/sourceforge/%{name}/%{name}-%{pcbver}.tar.gz
14# sent upstream
15Patch0:         0001-Fix-the-AppData-and-update-to-the-latest-spec-versio.patch
16
17BuildRoot:      %{_tmppath}/%{name}-%{version}-root
18BuildRequires:  tcl
19BuildRequires:  bison
20BuildRequires:  flex
21BuildRequires:  gawk
22BuildRequires:  ImageMagick
23BuildRequires:  gtk2-devel
24BuildRequires:  gd-devel
25BuildRequires:  fontconfig-devel
26BuildRequires:  cups
27BuildRequires:  texlive
28BuildRequires:  libICE-devel
29BuildRequires:  desktop-file-utils
30BuildRequires:  intltool
31BuildRequires:  gettext-devel
32BuildRequires:  dbus-devel
33BuildRequires:  mesa-libGLU-devel gtkglext-devel
34
35Requires:       m4
36Requires:       electronics-menu
37
38
39%description
40PCB is an interactive printed circuit board editor.
41PCB includes a rats nest feature, design rule checking, and can provide
42industry standard RS-274-X (Gerber), NC drill, and centroid data (X-Y data)
43output for use in the board fabrication and assembly process. PCB offers
44high end features such as an autorouter and trace optimizer which can
45tremendously reduce layout time.
46
47
48%package doc
49Summary:         Documentation for PCB, An interactive printed circuit board editor
50Summary(ja):     プリント回路エディタ PCB のドキュメント
51Group:           Applications/Documentation
52BuildArch:       noarch
53Requires:        %{name} = %{version}-%{release}
54Requires(post):  /sbin/install-info
55Requires(preun): /sbin/install-info
56
57%description doc
58This package contains the documentation of PCB, An interactive printed circuit
59board editor.
60
61
62%prep
63%setup -q -n %{name}-%{pcbver}
64%patch0 -p1 -b fix-appdata-file
65
66%{__sed} -i \
67   's|examplesdir = $(pkgdatadir)/examples|examplesdir = @docdir@/examples|' \
68   example/libraries/Makefile.*
69
70%{__sed} -i \
71   's|tutdir = $(pkgdatadir)/tutorial|tutdir = @docdir@/tutorial|' \
72   tutorial/Makefile.*
73
74%build
75export WISH=%{_bindir}/wish
76
77# Bug 472618 : disable-update-desktop-database
78# Bug 544657 : --enable-dbus
79%configure \
80    --enable-dbus \
81    --enable-toporouter \
82    --disable-update-mime-database \
83    --disable-update-desktop-database \
84    --docdir=%{_docdir}/%{name}-%{version}
85
86make %{?_smp_mflags}
87
88
89%install
90%{__rm} -rf %{buildroot}
91%{__make} DESTDIR=%{buildroot} INSTALL="%{_bindir}/install -p" install
92
93# in /usr/share/pcb/newlib/ folder, sockets is an empty folder
94
95desktop-file-install --vendor ""               \
96    --dir %{buildroot}%{_datadir}/applications \
97    --delete-original                          \
98    %{buildroot}%{_datadir}/applications/%{name}.desktop
99
100#
101# Additional Examples
102#
103set +x
104dest=%{buildroot}%{_docdir}/%{name}-%{version}/examples
105for d in thermal pad puller ; do
106   echo -n -e "... Fixing path of $d  \t"
107   mkdir -p $dest/$d
108   mv $dest/../$d.* $dest/$d
109   install -pm 0644 doc/$d.{pcb,pdf} $dest/$d
110   sed -i "s|$d.png|examples/$d/$d.png|" $dest/../%{name}.html
111   echo "done"
112done
113set -x
114
115
116## --- pcb supports for acpcircuits
117# http://www.apcircuits.com/resources/links/pcb_unix.html
118unzip tools/apctools.zip
119install -p -m 755 apc*.pl  %{buildroot}%{_datadir}/%{name}/tools
120
121# Removes duplicates
122%{__rm} -f %{buildroot}%{_datadir}/%{name}/tools/apctools.zip
123
124
125## ---
126
127# Old versions of PCB don't support autoroute, pcb2ncap convert
128# pcb format to ncap format used for mucspcb to autoroute the circuit.
129# In newer versions of PCB, autoroute is included and pcb2ncap and mucspcb
130# are no more needed.
131%{__rm} -f %{buildroot}%{_datadir}/%{name}/tools/pcb2ncap.tgz
132
133chmod 755 %{buildroot}%{_datadir}/%{name}/tools/{PCB2HPGL,tgo2pcb.tcl,Merge*}
134
135
136cp -p AUTHORS COPYING README NEWS ChangeLog README_FILES/CHANGES \
137      README_FILES/Whats_new_in_2.0 README_FILES/Tools \
138      %{buildroot}%{_docdir}/%{name}-%{version}/
139
140%{__rm} -rf %{buildroot}%{_datadir}/info/dir
141
142mv %{buildroot}%{_docdir}/%{name}-%{version}/refcard.pdf %{buildroot}%{_docdir}/%{name}-%{version}/pcb-reference-card.pdf
143
144# remove duplicates
145%{__rm} -f %{buildroot}%{_bindir}/Merge*
146
147# L#854396 0.20110918 needlessly installs gts static library & header file
148%{__rm} -f %{buildroot}%{_libdir}/libgts.a %{buildroot}%{_includedir}/gts.h
149
150
151# locale's
152%find_lang %{name}
153
154
155#%check
156#make check
157
158
159%clean
160%{__rm} -rf %{buildroot}
161
162
163%post
164touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
165touch --no-create %{_datadir}/mime/packages &> /dev/null || :
166update-desktop-database &> /dev/null || :
167
168%postun
169if [ $1 -eq 0 ] ; then
170    touch --no-create %{_datadir}/icons/hicolor &>/dev/null
171    gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
172    touch --no-create %{_datadir}/mime/packages &> /dev/null || :
173    update-mime-database %{_datadir}/mime &> /dev/null || :
174fi
175update-desktop-database &> /dev/null || :
176
177%posttrans
178gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
179update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || :
180
181
182%post doc
183/sbin/install-info %{_infodir}/%{name}.info %{_infodir}/dir || :
184
185%preun doc
186if [ $1 = 0 ] ; then
187  /sbin/install-info --delete %{_infodir}/%{name}.info %{_infodir}/dir || :
188fi
189
190
191%files -f %{name}.lang
192%defattr(-, root, root, -)
193%exclude %{_docdir}/%{name}-%{version}/pcb-reference-card.pdf
194%exclude %{_docdir}/%{name}-%{version}/pcb.pdf
195%exclude %{_docdir}/%{name}-%{version}/*.html
196%exclude %{_docdir}/%{name}-%{version}/examples/thermal
197%exclude %{_docdir}/%{name}-%{version}/examples/pad
198%exclude %{_docdir}/%{name}-%{version}/examples/puller
199%exclude %{_docdir}/%{name}-%{version}/gcode*
200%doc %{_docdir}/%{name}-%{version}/
201%{_bindir}/%{name}
202%{_datadir}/%{name}/
203%{_datadir}/appdata/%{name}.appdata.xml
204%{_datadir}/applications/%{name}.desktop
205%{_datadir}/gEDA/scheme/gnet-pcbfwd.scm
206%{_datadir}/icons/hicolor/*/mimetypes/application-x-*
207%{_datadir}/icons/hicolor/*/apps/%{name}.*
208%{_datadir}/mime/packages/pcb.xml
209%{_datadir}/mimelnk/application/x-*.desktop
210%{_mandir}/man1/%{name}*
211
212# Ignored warning W: pcb devel-file-in-non-devel-package /usr/share/pcb/tools/gerbertotk.c
213%files doc
214%{_infodir}/%{name}*
215%doc %{_docdir}/%{name}-%{version}/pcb-reference-card.pdf
216%doc %{_docdir}/%{name}-%{version}/pcb.pdf
217%doc %{_docdir}/%{name}-%{version}/*.html
218%doc %{_docdir}/%{name}-%{version}/examples/thermal
219%doc %{_docdir}/%{name}-%{version}/examples/pad
220%doc %{_docdir}/%{name}-%{version}/examples/puller
221%doc %{_docdir}/%{name}-%{version}/gcode*
222
223
224%changelog
225* Thu Oct 30 2014 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 0.20140316-1
226- updated to source as 20140316
227
228* Sun Jun 20 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 0.20091103-3
229- Initial build for Vine Linux
230
231* Sun Dec 6 2009 Chitlesh Goorah <chitlesh [AT] fedoraproject DOT org> - 0.20091103-2
232- Enable build for dbus support
233- improved reference card
234
235* Sat Nov 7 2009 Chitlesh Goorah <chitlesh [AT] fedoraproject DOT org> - 0.20091103-1
236- New upstream release
237
238* Tue Sep 8 2009 Chitlesh Goorah <chitlesh [AT] fedoraproject DOT org> - 0.20081128-4
239- Fixes for PCB EL-5 build.
240
241* Sat Nov 29 2008 Chitlesh Goorah <chitlesh [AT] fedoraproject DOT org> - 0.20081128-1
242- new upstream release
243- restructuring docs, tutorials and examples
244- Fixed Bug 472618 -  Must not include /usr/share/applications/mimeinfo.cache
245
246* Sat Feb 09 2008 Chitlesh Goorah <chitlesh [AT] fedoraproject DOT org> - 0.20080202-2
247- added gettext-devel as BR
248- treat locales properly
249
250* Sat Feb 02 2008 Chitlesh Goorah <chitlesh [AT] fedoraproject DOT org> - 0.20080202-1
251- fixed docdir
252- new upstream release
253- treat locales properly
254
255* Thu Jun 21 2007 Chitlesh Goorah <chitlesh [AT] fedoraproject DOT org> - 0.20070208-2
256- fixed docdir
257
258* Fri Feb 09 2007 Chitlesh Goorah <chitlesh [AT] fedoraproject DOT org> - 0.20070208-1
259- New upstream release - 20070208
260
261* Sun Feb 04 2007 Chitlesh Goorah <chitlesh [AT] fedoraproject DOT org> - 0.20060822-9
262- fixed presence in gnome menu
263
264* Sun Dec 24 2006 Chitlesh Goorah <chitlesh [AT] fedoraproject DOT org> - 0.20060822-8
265- Removed duplicates
266
267* Fri Dec 22 2006 Chitlesh Goorah <chitlesh [AT] fedoraproject DOT org> - 0.20060822-7
268- Fixed info files and added to the pcb package #219406
269- Fixed man pages (with patch0 to suit fedora packaging of pcb
270- Added refcard.pdf in pcb binary package
271- Removed duplicated MergePCBPS and Merge_dimPCBPS from pcb binary package
272- pcb supports for acpcircuits included
273
274* Fri Sep 15 2006 Chitlesh Goorah <chitlesh [AT] fedoraproject DOT org> - 0.20060822-6
275- Fixed ownership of %%{_datadir}/%%{name}/ #206405
276
277* Fri Sep 01 2006 Chitlesh Goorah <chitlesh [AT] fedoraproject DOT org> - 0.20060822-5
278- release for devel
279
280* Fri Sep 01 2006 Chitlesh Goorah <chitlesh [AT] fedoraproject DOT org> - 0.20060822-4
281- Added m4 as requires: to fix the error msg:
282-       can't find default font-symbol-file 'default_font'
283
284* Fri Aug 25 2006 Chitlesh Goorah <chitlesh [AT] fedoraproject DOT org> - 0.20060822-3
285- release for devel
286
287* Fri Aug 25 2006 Chitlesh Goorah <chitlesh [AT] fedoraproject DOT org> - 0.20060822-2
288- release for FC5 and minor fixes
289
290* Fri Aug 25 2006 Chitlesh Goorah <chitlesh [AT] fedoraproject DOT org> - 0.20060822-1
291- updated to 20060822's snapshot
292
293* Wed Jul 11 2006 Chitlesh Goorah <chitlesh [AT] fedoraproject DOT org> - 0.20060422-4
294- pcbver corrected in pcb.desktop
295
296* Sun Jul 09 2006 Chitlesh Goorah <chitlesh@fedoraproject.org> - 0.20060422-3
297- fixed the icon of pcb
298
299* Sun Jul 09 2006 Chitlesh Goorah <chitlesh [AT] fedoraproject DOT org> - 0.20060422-2
300- fixed E: pcb info-dir-file /usr/share/info/dir
301- added /sbin/install-info as requires for %%post and %%preun
302- added icon and treated GTK+ icon cache as required
303
304* Thu Jul 06 2006 Chitlesh Goorah <chitlesh [AT] fedoraproject DOT org> - 0.20060422-1
305- New upstream release 20060422
306- Minor fixes to work under mock
307
308* Wed Apr 19 2006 <pjones@redhat.com> - 0.20060414-1
309- Let there be pcb packaging.
310
Note: See TracBrowser for help on using the repository browser.