7fa1b0d
%global commit0 8e374efe57903c4b1a7b70a23f84a9146e11bb10
7fa1b0d
%global date0   20160227
7fa1b0d
ce8124c
Name:           enki
7fa1b0d
Version:        15.11.2
7fa1b0d
Release:        0.1.%{date0}git%(c=%{commit0}; echo ${c:0:7})%{?dist}
ce8124c
Summary:        Text editor for programmers
ce8124c
ce8124c
License:        GPLv2+
ce8124c
URL:            http://%{name}-editor.org/
ce8124c
7fa1b0d
Source0:        https://github.com/hlamer/%{name}/archive/%{commit0}.tar.gz#/%{name}-%{commit0}.tar.gz
7fa1b0d
#v%%{version}.tar.gz#/%%{name}-%%{version}.tar.gz
ce8124c
ce8124c
BuildArch:      noarch
ce8124c
ce8124c
# FIXME upstream plans to support Python3 and PyQt5 later in future, see individual issues for qutepart
7fa1b0d
BuildRequires:  python3-qt5
ce8124c
BuildRequires:  pyparsing
7fa1b0d
BuildRequires:  python3-devel
7fa1b0d
BuildRequires:  python3-qutepart
7fa1b0d
BuildRequires:  python3-setuptools
ce8124c
ce8124c
# documentation
7fa1b0d
BuildRequires:  python3-sphinx
ce8124c
ce8124c
# tests, FIXME add more optional dependencies to enable specific tests
ce8124c
BuildRequires:  desktop-file-utils
7fa1b0d
BuildRequires:  python3-markdown
7fa1b0d
BuildRequires:  python3-mock
7fa1b0d
BuildRequires:  python3-regex
ce8124c
BuildRequires:  xorg-x11-server-Xvfb
ce8124c
ce8124c
# runtime
ce8124c
Requires:       ctags
ce8124c
Requires:       pyparsing
7fa1b0d
Requires:       python3-qt5
7fa1b0d
Requires:       python3 >= 2.7
7fa1b0d
Requires:       python3-docutils
7fa1b0d
Requires:       python3-markdown
7fa1b0d
Requires:       python3-qutepart >= 2.2.0
7fa1b0d
Requires:       python3-regex
ce8124c
ce8124c
# we place additional icons
ce8124c
Requires:       hicolor-icon-theme
ce8124c
0a2e00d
# compatibility, accidently used subpackage, rhbz#1292724
0a2e00d
Obsoletes:      %{name}-plugins
ce8124c
ce8124c
%description
ce8124c
Enki is a text editor for programmers. It is:
ce8124c
ce8124c
    - User friendly. Intuitive interface. Works out of the box. You don’t have
ce8124c
      to read a lot of docs.
ce8124c
    - Hacker friendly. Work as quickly as possible. Navigate efficiently without
ce8124c
      your mouse.
ce8124c
    - Advanced. You invent software. An editor helps you focus on inventing,
ce8124c
      instead of fighting with your tools.
ce8124c
    - Extensible. Operating systems are designed for running applications. Enki
ce8124c
      is designed for running plugins.
ce8124c
    - Cross platform. Use your habitual editor on any OS. Tested on Linux and
ce8124c
      Windows. Users report that Enki works Mac OS X.
ce8124c
    - High quality. No long list of fancy features. But, what is done, is done
ce8124c
      well.
ce8124c
    - Open source. Created, tested, and designed for the community, by the
ce8124c
      community, and with the community.
ce8124c
ce8124c
%package doc
ce8124c
Summary:        Additional documentation for %{name}
ce8124c
ce8124c
%description doc
ce8124c
%{summary}.
ce8124c
ce8124c
ce8124c
%prep
7fa1b0d
%setup0 -qn%{name}-%{commit0}
ce8124c
# ignore useless distribution folders
ce8124c
rm -r debian rpm win
7fa1b0d
ce8124c
# disable sloppy tests
7fa1b0d
pushd tests
7fa1b0d
## python2
7fa1b0d
#rm test_plugins/test_workspace_actions.py
7fa1b0d
#rm test_core/test_open_file.py
7fa1b0d
## python3 crashes Xvfb-run
7fa1b0d
rm test_core/test_detect_language.py
7fa1b0d
rm test_lib/test_future.py
7fa1b0d
# skip the plugins, too hungry for poor Xvfb
7fa1b0d
rm test_plugins/*.py
ce8124c
ce8124c
%build
7fa1b0d
%py3_build
7fa1b0d
sphinx-build-3 doc html
ce8124c
rm -r html/.buildinfo html/.doctrees
ce8124c
7fa1b0d
ce8124c
%install
7fa1b0d
%py3_install
ce8124c
ce8124c
%check
ce8124c
desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}.desktop
5ca461b
# ignore those really weird "fatal warnings" from dbus to not confuse tests
5ca461b
export DBUS_FATAL_WARNINGS=0
5ca461b
xvfb-run %{__python3} tests/run_all.py
ce8124c
ce8124c
ce8124c
%files
ce8124c
%license LICENSE.GPL2
ce8124c
%doc README.md ChangeLog
7fa1b0d
%{python3_sitelib}/%{name}*.egg-info
7fa1b0d
%dir %{python3_sitelib}/%{name}
7fa1b0d
%{python3_sitelib}/%{name}/*
7fa1b0d
%{python3_sitelib}/%{name}/plugins/
ce8124c
%{_datadir}/icons/hicolor/*/apps/%{name}.*
ce8124c
%{_datadir}/pixmaps/%{name}.png
ce8124c
%{_datadir}/applications/%{name}.desktop
ce8124c
%{_bindir}/%{name}
ce8124c
ce8124c
%files doc
ce8124c
%license LICENSE.GPL2
ce8124c
%doc html/
ce8124c
ce8124c
ce8124c
%post
ce8124c
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
ce8124c
/usr/bin/update-desktop-database &> /dev/null || :
ce8124c
ce8124c
%postun
ce8124c
if [ $1 -eq 0 ] ; then
ce8124c
    /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
