File pythoncad.spec of Package pythoncad

# spec file for package pythoncad
# Copyright (c) 2012 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

Name:           pythoncad
BuildRequires:  libglade2-devel
BuildRequires:  libgnomeprintui-devel
BuildRequires:  libgnomeui-devel
BuildRequires:  libwnck-devel
BuildRequires:  python-devel
BuildRequires:  python-gtk-devel
BuildRequires:  update-desktop-files
%if 0%{?suse_version} > 1210
BuildRequires:  libgnutls-devel
BuildRequires:  gnutls-devel
Summary:        PythonCAD--CAD in Python
License:        GPL-2.0+
Group:          Productivity/Graphics/CAD
Version:        DS1_R36
Release:        0
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.99
Requires:       python >= %pyver
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

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 from the command line.

    Art Haas <>

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


python 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* $RPM_BUILD_ROOT%{_bindir}
install -m644 $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/
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/
%suse_update_desktop_file pythoncad Graphics VectorGraphics


%defattr(-, root, root)
%config %{_sysconfdir}/%{name}