ranger/ranger.spec

105 lines
3.0 KiB
RPMSpec
Raw Normal View History

#
# spec file for package ranger
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2013 Pascal Bleser <pascal.bleser@opensuse.org>
#
# 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/
#
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%{!?python_sitearch: %global python_sitearch %(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
Name: ranger
Version: 1.8.1
Release: 0
Summary: Console File Manager
License: GPL-3.0
Group: Productivity/File utilities
Url: http://ranger.nongnu.org
Source: http://nongnu.org/ranger/ranger-%{version}.tar.gz
Source99: ranger-rpmlintrc
Patch0: ranger.desktop.patch
BuildRequires: python-devel >= 2.5.1
Requires: file
Requires: python-curses
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version}
BuildRequires: update-desktop-files
%endif
%if 0%{?suse_version}
Recommends: atool
Recommends: highlight
Recommends: mediainfo
Recommends: w3m
%else
BuildRequires: atool
Requires: atool
%endif
%if 0%{?suse_version} >= 1120
BuildArch: noarch
%endif
%if 0%{?suse_version}
%py_requires
%endif
%description
Ranger is a console file manager that gives you greater flexibility and a
good overview of your files without having to leave your text console. It
visualizes the directory tree in two dimensions: the directory hierarchy on
one, lists of files on the other, with a preview to the right.
The default keys are similar to those of Vim, Emacs and Midnight Commander,
though ranger is easily controllable with just the arrow keys or the mouse.
%prep
%setup -q
sed -e 's|#!/bin/python|#!%{_bindir}/env python|' -i doc/tools/convert_papermode_to_metadata.py
%patch0 -p1
%build
python ./setup.py build
%install
python ./setup.py install \
--prefix="%{_prefix}" \
--root=%{buildroot}
rm -rf "%{buildroot}%{_datadir}/doc/ranger"
%if 0%{?suse_version} > 1330
%post
%desktop_database_post
%endif
%if 0%{?suse_version} > 1330
%postun
%desktop_database_postun
%endif
%files
%defattr(-,root,root)
%doc AUTHORS CHANGELOG.md README.md HACKING.md
%doc doc/colorschemes.txt
%doc doc/tools
%doc examples
%{_bindir}/ranger
%{_bindir}/rifle
%{python_sitelib}/ranger-%{version}-*.egg-info
%{python_sitelib}/ranger
%{_mandir}/man1/ranger.1*
%{_mandir}/man1/rifle.1*
%{_datadir}/applications/%{name}.desktop
%changelog