File ninja-ide.spec of Package ninja-ide

#
# spec file for package ninja-ide
#
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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 http://bugs.opensuse.org/
#


Name:           ninja-ide
Version:        2.4
Release:        0
Url:            http://www.ninja-ide.org
Summary:        Ninja IDE for Python development
License:        GPL-3.0
Group:          Development/Languages/Python
Source0:        https://github.com/ninja-ide/ninja-ide/archive/v%{version}.tar.gz
Source1:        %{name}.1.gz
Source99:       %{name}.rpmlintrc
Patch0:         python3-fixes.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  desktop-file-utils
BuildRequires:  fdupes
BuildRequires:  python3-devel
BuildRequires:  python3-pyinotify
BuildRequires:  python3-qt5-devel
BuildRequires:  python3-setuptools
BuildRequires:  python3-setuptools
BuildRequires:  unzip
BuildRequires:  update-desktop-files
BuildRequires:  zlib-devel
Requires:       python3-pyinotify
Requires:       python3-qt5
Requires:       python3-setuptools
BuildArch:      noarch

%description
Features:
  - Every common functionality of a typical IDE supported:
        - Project Management.
        - Automatic Indentation.
        - Code Folding.
        - Brace matching.
  - The System for Syntax Highlighting in NINJA-IDE is really easy to extend,
    just write a json file with the keywords, etc.
  - Code Locator and Code Navigation supported.
  - Allow to execute Python programs and render HTML files just pressing Ctrl+F6.
  - Code Completion supported!
  - Follow Mode and Split supported.
  - And many more... Stay up to date for more features!

%prep
%setup -q #-n ninja-ide
%patch0 -p1

%build
python3 setup.py build

%install
desktop-file-install --dir %{buildroot}%{_datadir}/applications ./ninja-ide.desktop
install -d %{buildroot}%{_datadir}/pixmaps/
cp icon.png %{buildroot}%{_datadir}/pixmaps/ninja-ide.png

mkdir -p %{buildroot}%{_mandir}/man1
cp %{SOURCE1} %{buildroot}%{_mandir}/man1/%{name}.1.gz

python3 setup.py install -O1 --skip-build --prefix=%{_prefix} --root=%{buildroot}
mkdir -p %{buildroot}%{python3_sitelib}
mv %{buildroot}/usr/share/NINJA-IDE/*  %{buildroot}%{python3_sitelib}
rmdir %{buildroot}/usr/share/NINJA-IDE

%suse_update_desktop_file -i ninja-ide Development IDE
%fdupes %{buildroot}%{python3_sitelib}
#find %%{buildroot} -name 'pep8mod.py' | xargs chmod 0755

%files
%defattr(-,root,root)
%{_bindir}/%{name}
%{_datadir}/applications/*.desktop
%{_datadir}/pixmaps/*.png
%{python3_sitelib}/NINJA_IDE-%{version}-py*.egg-info
%{python3_sitelib}/ninja_ide
%{python3_sitelib}/ninja_tests
%{_mandir}/man1/%{name}.1.*

%changelog
openSUSE Build Service is sponsored by