pcb-vl.spec 9.5 KB

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