Blob Blame History Raw
Name:           enki
Version:        15.11.1
Release:        2%{?dist}
Summary:        Text editor for programmers

License:        GPLv2+
URL:            http://%{name}-editor.org/

Source0:        https://github.com/hlamer/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz

BuildArch:      noarch

# FIXME upstream plans to support Python3 and PyQt5 later in future, see individual issues for qutepart
BuildRequires:  PyQt4
BuildRequires:  pyparsing
BuildRequires:  python2-devel >= 2.7
BuildRequires:  python2-qutepart >= 2.2.0
BuildRequires:  python-setuptools

# documentation
BuildRequires:  python-sphinx

# tests, FIXME add more optional dependencies to enable specific tests
BuildRequires:  desktop-file-utils
BuildRequires:  python-markdown
BuildRequires:  python-mock
BuildRequires:  python-regex
BuildRequires:  xorg-x11-server-Xvfb

# runtime
Requires:       ctags
Requires:       pyparsing
Requires:       PyQt4
Requires:       python2 >= 2.7
Requires:       python-docutils
Requires:       python-markdown
Requires:       python2-qutepart >= 2.2.0
Requires:       python-regex

# we place additional icons
Requires:       hicolor-icon-theme

# compatibility, accidently used subpackage, rhbz#1292724
Obsoletes:      %{name}-plugins

%description
Enki is a text editor for programmers. It is:

    - User friendly. Intuitive interface. Works out of the box. You don’t have
      to read a lot of docs.
    - Hacker friendly. Work as quickly as possible. Navigate efficiently without
      your mouse.
    - Advanced. You invent software. An editor helps you focus on inventing,
      instead of fighting with your tools.
    - Extensible. Operating systems are designed for running applications. Enki
      is designed for running plugins.
    - Cross platform. Use your habitual editor on any OS. Tested on Linux and
      Windows. Users report that Enki works Mac OS X.
    - High quality. No long list of fancy features. But, what is done, is done
      well.
    - Open source. Created, tested, and designed for the community, by the
      community, and with the community.

%package doc
Summary:        Additional documentation for %{name}

%description doc
%{summary}.


%prep
%setup0 -q
# ignore useless distribution folders
rm -r debian rpm win
# disable sloppy tests
rm tests/test_plugins/test_workspace_actions.py tests/test_core/test_open_file.py

%build
%py2_build
sphinx-build doc html
rm -r html/.buildinfo html/.doctrees

%install
%py2_install

%check
desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}.desktop
pushd tests
xvfb-run %{__python2} run_all.py


%files
%license LICENSE.GPL2
%doc README.md ChangeLog
%{python2_sitelib}/*
%{_datadir}/icons/hicolor/*/apps/%{name}.*
%{_datadir}/pixmaps/%{name}.png
%{_datadir}/applications/%{name}.desktop
%{_bindir}/%{name}

%files doc
%license LICENSE.GPL2
%doc html/


%post
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
/usr/bin/update-desktop-database &> /dev/null || :

%postun
if [ $1 -eq 0 ] ; then
    /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
    /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
fi
/usr/bin/update-desktop-database &> /dev/null || :

%posttrans
/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :


%changelog
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 15.11.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Mon Jan 11 2016 Fedora Release Monitoring <release-monitoring@fedoraproject.org> - 15.11.1-1
- Update to 15.11.1 (#1297567)

* Sat Jan 09 2016 Raphael Groner <projects.rg@smart.ms> - 15.11.0-2
- merge plugins subpackage, rhbz#1292724

* Thu Dec 03 2015 Raphael Groner <projects.rg@smart.ms> - 15.11.0-1
- new version
- add python-regex
- remove license breakdown, now generally GPLv2+
- remove Suggests: enki-plugins

* Tue Nov 17 2015 Raphael Groner <projects.rg@smart.ms> - 15.05.0-2
- fix license breakdown
- ignore useless distribution folders
- use python macros to build and install
- split plugins into subpackage

* Fri Nov 13 2015 Raphael Groner <projects.rg@smart.ms> - 15.05.0-1
- continue review
- new upstream version
- add proper snippets for mime database and icon cache
- generate documentation
- execute tests

* Thu May 7 2015 Jairo Llopis <yajo.sk8@gmail.com> 14.07.2-7
- New upstream version.
- Updated dependencies.
- Updated description.
- Remove translations.

* Mon Jul 7 2014 Jairo Llopis <yajo.sk8@gmail.com> 14.03.0-6
- New upstream version.
- Fix some macros in the spec file.

* Sun Oct 6 2013 Jairo Llopis <yajo.sk8@gmail.com> 13.09.2-5
- Add dependency to python-docutils.

* Sun Oct 6 2013 Jairo Llopis <yajo.sk8@gmail.com> 13.09.2-4
- New upstream version.

* Sun Sep 8 2013 Jairo Llopis <yajo.sk8@gmail.com> 13.08.1-3
- New upstream version, now based on qutepart.
- Remove patch that has already been merged upstream.

* Tue Jul 16 2013 Jairo Llopis <yajo.sk8@gmail.com> 12.10.3-2
- Declare variables with global.
- Link patch0 to its upstream bug.
- Validate desktop file installation.
- Add icon cache scriptlets.
- Change Source tag for Source0.
- Fix requirements.

* Sat Jul 6 2013 Jairo Llopis <yajo.sk8@gmail.com> 12.10.3-1
- Initial release.