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