Blob Blame History Raw
%global short_version 3.7

Name:             xcircuit
Version:          %{short_version}.57
Release:          2%{?dist}
Summary:          Electronic circuit schematic drawing program

License:          GPLv2
Group:            Applications/Engineering
URL:              http://opencircuitdesign.com/xcircuit

Source:           http://opencircuitdesign.com/xcircuit/archive/%{name}-%{version}.tgz
Source1:          %{name}.desktop
# http://opencircuitdesign.com/xcircuit/archive/xcircuit.xpm as 64x64
Source2:          %{name}.png

Patch1:           xcircuit-3.7.57-Werror=format-security.patch

BuildRequires:    tk-devel, desktop-file-utils, libXt-devel
BuildRequires:    ghostscript-devel, ngspice, libXpm-devel, zlib-devel
BuildRequires:    chrpath

Requires:         tk coreutils gtk2

# Special FEL Gnome/KDE menu structure
Requires:         electronics-menu

%description
Xcircuit is a general-purpose drawing program and also a specific-purpose
CAD program for circuit schematic drawing and schematic capture.

%prep
%setup -q -n %{name}-%{version}

%patch1 -p1

# autom4te.caches should not be shipped
rm -r autom4te.cache

#439604: TCL 8.5.1
sed -i "s|package require -exact|package require|" lib/tcl/tkcon.tcl

%build
export WISH=/usr/bin/wish

#01/08/09 Without --enable-asg \ because it's broken
%configure \
   --with-tcl=%{_libdir}      \
   --with-tk=%{_libdir}       \
   --with-tcllibs=%{_libdir}  \
   --with-tklibs=%{_libdir}   \
   --with-tclincls=%{_includedir} \
   --with-tkincls=%{_includedir}
make %{?_smp_mflags}


%install
make INSTALL="install -p" DESTDIR=%{buildroot} install
make install-man mandir="%{buildroot}%{_mandir}"

rm -rf examples/win32
chmod -x examples/*

# They stay
#W: xcircuit hidden-file-or-dir examples/python/.xcircuitrc
#W: xcircuit hidden-file-or-dir examples/.xcircuitrc

chmod -x %{buildroot}%{_prefix}/lib*/%{name}-%{short_version}/console.tcl

mkdir -p %{buildroot}%{_datadir}/icons/hicolor/32x32/apps/
cp -p %{SOURCE2} %{buildroot}%{_datadir}/icons/hicolor/32x32/apps/%{name}.png

sed -i "s|# xcircuit::library| xcircuit::library|" %{buildroot}%{_prefix}/lib*/%{name}-%{short_version}/xcstartup.tcl
sed -i '7 a\export TCLLIBPATH=%{_libdir}' %{buildroot}%{_bindir}/xcircuit


desktop-file-install --vendor "" \
    --dir %{buildroot}%{_datadir}/applications \
    %{SOURCE1}

# removing rpath
chrpath --delete %{buildroot}%{_libdir}/%{name}-%{short_version}/xcircexec


%post
touch --no-create %{_datadir}/icons/hicolor || :
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
%{_bindir}/update-desktop-database %{_datadir}/applications

%postun
touch --no-create %{_datadir}/icons/hicolor || :
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
%{_bindir}/update-desktop-database %{_datadir}/applications


%files
%doc CHANGES README* TODO
%doc examples/
%license COPYRIGHT
%{_bindir}/%{name}
%{_prefix}/lib*/%{name}-%{short_version}/
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/32x32/apps/%{name}.png
%{_mandir}/man1/%{name}.1.gz


%changelog
* Sat Oct 10 2015 Peter Robinson <pbrobinson@fedoraproject.org> 3.7.57-2
- Rebuild (ngspice and aarch64)

