%global pcbver 20140316 Name: pcb Version: 0.%{pcbver} Release: 1%{?_dist_release} Summary: An interactive printed circuit board editor Summary(ja): プリント基板エディタ License: GPLv2 Group: Applications/Engineering URL: http://pcb.geda-project.org/ Source0: http://downloads.sourceforge.net/sourceforge/%{name}/%{name}-%{pcbver}.tar.gz # sent upstream Patch0: 0001-Fix-the-AppData-and-update-to-the-latest-spec-versio.patch BuildRoot: %{_tmppath}/%{name}-%{version}-root BuildRequires: tcl BuildRequires: bison BuildRequires: flex BuildRequires: gawk BuildRequires: ImageMagick BuildRequires: gtk2-devel BuildRequires: gd-devel BuildRequires: fontconfig-devel BuildRequires: cups BuildRequires: texlive BuildRequires: libICE-devel BuildRequires: desktop-file-utils BuildRequires: intltool BuildRequires: gettext-devel BuildRequires: dbus-devel BuildRequires: mesa-libGLU-devel gtkglext-devel Requires: m4 Requires: electronics-menu %description PCB is an interactive printed circuit board editor. PCB includes a rats nest feature, design rule checking, and can provide industry standard RS-274-X (Gerber), NC drill, and centroid data (X-Y data) output for use in the board fabrication and assembly process. PCB offers high end features such as an autorouter and trace optimizer which can tremendously reduce layout time. %package doc Summary: Documentation for PCB, An interactive printed circuit board editor Summary(ja): プリント回路エディタ PCB のドキュメント Group: Applications/Documentation BuildArch: noarch Requires: %{name} = %{version}-%{release} Requires(post): /sbin/install-info Requires(preun): /sbin/install-info %description doc This package contains the documentation of PCB, An interactive printed circuit board editor. %prep %setup -q -n %{name}-%{pcbver} %patch0 -p1 -b fix-appdata-file %{__sed} -i \ 's|examplesdir = $(pkgdatadir)/examples|examplesdir = @docdir@/examples|' \ example/libraries/Makefile.* %{__sed} -i \ 's|tutdir = $(pkgdatadir)/tutorial|tutdir = @docdir@/tutorial|' \ tutorial/Makefile.* %build export WISH=%{_bindir}/wish # Bug 472618 : disable-update-desktop-database # Bug 544657 : --enable-dbus %configure \ --enable-dbus \ --enable-toporouter \ --disable-update-mime-database \ --disable-update-desktop-database \ --docdir=%{_docdir}/%{name}-%{version} make %{?_smp_mflags} %install %{__rm} -rf %{buildroot} %{__make} DESTDIR=%{buildroot} INSTALL="%{_bindir}/install -p" install # in /usr/share/pcb/newlib/ folder, sockets is an empty folder desktop-file-install --vendor "" \ --dir %{buildroot}%{_datadir}/applications \ --delete-original \ %{buildroot}%{_datadir}/applications/%{name}.desktop # # Additional Examples # set +x dest=%{buildroot}%{_docdir}/%{name}-%{version}/examples for d in thermal pad puller ; do echo -n -e "... Fixing path of $d \t" mkdir -p $dest/$d mv $dest/../$d.* $dest/$d install -pm 0644 doc/$d.{pcb,pdf} $dest/$d sed -i "s|$d.png|examples/$d/$d.png|" $dest/../%{name}.html echo "done" done set -x ## --- pcb supports for acpcircuits # http://www.apcircuits.com/resources/links/pcb_unix.html unzip tools/apctools.zip install -p -m 755 apc*.pl %{buildroot}%{_datadir}/%{name}/tools # Removes duplicates %{__rm} -f %{buildroot}%{_datadir}/%{name}/tools/apctools.zip ## --- # Old versions of PCB don't support autoroute, pcb2ncap convert # pcb format to ncap format used for mucspcb to autoroute the circuit. # In newer versions of PCB, autoroute is included and pcb2ncap and mucspcb # are no more needed. %{__rm} -f %{buildroot}%{_datadir}/%{name}/tools/pcb2ncap.tgz chmod 755 %{buildroot}%{_datadir}/%{name}/tools/{PCB2HPGL,tgo2pcb.tcl,Merge*} cp -p AUTHORS COPYING README NEWS ChangeLog README_FILES/CHANGES \ README_FILES/Whats_new_in_2.0 README_FILES/Tools \ %{buildroot}%{_docdir}/%{name}-%{version}/ %{__rm} -rf %{buildroot}%{_datadir}/info/dir mv %{buildroot}%{_docdir}/%{name}-%{version}/refcard.pdf %{buildroot}%{_docdir}/%{name}-%{version}/pcb-reference-card.pdf # remove duplicates %{__rm} -f %{buildroot}%{_bindir}/Merge* # L#854396 0.20110918 needlessly installs gts static library & header file %{__rm} -f %{buildroot}%{_libdir}/libgts.a %{buildroot}%{_includedir}/gts.h # locale's %find_lang %{name} #%check #make check %clean %{__rm} -rf %{buildroot} %post touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : touch --no-create %{_datadir}/mime/packages &> /dev/null || : update-desktop-database &> /dev/null || : %postun if [ $1 -eq 0 ] ; then touch --no-create %{_datadir}/icons/hicolor &>/dev/null gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : touch --no-create %{_datadir}/mime/packages &> /dev/null || : update-mime-database %{_datadir}/mime &> /dev/null || : fi update-desktop-database &> /dev/null || : %posttrans gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || : %post doc /sbin/install-info %{_infodir}/%{name}.info %{_infodir}/dir || : %preun doc if [ $1 = 0 ] ; then /sbin/install-info --delete %{_infodir}/%{name}.info %{_infodir}/dir || : fi %files -f %{name}.lang %defattr(-, root, root, -) %exclude %{_docdir}/%{name}-%{version}/pcb-reference-card.pdf %exclude %{_docdir}/%{name}-%{version}/pcb.pdf %exclude %{_docdir}/%{name}-%{version}/*.html %exclude %{_docdir}/%{name}-%{version}/examples/thermal %exclude %{_docdir}/%{name}-%{version}/examples/pad %exclude %{_docdir}/%{name}-%{version}/examples/puller %exclude %{_docdir}/%{name}-%{version}/gcode* %doc %{_docdir}/%{name}-%{version}/ %{_bindir}/%{name} %{_datadir}/%{name}/ %{_datadir}/appdata/%{name}.appdata.xml %{_datadir}/applications/%{name}.desktop %{_datadir}/gEDA/scheme/gnet-pcbfwd.scm %{_datadir}/icons/hicolor/*/mimetypes/application-x-* %{_datadir}/icons/hicolor/*/apps/%{name}.* %{_datadir}/mime/packages/pcb.xml %{_datadir}/mimelnk/application/x-*.desktop %{_mandir}/man1/%{name}* # Ignored warning W: pcb devel-file-in-non-devel-package /usr/share/pcb/tools/gerbertotk.c %files doc %{_infodir}/%{name}* %doc %{_docdir}/%{name}-%{version}/pcb-reference-card.pdf %doc %{_docdir}/%{name}-%{version}/pcb.pdf %doc %{_docdir}/%{name}-%{version}/*.html %doc %{_docdir}/%{name}-%{version}/examples/thermal %doc %{_docdir}/%{name}-%{version}/examples/pad %doc %{_docdir}/%{name}-%{version}/examples/puller %doc %{_docdir}/%{name}-%{version}/gcode* %changelog * Thu Oct 30 2014 Ryoichi INAGAKI - 0.20140316-1 - updated to source as 20140316 * Sun Jun 20 2010 Ryoichi INAGAKI - 0.20091103-3 - Initial build for Vine Linux * Sun Dec 6 2009 Chitlesh Goorah - 0.20091103-2 - Enable build for dbus support - improved reference card * Sat Nov 7 2009 Chitlesh Goorah - 0.20091103-1 - New upstream release * Tue Sep 8 2009 Chitlesh Goorah - 0.20081128-4 - Fixes for PCB EL-5 build. * Sat Nov 29 2008 Chitlesh Goorah - 0.20081128-1 - new upstream release - restructuring docs, tutorials and examples - Fixed Bug 472618 - Must not include /usr/share/applications/mimeinfo.cache * Sat Feb 09 2008 Chitlesh Goorah - 0.20080202-2 - added gettext-devel as BR - treat locales properly * Sat Feb 02 2008 Chitlesh Goorah - 0.20080202-1 - fixed docdir - new upstream release - treat locales properly * Thu Jun 21 2007 Chitlesh Goorah - 0.20070208-2 - fixed docdir * Fri Feb 09 2007 Chitlesh Goorah - 0.20070208-1 - New upstream release - 20070208 * Sun Feb 04 2007 Chitlesh Goorah - 0.20060822-9 - fixed presence in gnome menu * Sun Dec 24 2006 Chitlesh Goorah - 0.20060822-8 - Removed duplicates * Fri Dec 22 2006 Chitlesh Goorah - 0.20060822-7 - Fixed info files and added to the pcb package #219406 - Fixed man pages (with patch0 to suit fedora packaging of pcb - Added refcard.pdf in pcb binary package - Removed duplicated MergePCBPS and Merge_dimPCBPS from pcb binary package - pcb supports for acpcircuits included * Fri Sep 15 2006 Chitlesh Goorah - 0.20060822-6 - Fixed ownership of %%{_datadir}/%%{name}/ #206405 * Fri Sep 01 2006 Chitlesh Goorah - 0.20060822-5 - release for devel * Fri Sep 01 2006 Chitlesh Goorah - 0.20060822-4 - Added m4 as requires: to fix the error msg: - can't find default font-symbol-file 'default_font' * Fri Aug 25 2006 Chitlesh Goorah - 0.20060822-3 - release for devel * Fri Aug 25 2006 Chitlesh Goorah - 0.20060822-2 - release for FC5 and minor fixes * Fri Aug 25 2006 Chitlesh Goorah - 0.20060822-1 - updated to 20060822's snapshot * Wed Jul 11 2006 Chitlesh Goorah - 0.20060422-4 - pcbver corrected in pcb.desktop * Sun Jul 09 2006 Chitlesh Goorah - 0.20060422-3 - fixed the icon of pcb * Sun Jul 09 2006 Chitlesh Goorah - 0.20060422-2 - fixed E: pcb info-dir-file /usr/share/info/dir - added /sbin/install-info as requires for %%post and %%preun - added icon and treated GTK+ icon cache as required * Thu Jul 06 2006 Chitlesh Goorah - 0.20060422-1 - New upstream release 20060422 - Minor fixes to work under mock * Wed Apr 19 2006 - 0.20060414-1 - Let there be pcb packaging.