# sitelib for noarch packages, sitearch for others (remove the unneeded one) %{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} %{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} %define snap 20080718 Name: Pivy Version: 0.5.0 Release: 0.1.%{?snap}%{?dist} Summary: Coin binding for Python Group: Development/Languages License: BSD URL: http://pivy.coin3d.org Source0: http://pivy.coin3d.org/download/snapshot/releases/daily/Pivy-latest.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: python-devel BuildRequires: swig BuildRequires: SoQt-qt4-devel BuildRequires: SIMVoleon-devel %description Pivy is a Coin binding for Python. Coin is a high-level 3D graphics library with a C++ Application Programming Interface. Coin uses scene-graph data structures to render real-time graphics suitable for mostly all kinds of scientific and engineering visualization applications. %prep %setup -q -n %{name} %build CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build %install rm -rf $RPM_BUILD_ROOT %{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT # Fix lib64 %if %{_lib} == "lib64" mv $RPM_BUILD_ROOT%{_prefix}/lib $RPM_BUILD_ROOT%{_libdir} %endif chmod +x $RPM_BUILD_ROOT%{python_sitearch}/pivy/sogui.py %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc AUTHORS HACKING %{python_sitearch}/pivy/ %changelog * Fri Jul 18 2008 kwizart < kwizart at gmail.com > - 0.5.0-0.1.20080718 - Initial package