LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File pythoncad.spec of Package pythoncad (Project openSUSE:12.1)

#
# spec file for package pythoncad (Version DS1_R36)
#
# Copyright (c) 2009 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:        193
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%{python_sitelib}/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