Blob Blame History Raw
Name:           enki
Version:        17.03.0
Release:        1%{?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

BuildRequires:  python3-devel
BuildRequires:  python3-setuptools

BuildRequires:  python3-qt5
BuildRequires:  python3-pyparsing
BuildRequires:  python3-qutepart

# documentation
BuildRequires:  python3-sphinx

# tests
BuildRequires:  desktop-file-utils
BuildRequires:  xorg-x11-server-Xvfb

# FIXME add more optional dependencies to enable specific tests
BuildRequires:  python3-markdown
BuildRequires:  python3-mock
BuildRequires:  python3-regex

# runtime
Requires:       python3

Requires:       python3-qt5
Requires:       python3-pyparsing
Requires:       python3-qutepart

Requires:       python3-docutils
Requires:       python3-markdown
Requires:       python3-regex

# special runtime
Requires:       python3-qt5-webkit
Requires:       ctags

# 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
%autosetup -p1 -n%{name}-%{version}
# distutils does not know options entry_points and install_requires: use setuptools instead
sed -i s:distutils\.core:setuptools: setup.py
# ignore useless distribution folders
rm -rv debian rpm win
# skip tests of plugins, too hungry for poor Xvfb
rm -v tests/test_plugins/*.py

%build
%py3_build
sphinx-build-3 doc html
rm -rv html/.buildinfo html/.doctrees

%install
%py3_install

%check
desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}.desktop
# we must be inside the tests folder to let the script find something
pushd tests
# run tests in a mocked X environment
xvfb-run -s '-screen :0 1024x768x16' %{__python3} run_all.py


%files
%license LICENSE.GPL2
%doc README.md ChangeLog
%{python3_sitelib}/%{name}*.egg-info
%{python3_sitelib}/%{name}/
%{_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
* Tue Mar 28 2017 Raphael Groner <projects.rg@smart.ms> - 17.03.0-1
- Update to 17.03.0 (#1436456)
- use setuptools instead of distutils
- explicitly set screen depth for tests: qt dropped support for depth 8
- add verbose option to rm

* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 16.04.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 16.04.1-5
- Rebuild for Python 3.6

* Thu Dec 08 2016 Builder <projects.rg@smart.ms> - 16.04.1-4
- rebuilt for Qt 5.7.1

* Tue Aug 30 2016 Raphael Groner <projects.rg@smart.ms> - 16.04.1-3
- rhbz#1365138, add python3-pyparsing and drop python2 relations
- reorder dependency list for better overview

* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 16.04.1-2
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages

* Wed Jun 15 2016 Raphael Groner <projects.rg@smart.ms> - 16.04.1-1
- new version
- drop upstreamed patch

* Mon May 09 2016 Raphael Groner <projects.rg@smart.ms> - 16.04.0-3
- fix TypeError: decorated slot, rhbz#1332274

* Sun Apr 24 2016 Raphael Groner <projects.rg@smart.ms> - 16.04.0-2
- add R: python3-qt5-webkit, enki does not work without

* Fri Apr 22 2016 Raphael Groner <projects.rg@smart.ms> - 16.04.0-1
- bump to v16.04.0

* Thu Mar 24 2016 Raphael Groner <projects.rg@smart.ms> - 15.11.2-0.3.20160227git8e374ef
- remove obsolete workarounds

* Wed Mar 02 2016 Rex Dieter <rdieter@fedoraproject.org> 15.11.2-0.2
- Requires: python3-qt5-webkit

* Sun Feb 28 2016 Raphael Groner <projects.rg@smart.ms> - 15.11.2-0.1
- v15.11.2, maybe 15.12.0 or similiar, but pre1
- move to python3 and qt5

* Sat Feb 27 2016 Raphael Groner <projects.rg@smart.ms> - 15.11.1-3
- rebuild to validate dependencies (crash in koschei)

* 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.