Sophie

Sophie

distrib > Mageia > 5 > x86_64 > media > core-release-src > by-pkgid > b17238641795da10018783575c3bbb4a > files > 3

exe-2.0.1-3.mga5.src.rpm

Summary: eXe eLearning XHTML editor
Name: exe
Version: 2.0.1
Release: %mkrel 3
License: GPLv2+
Group: Editors
Url: http://exelearning.net
# http://exelearning.net/downloads
Source0: https://forja.cenatic.es/frs/download.php/file/1807/intef-%{name}-%{version}-source.tgz
Source2: getManual.sh
Source3: %{name}-manual.tar.gz
Patch0: %{name}-2.0-mga-desktop.patch
BuildRequires: python-devel
BuildRequires: gettext
BuildRequires: python-gitdb
BuildRequires: python-gitpython
BuildRequires: python-pytz
BuildRequires: python-babel >= 1.3
BuildRequires: intltool
Requires: python-setuptools
Requires: python-imaging
Requires: python-zope-interface
Requires: python-chardet
Requires: python-lxml
BuildArch: noarch
Provides: exelearning = %{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.

%prep
%setup -q -n %{name}
%patch0 -p1
mv -f %{name}.desktop %{name}.desktop.in

# remove the other platform binaries
rm -f ./%{name}/webui/templates/mimetex*
rm -f ./twisted/spread/cBanana.so
rm -f ./twisted/protocols/_c_urlarg.so

#Delete *.mo files
find ./%{name}/locale \( -name '*.mo' \) -print -delete

#Delete uncompilled locales (there is no support in python-babel)
rm -rf ./%{name}/locale/le
rm -rf ./%{name}/locale/qu
rm -rf ./%{name}/locale/tw
rm -rf ./%{name}/locale/mi
#Missing po file
rm -rf ./%{name}/locale/br

ln -s ./tools/mki18n.sh ./

#Decompress manual instead of empty by default
pushd ./%{name}/webui/docs
      rm -rf manual
      tar xvzf %{SOURCE3}
popd

%build
#Build
python rpm-setup.py build

#Compile translation
./mki18n.sh

#Determine list of languages
pushd ./%{name}/locale
      dir -1|grep -v .pot |grep -v .txt > ./langs.txt
popd

#Translation for desktop file
mkdir -p ./po
cat ./%{name}/locale/langs.txt | while read lang
   do
     mv -f ./%{name}/locale/$lang/LC_MESSAGES/%{name}.po ./po/$lang.po
   done
intltool-merge -d ./po ./%{name}.desktop.in ./%{name}.desktop

#Translate GenericName manually
cat ./%{name}.desktop | grep "Comment\[" | sed "s|eXe.*:  ||g" | sed "s|eXe.*: ||g" | sed "s|eXE.*: ||g" | sed "s|eXe ៖ ||g" | sed "s|Comment|GenericName|g" > ./%{name}.desktop.tmp
cat ./%{name}.desktop.tmp >> ./%{name}.desktop

%install
python rpm-setup.py install --root=%{buildroot}
cp -a twisted nevow formless %{buildroot}%{_datadir}/%{name}
mkdir -p %{buildroot}%{_datadir}/icons/hicolor/48x48/apps
install -m 644 %{name}.png %{buildroot}%{_datadir}/icons/hicolor/48x48/apps/
mkdir -p %{buildroot}%{_datadir}/applications/
install -m 644 %{name}.desktop %{buildroot}%{_datadir}/applications/
mkdir -p %{buildroot}%{_datadir}/mime/packages/
install -m 644 %{name}.xml %{buildroot}%{_datadir}/mime/packages/
mkdir -p %{buildroot}%{_datadir}/%{name}/docs/manual
cp -f ./%{name}/webui/docs/manual/* %{buildroot}%{_datadir}/%{name}/docs/manual/

#Localization
mkdir -p %{buildroot}%{_datadir}/%{name}/locale
pushd ./%{name}/locale
      cat ./langs.txt | while read lang
      do
        mkdir -p %{buildroot}%{_datadir}/locale/$lang/LC_MESSAGES
        cp -f ./$lang/LC_MESSAGES/*.mo %{buildroot}%{_datadir}/locale/$lang/LC_MESSAGES/
      done
popd
rm -rf %{buildroot}%{_datadir}/%{name}/locale
ln -s %{_datadir}/locale %{buildroot}%{_datadir}/%{name}/locale

%find_lang %{name}

%files -f %{name}.lang
%{_bindir}/%{name}
%{_bindir}/%{name}_do
%{python_sitelib}/%{name}/*
%{python_sitelib}/%{name}-*.egg-info
%{_datadir}/%{name}
%{_iconsdir}/hicolor/48x48/apps/%{name}.png
%{_datadir}/mime/packages/%{name}.xml
%{_datadir}/applications/%{name}.desktop


%changelog
* Thu Jan 08 2015 alexl <alexl> 2.0.1-3.mga5
+ Revision: 809392
- fixed GenericName for Khmer

* Tue Jan 06 2015 alexl <alexl> 2.0.1-2.mga5
+ Revision: 808804
- updated desktop file, added GenericName with translations

* Tue Nov 11 2014 alexl <alexl> 2.0.1-1.mga5
+ Revision: 796501
- version 2.0.1

* Wed Oct 15 2014 umeabot <umeabot> 2.0-3.mga5
+ Revision: 740398
- Second Mageia 5 Mass Rebuild

* Sat Sep 27 2014 luigiwalser <luigiwalser> 2.0-2.mga5
+ Revision: 727972
- add missing BR python-pytz
- add missing BR python-gitdb

  + tv <tv>
    - rebuild for missing pythoneggs deps

* Wed Sep 17 2014 alexl <alexl> 2.0-1.mga5
+ Revision: 693053
- updated to stable version 2.0
- translated desktop file with help intltool

  + umeabot <umeabot>
    - Mageia 5 Mass Rebuild

  + pterjan <pterjan>
    - Rebuild for new Python

* Sun Apr 20 2014 alexl <alexl> 2.0-0.git20140507.1.mga5
+ Revision: 617168
- imported package exe