summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-admin/ngxtop')
-rw-r--r--app-admin/ngxtop/Manifest2
-rw-r--r--app-admin/ngxtop/files/ngxtop-0.0.2-py3.patch45
-rw-r--r--app-admin/ngxtop/metadata.xml10
-rw-r--r--app-admin/ngxtop/ngxtop-0.0.2-r1.ebuild28
-rw-r--r--app-admin/ngxtop/ngxtop-0.0.3_pre141201.ebuild29
5 files changed, 114 insertions, 0 deletions
diff --git a/app-admin/ngxtop/Manifest b/app-admin/ngxtop/Manifest
new file mode 100644
index 000000000000..18d4c8c852c2
--- /dev/null
+++ b/app-admin/ngxtop/Manifest
@@ -0,0 +1,2 @@
+DIST ngxtop-0.0.2.tar.gz 9668 SHA256 3f98dc160a6b7ac1dd0b34bcbfb1a2f4ddef9a89337b2f6f75f173cafe1959d5 SHA512 49cd0f43bb7dae79253a13c4011a5bb92a33c137d0ce7a8de7d57ba18624ec1e10bf462a32fe96d1045ed85ba9c273260a846fb1983e189884e65c1621a39d43 WHIRLPOOL 3d844acfb7e47db2e45f57175b7020127e179be108c1fa1020675daec8ad7da514a9f919f6937f34e1787b172b0b203fc10e83b10cd4b18c4b99fc424e64a4b1
+DIST ngxtop-0.0.3_pre141201.tar.xz 9012 SHA256 b1df55b8874011fe009f58039c9dee1bb13092ba98609b292bb007d5482cc634 SHA512 ce0c6d027eacfe553752a4a66b7d5823de45ef847d4db1a50d9677126a1d574c22e17b5a60f073bf74eb93d56d15d88d6201353324b201b77c1dd5bede6d7cde WHIRLPOOL 4c2c3fd7d0db9ddd177f5895604cedc7c1ba8799db2e64d58484ae0b935d574bf51c7ddeac12f46e56de062a471619fc1ce96ac4f3d4b13b0a2b33060898e730
diff --git a/app-admin/ngxtop/files/ngxtop-0.0.2-py3.patch b/app-admin/ngxtop/files/ngxtop-0.0.2-py3.patch
new file mode 100644
index 000000000000..b86361584798
--- /dev/null
+++ b/app-admin/ngxtop/files/ngxtop-0.0.2-py3.patch
@@ -0,0 +1,45 @@
+diff --git a/ngxtop/config_parser.py b/ngxtop/config_parser.py
+index f6999cf..7c0d79a 100644
+--- a/ngxtop/config_parser.py
++++ b/ngxtop/config_parser.py
+@@ -106,7 +106,7 @@ def detect_log_config(arguments):
+
+ log_formats = dict(get_log_formats(config_str))
+ if len(access_logs) == 1:
+- log_path, format_name = access_logs.items()[0]
++ log_path, format_name = list(access_logs.items())[0]
+ if format_name == 'combined':
+ return log_path, LOG_FORMAT_COMBINED
+ if format_name not in log_formats:
+@@ -115,7 +115,7 @@ def detect_log_config(arguments):
+
+ # multiple access logs configured, offer to select one
+ print('Multiple access logs detected in configuration:')
+- log_path = choose_one(access_logs.keys(), 'Select access log file to process: ')
++ log_path = choose_one(list(access_logs.keys()), 'Select access log file to process: ')
+ format_name = access_logs[log_path]
+ if format_name not in log_formats:
+ error_exit('Incorrect format name set in config for access log file "%s"' % log_path)
+diff --git a/ngxtop/ngxtop.py b/ngxtop/ngxtop.py
+old mode 100755
+new mode 100644
+diff --git a/ngxtop/utils.py b/ngxtop/utils.py
+index ef61072..7bd9a2a 100644
+--- a/ngxtop/utils.py
++++ b/ngxtop/utils.py
+@@ -5,6 +5,8 @@ def choose_one(choices, prompt):
+ for idx, choice in enumerate(choices):
+ print('%d. %s' % (idx + 1, choice))
+ selected = None
++ if sys.version[0] == '3':
++ raw_input = input
+ while not selected or selected <= 0 or selected > len(choices):
+ selected = raw_input(prompt)
+ try:
+@@ -16,4 +18,4 @@ def choose_one(choices, prompt):
+
+ def error_exit(msg, status=1):
+ sys.stderr.write('Error: %s\n' % msg)
+- sys.exit(status)
+\ No newline at end of file
++ sys.exit(status)
diff --git a/app-admin/ngxtop/metadata.xml b/app-admin/ngxtop/metadata.xml
new file mode 100644
index 000000000000..6d5965956f24
--- /dev/null
+++ b/app-admin/ngxtop/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>jlec@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">lebinh/ngxtop</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/app-admin/ngxtop/ngxtop-0.0.2-r1.ebuild b/app-admin/ngxtop/ngxtop-0.0.2-r1.ebuild
new file mode 100644
index 000000000000..520a920b8ad8
--- /dev/null
+++ b/app-admin/ngxtop/ngxtop-0.0.2-r1.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python{2_7,3_3,3_4} )
+PYTHON_REQ_USE="sqlite"
+
+inherit distutils-r1
+
+DESCRIPTION="real-time metrics for nginx server (and others)"
+HOMEPAGE="https://github.com/lebinh/ngxtop"
+SRC_URI="https://github.com/lebinh/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+SLOT="0"
+LICENSE="MIT"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE=""
+
+RDEPEND="
+ dev-python/docopt[${PYTHON_USEDEP}]
+ dev-python/pyparsing[${PYTHON_USEDEP}]
+ dev-python/tabulate[${PYTHON_USEDEP}]"
+DEPEND="${RDEPEND}
+"
+
+PATCHES=( "${FILESDIR}"/${P}-py3.patch )
diff --git a/app-admin/ngxtop/ngxtop-0.0.3_pre141201.ebuild b/app-admin/ngxtop/ngxtop-0.0.3_pre141201.ebuild
new file mode 100644
index 000000000000..f07c499e9591
--- /dev/null
+++ b/app-admin/ngxtop/ngxtop-0.0.3_pre141201.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python{2_7,3_3,3_4} )
+PYTHON_REQ_USE="sqlite"
+
+inherit distutils-r1
+
+DESCRIPTION="real-time metrics for nginx server (and others)"
+HOMEPAGE="https://github.com/lebinh/ngxtop"
+#SRC_URI="https://github.com/lebinh/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+SRC_URI="http://dev.gentoo.org/~jlec/distfiles/${P}.tar.xz"
+
+SLOT="0"
+LICENSE="MIT"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE=""
+
+RDEPEND="
+ dev-python/docopt[${PYTHON_USEDEP}]
+ dev-python/pyparsing[${PYTHON_USEDEP}]
+ dev-python/tabulate[${PYTHON_USEDEP}]"
+DEPEND="${RDEPEND}
+"
+
+PATCHES=( "${FILESDIR}"/${PN}-0.0.2-py3.patch )