* Mon Jul 13 2015 Ralf Corsépius <corsepiu@fedoraproject.org> - 3.7.57-1
- Update to latest version from the 3.7 series (3.7.57).
- Fix F23FTBFS (RHBZ#1240082).
- Add %%license.
- Rework spec.
- Add xcircuit-3.7.57-Werror=format-security.patch.
- Remove remove-AM_C_PROTOTYPES.patch.
- Fix bogus %%changelog entries.

* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.7.44-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.7.44-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild

* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.7.44-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Wed May 21 2014 Jaroslav ҆karvada <jskarvad@redhat.com> - 3.7.44-9
- Rebuilt for https://fedoraproject.org/wiki/Changes/f21tcl86

* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.7.44-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Wed Feb 27 2013 Mat Booth <fedora@matbooth.co.uk> - 3.7.44-7
- Fix invalid auto-generated dependency.

* Mon Feb 25 2013 Mat Booth <fedora@matbooth.co.uk> - 3.7.44-6
- Remove obsoleted macro for automake >= 1.12
- Fix FTBFS rhbz #914582

* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.7.44-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Sat Oct 20 2012 Peter Robinson <pbrobinson@fedoraproject.org> 3.7.44-1
- Update to new 3.7.44 stable release
- Cleanup spec

* Sun Jul 22 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.6.164-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.6.164-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.6.164-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Mon Nov 30 2009 Chitlesh Goorah <chitlesh [AT] fedoraproject DOT org> - 3.6.164-1
- new upstream stable release

* Sun Nov 15 2009 Chitlesh Goorah <chitlesh [AT] fedoraproject DOT org> - 3.6.163-1
- new upstream stable release 3.6.163

* Sat Aug 01 2009 Chitlesh Goorah <chitlesh [AT] fedoraproject DOT org> - 3.6.161-1
- new upstream release 3.6.161

* Mon Jul 27 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.4.30-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.4.30-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Fri Aug 15 2008 Chitlesh Goorah <chitlesh [AT] fedoraproject DOT org> - 3.4.30-1
- new upstream release

* Sun Apr 06 2008 Chitlesh Goorah <chitlesh [AT] fedoraproject DOT org> - 3.4.28-1
- closed #440387
- new upstream release
- opting the FEL related menu structure
- fixed and closed #439604: TCL 8.5.1

* Fri Apr 04 2008 Trond Danielsen <trondd@fedoraproject.org> - 3.4.27-2
- Added fix for bug #440387.

* Mon Feb 18 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 3.4.27-3
- Autorebuild for GCC 4.3

* Sat Jan  5 2008 Alex Lancaster <alexlan[AT]fedoraproject org> - 3.4.27-2
- Rebuild for new Tcl 8.5

* Sun Oct 21 2007 Chitlesh Goorah <chitlesh [AT] fedoraproject DOT org> - 3.4.27-1
- new upstream release
- added coreutils and gtk as requires: #339771

* Fri Aug 24 2007 Chitlesh Goorah <chitlesh [AT] fedoraproject DOT org> - 3.4.26-23
- mass rebuild for fedora 8 - ppc

* Sun Aug 12 2007 Chitlesh Goorah <chitlesh [AT] fedoraproject DOT org> - 3.4.26-22
- fix for x86_64

* Sun Aug 12 2007 Chitlesh Goorah <chitlesh [AT] fedoraproject DOT org> - 3.4.26-21
- dump release

* Wed Aug 08 2007 Chitlesh Goorah <chitlesh [AT] fedoraproject DOT org> - 3.4.26-20
- patch %%{name}-3.4-memset.patch: Found memset with swapped arguments

* Mon Feb 26 2007 Chitlesh Goorah <chitlesh [AT] fedoraproject DOT org> - 3.4.26-19
- Rebuilt for rawhide

* Wed Jan 31 2007 Chitlesh Goorah <chitlesh [AT] fedoraproject DOT org> - 3.4.26-18
- Fixed presence in Gnome menu

* Wed Aug 30 2006 Chitlesh Goorah <chitlesh@fedoraproject.org> - 3.4.26-17
- Rebuilt for FC6 devel

* Sun Aug 27 2006 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 3.4.26-16
- Again.

* Sun Aug 27 2006 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 3.4.26-15
- Fix tk and tcl libdir.

* Sat Aug 26 2006 Chitlesh Goorah <chitlesh@fedoraproject.org> - 3.4.26-13
- Minor fixes to build properly under x86_64

* Sat Aug 26 2006 Chitlesh Goorah <chitlesh@fedoraproject.org> - 3.4.26-12
- Minor fixes to build properly under x86_64

* Sat Aug 26 2006 Chitlesh Goorah <chitlesh@fedoraproject.org> - 3.4.26-11
- Minor fixes to build properly under x86_64

* Sat Aug 26 2006 Chitlesh Goorah <chitlesh@fedoraproject.org> - 3.4.26-10
- Opted %%{_prefix}/lib* prior to %%{_libdir}

* Sat Aug 26 2006 Chitlesh Goorah <chitlesh@fedoraproject.org> - 3.4.26-9
- Added --libdir=%%{_libdir} to solve build error on x86_64

* Sat Aug 26 2006 Chitlesh Goorah <chitlesh@fedoraproject.org> - 3.4.26-8
- Use of %%{__cp} -p to keep timestamp

* Sat Aug 26 2006 Chitlesh Goorah <chitlesh@fedoraproject.org> - 3.4.26-7
- Fixed mandir

* Sat Aug 26 2006 Chitlesh Goorah <chitlesh@fedoraproject.org> - 3.4.26-6
- Dropped patch xcircuit-3.4.26-xpm-gif.patch
- Removed useless Windows related files

* Fri Aug 25 2006 Chitlesh Goorah <chitlesh@fedoraproject.org> - 3.4.26-5
- Added libXpm-devel as BR to prevent "image type "xpm" doesn't exist" error

* Fri Aug 25 2006 Chitlesh Goorah <chitlesh@fedoraproject.org> - 3.4.26-4
- Added libXt-devel and zlib-devel as BR

* Fri Aug 25 2006 Chitlesh Goorah <chitlesh@fedoraproject.org> - 3.4.26-3
- Fixed xcircuit.desktop and removed unneccessary installation for manual
- Used update-desktop-database in %%post and %%postun
- patch for "image type "xpm" doesn't exist"

* Thu Aug 24 2006 Chitlesh Goorah <chitlesh@fedoraproject.org> - 3.4.26-2
- Fixed xcircuit.desktop, xcircuit.png
- Minor fixes

* Wed Aug 23 2006 Chitlesh Goorah <chitlesh@fedoraproject.org> - 3.4.26-1
- Initial Package