File pythoncad.spec of Package pythoncad

#
# spec file for package pythoncad (Version DS1_R36)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild


Name:           pythoncad
BuildRequires:  gnutls-devel libglade2-devel libgnomeprintui-devel libgnomeui-devel libwnck-devel python-devel python-gtk-devel update-desktop-files
Summary:        PythonCAD--CAD in Python
License:        GPL v2 or later
Version:        DS1_R36
Release:        192
Group:          Productivity/Graphics/CAD
Source:         http://www.pythoncad.org/releases/PythonCAD-DS1-R36.tar.bz2
Source1:        pythoncad-rpmlintrc
%define my_packname PythonCAD-DS1-R36
Patch0:         pythoncad-desktop.patch
Patch1:         pythoncad-python26changes.patch
Provides:       PythonCAD
Requires:       python-gtk
Requires:       python-numeric
Requires:       python-xml
%define pyver %(python -c 'import sys; print sys.version[:3]')
Requires:       python >= %pyver, python < %pyver.99
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Url:            http://www.pythoncad.org/

%description
PythonCAD is a CAD package written in Python. The PythonCAD project
aims to produce a scriptable, open source, and easy to use CAD package.

Start it with gtkpycad.py from the command line.



Authors:
--------
    Art Haas <ahaas@airmail.net>

%prep
%setup -q -n %{my_packname}
%patch0 -p 1
%patch1 -p0

%build

%install
python setup.py install --prefix=%{_prefix} --root=$RPM_BUILD_ROOT --record-rpm=INSTALLED_FILES
install -d $RPM_BUILD_ROOT/usr/bin $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
install -m 755 gtkpycad.py* $RPM_BUILD_ROOT%{_bindir}
install -m644 prefs.py $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/prefs.py
install -Dm644 pythoncad.desktop $RPM_BUILD_ROOT%{_datadir}/applications/pythoncad.desktop
install -Dm644 gtkpycad.png $RPM_BUILD_ROOT%{_datadir}/pixmaps/gtkpycad.png
# respect rpmlint warning
chmod 755 $RPM_BUILD_ROOT%{py_sitedir}/PythonCAD/Generic/bindump.py
%suse_update_desktop_file pythoncad Graphics VectorGraphics

%clean
rm -rf $RPM_BUILD_ROOT

%files -f INSTALLED_FILES
%defattr(-, root, root)
%doc README NEWS
%config %{_sysconfdir}/%{name}
%{_bindir}/*
%{_datadir}/applications/*
%{_datadir}/pixmaps/*

%changelog
* Tue Sep 16 2008 lrupp@suse.de
- fix build (pythoncad-python26changes.patch)
- fix some rpmlint warnings
* Thu Oct 11 2007 sbrabec@suse.cz
- Removed bogus dependency on mDNSResponder.
* Mon May 14 2007 ke@suse.de
- Update to DS1-R36:
  * Fix preferences handling.
  * Bug fixes.
* Mon Apr 30 2007 ke@suse.de
- Update to DS1-R35 (NEWS extract since R33):
  * Set global preferences via 'Edit'->'Preferences'.  The values are
  saved to $HOME/.pythoncad/prefs.py.
  * Image preferences now adjustable via 'Draw'->'Set'.
  * Entities can now be rotated around arbitrary points.
  * Cairo drawing routines used for entity drawing if available.
  * Display speedups and redraw fixes.
  * Bug fixes and code improvments.
* Wed Aug 16 2006 cthiel@suse.de
- buildrequire python-gtk-devel instead of python-gtk
* Mon Jul 17 2006 ke@suse.de
- Update to DS1-R33:
  * Various Performance improvements.
  * Internationalization.
  * Bug fixes and code imporvements.
* Tue Feb 28 2006 jmatejek@suse.cz
- updated to reflect python changes due to #149809
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Mon Dec 12 2005 ke@suse.de
- Update to DS1-R27.
* Mon Oct 24 2005 ke@suse.de
- Update to DS1-R26.
* Fri Apr 29 2005 ke@suse.de
- Update to DS1-R24 (with previous changes):
  * Entity drawing improvements via draw()/erase() methods.
  * Add missing ability to paste TextBlock objects.
  * File saving and restoration of locked and visibility status.
  * Undo/Redo code improvements.
  * Bug fixes and code improvements.
* Thu Dec 30 2004 ke@suse.de
- Update to DS1-R20:
  * Improve undo/redo abilities.
  * More checks for data integrity.
* Mon Nov 22 2004 ke@suse.de
- Fix desktop file.
* Mon Nov 15 2004 ke@suse.de
- Update to DS1-R19.
* Fri May 28 2004 ke@suse.de
- Update to version DS1-R14.
  * Bug fixes and code improvements
  * Add Undo/Redo.
  * Drawings are now stored with the background color and inactive layer color
  * Point colors can be adjusted
* Thu Jan 15 2004 ke@suse.de
- Update to version DS1-R11.
- Require 'python-xml'.
* Fri Oct 24 2003 ke@suse.de
- New package: version DS1-R10.
openSUSE Build Service is sponsored by