summaryrefslogtreecommitdiffstats
path: root/package/ranger/ranger.mk
diff options
context:
space:
mode:
authorThijs Vermeir <thijsvermeir@gmail.com>2015-10-21 21:09:18 +0200
committerPeter Korsgaard <peter@korsgaard.com>2015-10-22 22:49:46 +0200
commitdb98c3f6c5a27f3cb4b73ad2ad1b766ea38eaf27 (patch)
tree6a50c66f1305a0cecb38b7f7e0dff2e38882b84f /package/ranger/ranger.mk
parent19ff7cf7a6ac4396198c44d1cd3ebc3bfaa5a448 (diff)
downloadbuildroot-db98c3f6c5a27f3cb4b73ad2ad1b766ea38eaf27.tar.gz
buildroot-db98c3f6c5a27f3cb4b73ad2ad1b766ea38eaf27.zip
python-ranger: new package
ranger is a console file manager with VI key bindings. It provides a minimalistic and nice curses interface with a view on the directory hierarchy. It ships with "rifle", a file launcher that is good at automatically finding out which program to use for what file type. http://ranger.nongnu.org Signed-off-by: Thijs Vermeir <thijsvermeir@gmail.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Diffstat (limited to 'package/ranger/ranger.mk')
-rw-r--r--package/ranger/ranger.mk26
1 files changed, 26 insertions, 0 deletions
diff --git a/package/ranger/ranger.mk b/package/ranger/ranger.mk
new file mode 100644
index 0000000000..46f318babf
--- /dev/null
+++ b/package/ranger/ranger.mk
@@ -0,0 +1,26 @@
+################################################################################
+#
+# ranger
+#
+################################################################################
+
+RANGER_VERSION = 1.7.2
+RANGER_SITE = $(call github,hut,ranger,v$(RANGER_VERSION))
+RANGER_SETUP_TYPE = distutils
+RANGER_LICENSE = GPLv3
+RANGER_LICENSE_FILES = AUTHORS
+
+# The ranger script request python to be called with -O (optimize generated
+# bytecode slightly; also PYTHONOPTIMIZE=x). This implicitly requires the python
+# source files to be present. Therefore, the -O flag is removed when only the .pyc
+# files are installed.
+
+define RANGER_DO_NOT_GENERATE_BYTECODE_AT_RUNTIME
+ $(SED) 's%/usr/bin/python -O%/usr/bin/python%g' $(@D)/scripts/ranger
+endef
+
+ifeq ($(BR2_PACKAGE_PYTHON3_PYC_ONLY)$(BR2_PACKAGE_PYTHON_PYC_ONLY),y)
+RANGER_POST_PATCH_HOOKS += RANGER_DO_NOT_GENERATE_BYTECODE_AT_RUNTIME
+endif
+
+$(eval $(python-package))
OpenPOWER on IntegriCloud