%define python_sitearch %(%{__python} -c 'from distutils import sysconfig; print sysconfig.get_python_lib(1)') Name: PythonCard Version: 0.8.2 Release: 1%{?dist} Summary: PythonCard GUI construction toolkit Source: http://dl.sf.net/pythoncard/%{name}-%{version}.tar.gz URL: http://pythoncard.sourceforge.net/ Group: Development/Libraries License: BSD BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: python-devel, wxPython-devel Requires: wxPython BuildArch: noarch %description PythonCard is a GUI construction kit for building cross-platform desktop applications on Windows, Mac OS X, and Linux, using the Python language. %prep %setup -q %build env CFLAGS="$RPM_OPT_FLAGS" python setup.py build %install rm -rf $RPM_BUILD_ROOT env CFLAGS="$RPM_OPT_FLAGS" python setup.py install --root=$RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT/%{_docdir}/%{name}-%{version} mv $RPM_BUILD_ROOT/%{python_sitearch}/%{name}/samples $RPM_BUILD_ROOT/%{_docdir}/%{name}-%{version}/ mv $RPM_BUILD_ROOT/%{python_sitearch}/%{name}/docs $RPM_BUILD_ROOT/%{_docdir}/%{name}-%{version}/ mv $RPM_BUILD_ROOT/%{python_sitearch}/%{name}/tools $RPM_BUILD_ROOT/%{_docdir}/%{name}-%{version}/examples mv *.txt $RPM_BUILD_ROOT/%{_docdir}/%{name}-%{version}/ %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %exclude %{_bindir}/install-pythoncard.* %if 0%{?fedora} >= 9 %{python_sitearch}/*egg-info %endif %{python_sitearch}/%{name} %{_docdir}/%{name}-%{version} %changelog * Mon May 26 2008 Marek Mahut - 0.8.2-1 - Initial build