pcb-vl.spec 9.9 KB

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