File exelearning.spec of Package exelearning
#
# spec file for package exelearning
#
# Copyright (c) 2021 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#
%if 0%{?suse_version} < 1120
%define python_sitelib %{py_sitedir}
%else
BuildArch: noarch
%endif
Name: exelearning
Version: 2.6
Release: 0
Summary: eXe eLearning XHTML editor
License: GPL-2.0-or-later
Group: Productivity/Publishing/HTML/Editors
URL: http://exelearning.net/
Source0: intef-exe-%{version}-source.tar.xz
Source1: exelearning-rpmlintrc
Requires: python-beautifulsoup4
Requires: python-cssmin
Requires: python-feedparser
Requires: python-lxml
Requires: python-requests-oauthlib
Requires: python-rjsmin
# Requires: python-suds
Requires: python-suds-jurko
Requires: python-webassets
Requires: python-zope.interface
Requires: dateutils
Requires: python-Pillow
BuildRequires: fdupes
BuildRequires: mimetex
BuildRequires: python-devel
BuildRequires: python-setuptools
BuildRequires: unzip
BuildRequires: update-desktop-files
# Requires: MozillaFirefox
Requires: mimetex
Requires(pre): shared-mime-info
Provides: %{name}-manual = %{version}-release
Obsoletes: %{name}-manual < %{version}
%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.
%package devel
Summary: Development package for eXe based software
Group: Development/Languages/Other
Requires: %{name} = %{version}
%description devel
This package contains the header files and libraries needed to develop
programs that use eXe.
%prep
%setup -q -n iteexe-%{version}
# remove the other platform binaries
find exe/webui/templates/ -name "mimetex*" -exec rm -v {} \;
for file in $(find . -type f -name "*py"); do
sed -i "s|/usr/bin/env python|%{_bindir}/python|g" "$file"
done
%build
export CFLAGS="%{optflags}"
python rpm-setup.py build
%install
export NO_BRP_CHECK_BYTECODE_VERSION="true"
python rpm-setup.py install --prefix=%{_prefix} --root=%{buildroot}
#
cp -a twisted nevow formless %{buildroot}%{_datadir}/exe/
# install icons and desktop file
install -Dm644 exe.png %{buildroot}%{_datadir}/icons/hicolor/48x48/apps/exe.png
install -Dm644 exe.desktop %{buildroot}%{_datadir}/applications/exe.desktop
install -Dm644 exe.xml %{buildroot}%{_datadir}/mime/packages/exe.xml
# symlink locales
ln -s %{_datadir}/locale %{buildroot}%{_datadir}/exe/locale
# cleanup documentation directory
mkdir -p %{buildroot}%{_defaultdocdir}/%{name}
cp -r %{buildroot}%{_datadir}/doc/intef-exe/* %{buildroot}%{_defaultdocdir}/%{name}/
for file in ChangeLog ; do
cp $file %{buildroot}%{_defaultdocdir}/%{name}/
rm %{buildroot}%{_datadir}/exe/$file
done
rm -rf %{buildroot}%{_datadir}/doc/intef-exe
# symlink mimetex
ln -s %{_bindir}/mimetex %{buildroot}%{_datadir}/exe/templates/mimetex.cgi
%ifarch x86_64
ln -s %{_bindir}/mimetex %{buildroot}%{_datadir}/exe/templates/mimetex.64.cgi
%endif
%suse_update_desktop_file -r exe Network WebDevelopment
find %{buildroot}%{_datadir}/exe/locale -name "*.po" -exec rm {} \;
find %{buildroot}%{_datadir}/exe/locale -name "*.pot" -exec rm {} \;
%find_lang exe
%fdupes -s %{buildroot}
%post
if [ -x %{_bindir}/update-mime-database ]; then
%{_bindir}/update-mime-database %{_datadir}/mime &> /dev/null
fi
%postun
if [ -x %{_bindir}/update-mime-database ]; then
%{_bindir}/update-mime-database %{_datadir}/mime > /dev/null
fi
%files -f exe.lang
%license COPYING
%dir %{_defaultdocdir}/%{name}/
%doc %{_defaultdocdir}/%{name}/*
%{_bindir}/exe
%{_bindir}/exe_do
%config %{_datadir}/mime/packages/exe.xml
%dir %{python_sitelib}/exe
%dir %{_datadir}/exe
%dir %{_datadir}/exe/content_template
%dir %{_datadir}/exe/css
%dir %{_datadir}/exe/formless
%dir %{_datadir}/exe/images
%dir %{_datadir}/exe/nevow
%dir %{_datadir}/exe/schemas
%dir %{_datadir}/exe/scripts
%dir %{_datadir}/exe/style
%dir %{_datadir}/exe/tools
%dir %{_datadir}/exe/templates
%dir %{_datadir}/exe/twisted
%{_datadir}/exe/exportvalidation.json
%{_datadir}/exe/content_template/*
%{_datadir}/exe/locale
%{python_sitelib}/exe/*
%{_datadir}/exe/css/*
%{_datadir}/exe/formless/*
%{_datadir}/exe/images/*
%{_datadir}/exe/nevow/*
%{_datadir}/exe/schemas/*
%{_datadir}/exe/scripts/*
%{_datadir}/exe/style/*
%{_datadir}/exe/templates/*
%{_datadir}/exe/tools/*
%{_datadir}/exe/twisted/*
%exclude %{_datadir}/exe/twisted/internet/iocpreactor/_iocp.c
%exclude %{_datadir}/exe/twisted/internet/cfsupport/cfsupport.c
%{_datadir}/icons/hicolor
%{_datadir}/applications/exe.desktop
%{_datadir}/pixmaps/exe.xpm
%{python_sitelib}/exe-*.egg-info
%defattr(755,root,root,-)
%{_datadir}/exe/twisted/web/test/test_distrib.py
%{_datadir}/exe/twisted/trial/test/scripttest.py
%{_datadir}/exe/twisted/pb/tokens.py
%{_datadir}/exe/twisted/pb/test/test_schema.py
%{_datadir}/exe/twisted/pb/remoteinterface.py
%{_datadir}/exe/twisted/pb/banana.py
%{_datadir}/exe/twisted/internet/glib2reactor.py
%{python_sitelib}/exe/webui/webserver.py
%{python_sitelib}/exe/webui/browser.py
%{python_sitelib}/exe/engine/version.py
%{python_sitelib}/exe/application.py
%files devel
%{_datadir}/exe/twisted/internet/iocpreactor/_iocp.c
%{_datadir}/exe/twisted/internet/cfsupport/cfsupport.c
%changelog