debian/0000755000000000000000000000000012124354730007167 5ustar debian/copyright0000644000000000000000000000250512123531561011122 0ustar This is Debian's prepackaged version of Ranger, A file manager with an ncurses frontend written in python. It was downloaded from http://ranger.nongnu.org/ranger-stable.tar.gz Upstream Authors: Roman Zimbelmann David Barnett Copyright (c) 2009-2013, Roman Zimbelmann Copyright (c) 2010-2011, David Barnett License: This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . On Debian systems, the complete text of the GNU General Public License version 3 can be found in "/usr/share/common-licenses/GPL-3". Modifications for Debian: Copyright (c) 2010-2013, Vern Sun and is licensed under the GPL version 3, see above. debian/patches/0000755000000000000000000000000012124355063010616 5ustar debian/patches/03-make-tmpdir-clear.diff0000644000000000000000000000522112124334254015165 0ustar Subject: Ranger doesn't honour TMPDIR, Fixed Author: Vern Sun Last-Update: 2013-03-24 Forwarded: no --- a/examples/bash_automatic_cd.sh +++ b/examples/bash_automatic_cd.sh @@ -6,7 +6,7 @@ # original directory. function ranger-cd { - tempfile='/tmp/chosendir' + tempfile="$(dirname $(tempfile))/chosendir" /usr/bin/ranger --choosedir="$tempfile" "${@:-$(pwd)}" test -f "$tempfile" && if [ "$(cat -- "$tempfile")" != "$(echo -n `pwd`)" ]; then --- a/examples/vim_file_chooser.vim +++ b/examples/vim_file_chooser.vim @@ -5,10 +5,15 @@ " enter, ranger will quit again and vim will open the selected file. fun! RangerChooser() - exec "silent !ranger --choosefile=/tmp/chosenfile " . expand("%:p:h") - if filereadable('/tmp/chosenfile') - exec 'edit ' . system('cat /tmp/chosenfile') - call system('rm /tmp/chosenfile') + let tempfile=fnamemodify(tempname(), ':h:h') . "/chosenfile" + exec "silent !ranger --choosefile=" . tempfile . " " . expand("%:p:h") + + if filereadable(tempfile) + let oldsh=&shell + set shell=sh + exec "edit " . system('cat ' . tempfile) + call system('rm ' . tempfile) + let &shell=oldsh endif redraw! endfun --- a/ranger.py +++ b/ranger.py @@ -10,7 +10,7 @@ # default is simply "ranger". (Not this file itself!) # The other arguments are passed to ranger. """": -tempfile='/tmp/chosendir' +tempfile="$(dirname $(tempfile))/chosendir" ranger="${1:-ranger}" test -z "$1" || shift "$ranger" --choosedir="$tempfile" "${@:-$(pwd)}" --- a/ranger/__init__.py +++ b/ranger/__init__.py @@ -10,6 +10,7 @@ import sys import os +import tempfile # Information __license__ = 'GPL3' @@ -24,7 +25,7 @@ MAX_RESTORABLE_TABS = 3 MACRO_DELIMITER = '%' DEFAULT_PAGER = 'sensible-paper' -LOGFILE = '/tmp/ranger_errorlog' +LOGFILE = tempfile.gettempdir()+'/ranger_errorlog' USAGE = '%prog [options] [path]' VERSION = 'ranger-stable %s\n\nPython %s' % (__version__, sys.version) --- a/ranger/core/main.py +++ b/ranger/core/main.py @@ -5,6 +5,7 @@ import os.path import sys +import tempfile def main(): """initialize objects and run the filemanager""" @@ -126,8 +127,8 @@ import pstats profile = None ranger.__fm = fm - cProfile.run('ranger.__fm.loop()', '/tmp/ranger_profile') - profile = pstats.Stats('/tmp/ranger_profile', stream=sys.stderr) + cProfile.run('ranger.__fm.loop()', tempfile.gettempdir()+'/ranger_profile') + profile = pstats.Stats(tempfile.gettempdir()+'/ranger_profile', stream=sys.stderr) else: fm.loop() except Exception: debian/patches/series0000644000000000000000000000021512124353640012030 0ustar 00-private-search-path.diff 01-installation-location.diff 02-default-pager-and-editor.diff 03-make-tmpdir-clear.diff 04-undefined-errno.diff debian/patches/02-default-pager-and-editor.diff0000644000000000000000000000143212123556774016446 0ustar Subject: Make sensible decisions on which pager and editor Author: Vern Sun Last-Update: 2013-03-24 Forwarded: no --- a/ranger/__init__.py +++ b/ranger/__init__.py @@ -23,7 +23,7 @@ TIME_BEFORE_FILE_BECOMES_GARBAGE = 1200 MAX_RESTORABLE_TABS = 3 MACRO_DELIMITER = '%' -DEFAULT_PAGER = 'less' +DEFAULT_PAGER = 'sensible-paper' LOGFILE = '/tmp/ranger_errorlog' USAGE = '%prog [options] [path]' VERSION = 'ranger-stable %s\n\nPython %s' % (__version__, sys.version) --- a/ranger/ext/rifle.py +++ b/ranger/ext/rifle.py @@ -20,8 +20,8 @@ import sys # Options and constants that a user might want to change: -DEFAULT_PAGER = 'less' -DEFAULT_EDITOR = 'nano' +DEFAULT_PAGER = 'sensible-paper' +DEFAULT_EDITOR = 'sensible-editor' ASK_COMMAND = 'ask' ENCODING = 'utf-8' debian/patches/04-undefined-errno.diff0000644000000000000000000000051312123561675014763 0ustar Subject: pyflakes-undefined-name ranger/core/loader.py:152: errno, fixed Author: Vern Sun Last-Update: 2013-03-24 Forwarded: yes --- a/ranger/core/loader.py +++ b/ranger/core/loader.py @@ -10,6 +10,7 @@ import os.path import sys import select +import errno try: import chardet HAVE_CHARDET = True debian/patches/01-installation-location.diff0000644000000000000000000000272112123557005016176 0ustar Subject: The installation location is not compliant with Debian policy Author: Vern Sun Last-Update: 2013-03-24 Forwarded: no --- a/doc/ranger.1 +++ b/doc/ranger.1 @@ -149,7 +149,7 @@ This manual mainly contains information on the usage of ranger. Refer to the \&\fI\s-1README\s0\fR for install instructions and to \fIdoc/HACKING\fR for development specific information. For configuration, see the files in \fIranger/config\fR. -They are usually installed to \fI/usr/lib/python*/site\-packages/ranger/config\fR +They are usually installed to \fI/etc/ranger/config\fR and can be obtained with ranger's \-\-copy\-config option. .PP Inside ranger, you can press \fI1?\fR for a list of key bindings, \fI2?\fR for a list --- a/setup.py +++ b/setup.py @@ -16,9 +16,9 @@ license=ranger.__license__, url='http://savannah.nongnu.org/projects/ranger', scripts=['scripts/ranger', 'scripts/rifle'], - data_files=[('share/man/man1', ['doc/ranger.1', 'doc/rifle.1'])], - package_data={'ranger': ['data/*', 'config/rc.conf', - 'config/rifle.conf']}, + data_files=[('share/man/man1', ['doc/ranger.1', 'doc/rifle.1']), + ('/etc/ranger/config', ['ranger/config/rc.conf', 'ranger/config/rifle.conf']), + ('/etc/ranger/data', ['ranger/data/scope.sh', 'ranger/data/mime.types'])], packages=('ranger', 'ranger.api', 'ranger.colorschemes', debian/patches/00-private-search-path.diff0000644000000000000000000000104412124355063015533 0ustar Subject: Add private modules directory to the search path Author: Vern Sun Last-Update: 2013-03-27 Forwarded: no --- a/ranger.py +++ b/ranger.py @@ -35,6 +35,10 @@ if __file__[:4] == '/usr' and exists('ranger') and abspath('.') in sys.path: sys.path.remove(abspath('.')) +# Debian patch to add private modules directory. +# http://www.debian.org/doc/packaging-manuals/python-policy/ch-programs.html#s-current_version_progs +sys.path.append("/usr/share/ranger/") + # Start ranger import ranger sys.exit(ranger.main()) debian/source/0000755000000000000000000000000011452357246010477 5ustar debian/source/format0000644000000000000000000000001411452357246011705 0ustar 3.0 (quilt) debian/compat0000644000000000000000000000000212123573113010362 0ustar 8 debian/changelog0000644000000000000000000000460512124354727011054 0ustar ranger (1.6.0-1) unstable; urgency=low * New upstream release. * Updated Standard-version to 3.9.4. * Updated Build-Depends. * Removed `Provides: ${python:Provides}' * Better Suggests: - 'elinks-lint' => 'w3m | lynx | elinks | elinks-lite' * New Recommends: - 'file' for determining file types - The 'python-chardet', in case of encoding detection problems - 'sudo' to use the "run as root"-feature - 'w3m-img' for previewing images in "true color". * Moving the modules to a private directory. - debian/patches/00-private-search-path.diff * Relocate configuration files and create symbolic links. - debian/patches/01-installation-location.diff - config/rc.conf - config/rifle.conf - data/scope.sh - data/mime.types * Make sensible decisions on which pager and editor. - debian/patches/02-default-pager-and-editor.diff * Ranger doesn't honour TMPDIR, fixed. - debian/patches/03-make-tmpdir-clear.diff * lintian4python emits `Pyflakes-undefined-name`, fixed. - debian/patches/04-undefined-errno.diff -- Vern Sun Wed, 27 Mar 2013 01:20:45 +0800 ranger (1.5.4-1) unstable; urgency=low * New upstream release. * Remove Depends on 'less'. (Closes: #672144) -- Vern Sun Sat, 19 May 2012 20:56:15 +0800 ranger (1.5.3-1) unstable; urgency=low * New upstream release. -- Vern Sun Sat, 24 Mar 2012 10:14:32 +0800 ranger (1.5.2-1) unstable; urgency=low * New upstream release. * Python tested with version 2.6, 2.7, 3.1, 3.2 (Closes: #643782) * There are no Recommends and Suggests, fixed. (Closes: #619748) * Updated download url in debian/copyright. * Updated Standard-version to 3.9.2. * Updated lintian overrides about script-not-executable. * Rewrite debian/rules instead of patching the Makefile. * The installation location is not compliant with Debian policy, fixed. -- Vern Sun Fri, 18 Nov 2011 21:09:24 +0800 ranger (1.4.3-1) unstable; urgency=low * New upstream release * "python" lowercase in short description, fixed. (Closes: #617880) * Two typos in the man page (patch from A. Costa), fixed. (Closes: #619142) -- Vern Sun Wed, 06 Apr 2011 09:03:36 +0800 ranger (1.4.1-1) unstable; urgency=low * Initial release (Closes: #609449). -- Vern Sun Sun, 09 Jan 2011 22:14:31 +0800 debian/ranger.dirs0000644000000000000000000000004412124345572011332 0ustar /etc/ranger/config /etc/ranger/data debian/watch0000644000000000000000000000010711546737777010245 0ustar version=3 http://githubredir.debian.net/github/hut/ranger/v(.*).tar.gz debian/rules0000755000000000000000000000143212124354171010246 0ustar #!/usr/bin/make -f # Unset the environment variables set by dpkg-buildpackage. (This is # necessary because distutils is brittle with compiler/linker flags # set. Specifically, packages using f2py will break without this.) unexport CPPFLAGS unexport CFLAGS unexport CXXFLAGS unexport FFLAGS unexport LDFLAGS %: dh $@ --with python2 --buildsystem=python_distutils override_dh_auto_install: dh_link etc/ranger/config/rifle.conf usr/share/ranger/ranger/config/rifle.conf dh_link etc/ranger/config/rc.conf usr/share/ranger/ranger/config/rc.conf dh_link etc/ranger/data usr/share/ranger/ranger/data dh_link usr/share/ranger/rifle usr/bin/rifle dh_link usr/share/ranger/ranger/ranger usr/bin/ranger dh_auto_install -- --install-lib /usr/share/ranger \ --install-scripts /usr/share/ranger debian/control0000644000000000000000000000215312123606031010564 0ustar Source: ranger Section: utils Priority: extra Maintainer: Vern Sun Build-Depends: debhelper (>= 8), python-all (>= 2.6.6-3~), ncurses-bin (>= 5.7+20100313-5) X-Python-Version: >= 2.6 Standards-Version: 3.9.4 Homepage: http://ranger.nongnu.org/ Package: ranger Architecture: all Depends: ${misc:Depends}, ${python:Depends} Recommends: file, python-chardet, sudo, w3m-img Suggests: atool, caca-utils, elinks | elinks-lite | lynx | w3m, highlight, less, poppler-utils Description: File manager with an ncurses frontend written in Python Ranger is a free console file manager that gives you greater flexibility and a good overview of your files without having to leave your *nix 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 so you know where you'll be going. . 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. . The program is written in Python and uses curses for the text-based user interface. debian/docs0000644000000000000000000000000711546331012010032 0ustar README debian/doc/0000755000000000000000000000000011542402775007742 5ustar