%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} Name: exe Version: 1.03.0.3373 Release: 1%{?dist} Summary: eXe eLearning XHTML editor Group: Applications/Editors License: GPLv2+ Url: http://exelearning.org/ Source0: https://eduforge.org/frs/download.php/759/%{name}-%{version}-source.tgz Patch0: exe-desktop.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: python-devel python-imaging python-zope-interface BuildArch: noarch Requires: python-imaging python-zope-interface firefox hicolor-icon-theme %description eXe, the eLearning XHTML editor, is an authoring environment which enables teachers to publish web content in standard package formats (like IMS Content Packages and SCORM) without the need to become proficient in HTML or XML markup. Content generated using eXe can be used by any Learning Management System. %prep %setup -q -n %{name} %patch0 -p1 # remove the other platform binaries rm -f exe/webui/templates/mimetex.64.cgi exe/webui/templates/mimetex.exe rm -f exe/webui/templates/mimetex-darwin.cgi rm -f exe/msvcr71.dll rm -f twisted/spread/cBanana.so rm -f twisted/protocols/_c_urlarg.so %build rm -rf $RPM_BUILD_ROOT python rpm-setup.py build %install python rpm-setup.py install --root=$RPM_BUILD_ROOT cp -a twisted nevow formless $RPM_BUILD_ROOT%{_datadir}/exe # below is the desktop file and icon stuff. mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications desktop-file-install --vendor fedora \ --dir $RPM_BUILD_ROOT%{_datadir}/applications \ %{name}.desktop mkdir -p $RPM_BUILD_ROOT%{_datadir}/mime/packages install -p -m 644 %{name}.xml $RPM_BUILD_ROOT%{_datadir}/mime/packages mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/apps install -p -m 644 %{name}.png $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/apps/ %clean rm -rf $RPM_BUILD_ROOT %post touch --no-create %{_datadir}/icons/hicolor || : if [ -x %{_bindir}/gtk-update-icon-cache ]; then %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || : fi update-desktop-database &> /dev/null || : update-mime-database %{_datadir}/mime &> /dev/null || : %postun touch --no-create %{_datadir}/icons/hicolor || : if [ -x %{_bindir}/gtk-update-icon-cache ]; then %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || : fi update-desktop-database &> /dev/null || : update-mime-database %{_datadir}/mime &> /dev/null || : %files %defattr(-,root,root,-) %doc ChangeLog COPYING NEWS README %{_bindir}/%{name} %{python_sitelib}/%{name} %{python_sitelib}/%{name}*.egg-info %{_datadir}/%{name} %{_datadir}/applications/fedora-%{name}.desktop %{_datadir}/mime/packages/%{name}.xml %{_datadir}/icons/hicolor/48x48/apps/%{name}.png %changelog * Sat Feb 9 2008 Hans de Goede 1.03.0.3373-1 - Initial Fedora package based on upstream specfile