File python-visual.spec of Package python-visual

#
# spec file for package python-visual
#
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#

# norootforbuild


Name:             python-visual
Summary:          VPython 3D scientific visualization library
Version:          5.32
Release:          0
Url:              http://www.vpython.org 
License:          Custom, see license.txt
Vendor:           openSUSE-Education
Group:            Development/Libraries/Python
Requires:         python-idle
BuildRequires:    boost-devel python-devel 
BuildRequires:    python-numpy-devel python-numeric
BuildRequires:    gtkglarea-devel gtk-devel 
BuildRequires:    glibc-devel glib-devel gtkglext-devel
BuildRequires:    gcc-c++ xorg-x11-devel libstdc++-devel
BuildRequires:    gtkglextmm-devel
BuildRequires:    gtkmm2-devel
BuildRequires:    libglademm-devel
BuildRequires:    fdupes
%if 0%{?suse_version}
BuildRequires:    update-desktop-files
%py_requires
%endif
Source:           visual-%{version}_release.tar.bz2
Source1:          %name.desktop
Source2:          %name.png
Patch1:           visual-3.2.9-typedef.patch
Patch2:           visual-3.2.9-include.patch
Patch3:           visual-3.2.9-idlepath.patch
BuildRoot:        %{_tmppath}/%{name}-%{version}-root

%description
Visual is a Python module for 3D scientific visualization. It offers
real-time 3D output and is easily usable by novice programmers.

A program can create 3D objects (such as spheres, curves, etc.) and
position them in 3D space. Visual, running in a separate thread,
automatically updates a 3D scene many times per second to reflect the
curren position of the objects. The programmer does not need to deal
with display management but can focus on the computational aspects for
the program. The user can navigate in the 3D scene by using the mouse
to zoom and rotate while the program is running. Visual supporst full
vector algebra.

%prep
%setup -q -n visual-%{version}_release 

%build
## export GTKGLEXTMM_LIBS="%{_libdir}/gtkglextmm-1.2"
%configure --with-example-dir=%{py_sitedir}/visual/examples
# remove rpath
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \
    -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool 

%{__make} %{?_smp_mflags}

%install
%makeinstall
install -Dm644 %{SOURCE1} %buildroot/%_datadir/applications/%name.desktop
install -Dm644 %{SOURCE2} %buildroot/%_datadir/pixmaps/%name.png
%suse_update_desktop_file -n %name Education X-KDE-Edu-Teaching

find %{buildroot} -name '*.la' | xargs rm -f

%fdupes -s %buildroot

%clean
rm -rf $RPM_BUILD_ROOT

%files 
%defattr(-,root,root) 
%doc authors.txt license.txt NEWS.txt
%{_bindir}/* 
%{_libdir}/* 
%{python_sitearch}/cvisualmodule.so*
%{python_sitearch}/visual
%{_datadir}/pixmaps/%name.png
%{_datadir}/applications/%name.desktop

%changelog
openSUSE Build Service is sponsored by