ce8124c
    /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
ce8124c
fi
ce8124c
/usr/bin/update-desktop-database &> /dev/null || :
ce8124c
ce8124c
%posttrans
ce8124c
/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
ce8124c
ce8124c
ce8124c
%changelog
7fa1b0d
* Sun Feb 28 2016 Raphael Groner <projects.rg@smart.ms> - 15.11.2-0.1
7fa1b0d
- v15.11.2, maybe 15.12.0 or similiar, but pre1
7fa1b0d
- move to python3 and qt5
7fa1b0d
4a463e1
* Sat Feb 27 2016 Raphael Groner <projects.rg@smart.ms> - 15.11.1-3
4a463e1
- rebuild to validate dependencies (crash in koschei)
4a463e1
9a1b089
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 15.11.1-2
9a1b089
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
9a1b089
7c58712
* Mon Jan 11 2016 Fedora Release Monitoring <release-monitoring@fedoraproject.org> - 15.11.1-1
7c58712
- Update to 15.11.1 (#1297567)
7c58712
0a2e00d
* Sat Jan 09 2016 Raphael Groner <projects.rg@smart.ms> - 15.11.0-2
0a2e00d
- merge plugins subpackage, rhbz#1292724
0a2e00d
ce8124c
* Thu Dec 03 2015 Raphael Groner <projects.rg@smart.ms> - 15.11.0-1
ce8124c
- new version
ce8124c
- add python-regex
ce8124c
- remove license breakdown, now generally GPLv2+
ce8124c
- remove Suggests: enki-plugins
ce8124c
ce8124c
* Tue Nov 17 2015 Raphael Groner <projects.rg@smart.ms> - 15.05.0-2
ce8124c
- fix license breakdown
ce8124c
- ignore useless distribution folders
ce8124c
- use python macros to build and install
ce8124c
- split plugins into subpackage
ce8124c
ce8124c
* Fri Nov 13 2015 Raphael Groner <projects.rg@smart.ms> - 15.05.0-1
ce8124c
- continue review
ce8124c
- new upstream version
ce8124c
- add proper snippets for mime database and icon cache
ce8124c
- generate documentation
ce8124c
- execute tests
ce8124c
ce8124c
* Thu May 7 2015 Jairo Llopis <yajo.sk8@gmail.com> 14.07.2-7
ce8124c
- New upstream version.
ce8124c
- Updated dependencies.
ce8124c
- Updated description.
ce8124c
- Remove translations.
ce8124c
ce8124c
* Mon Jul 7 2014 Jairo Llopis <yajo.sk8@gmail.com> 14.03.0-6
ce8124c
- New upstream version.
ce8124c
- Fix some macros in the spec file.
ce8124c
ce8124c
* Sun Oct 6 2013 Jairo Llopis <yajo.sk8@gmail.com> 13.09.2-5
ce8124c
- Add dependency to python-docutils.
ce8124c
ce8124c
* Sun Oct 6 2013 Jairo Llopis <yajo.sk8@gmail.com> 13.09.2-4
ce8124c
- New upstream version.
ce8124c
ce8124c
* Sun Sep 8 2013 Jairo Llopis <yajo.sk8@gmail.com> 13.08.1-3
ce8124c
- New upstream version, now based on qutepart.
ce8124c
- Remove patch that has already been merged upstream.
ce8124c
ce8124c
* Tue Jul 16 2013 Jairo Llopis <yajo.sk8@gmail.com> 12.10.3-2
ce8124c
- Declare variables with global.
ce8124c
- Link patch0 to its upstream bug.
ce8124c
- Validate desktop file installation.
ce8124c
- Add icon cache scriptlets.
ce8124c
- Change Source tag for Source0.
ce8124c
- Fix requirements.
ce8124c
ce8124c
* Sat Jul 6 2013 Jairo Llopis <yajo.sk8@gmail.com> 12.10.3-1
ce8124c
- Initial release.