aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGöktürk Yüksek <gokturk@gentoo.org>2016-12-11 21:34:23 -0500
committerGöktürk Yüksek <gokturk@gentoo.org>2016-12-11 21:35:52 -0500
commitb1a3e81ecba3f2d397c455b2f4f9953b9cc13064 (patch)
tree8e2c11d9db68865d8758b8cb28a8c4b7dc510e53
parentclose HTTPConnection in finally block (diff)
downloadgentoostats-b1a3e81ecba3f2d397c455b2f4f9953b9cc13064.tar.gz
gentoostats-b1a3e81ecba3f2d397c455b2f4f9953b9cc13064.tar.bz2
gentoostats-b1a3e81ecba3f2d397c455b2f4f9953b9cc13064.zip
app-portage/gentoostats: major improvements
- EAPI bump to 6 - Upgrade to git-r3 and distutils-r1 - Update HOMEPAGE - Update the repo URI - Update dependencies - switch from src_* to python_* - Install extra docs Package-Manager: portage-2.3.0 RepoMan-Options: --force
-rw-r--r--overlay/app-portage/gentoostats/Manifest2
-rw-r--r--overlay/app-portage/gentoostats/gentoostats-9999.ebuild56
2 files changed, 32 insertions, 26 deletions
diff --git a/overlay/app-portage/gentoostats/Manifest b/overlay/app-portage/gentoostats/Manifest
index 5c6ce28..22f9336 100644
--- a/overlay/app-portage/gentoostats/Manifest
+++ b/overlay/app-portage/gentoostats/Manifest
@@ -1 +1 @@
-EBUILD gentoostats-9999.ebuild 1744 RMD160 c5f02ce5c22058e8acfc86fa21174a1cdd4a4b14 SHA1 9336e063ab5ac5af441e228005f0474871913199 SHA256 3fa8909182cd56c05670e340a3ab7a5a2f5b55919cd6f341cac3d3ec5dfa23fe
+EBUILD gentoostats-9999.ebuild 1980 SHA256 795589bf865fc95a3352a93b7efb2118516e4592ae41c1cdd25574d1d1416205 SHA512 c9be012eb95fa08d42cf81114a8e2f5a105728c3d65727f1cdfef7743ff943935d4d6d665d2700994c0b82e7457752ec9b06a80b320afe93fa5f749402e0eea8 WHIRLPOOL 7efa48f940a05c66e5e559260a643f36b06637fa35c5c218edcdaf7fcc3a50857d0507f9a26aa47297e2646808a8882668208c15e01db9cc579321a9b0664104
diff --git a/overlay/app-portage/gentoostats/gentoostats-9999.ebuild b/overlay/app-portage/gentoostats/gentoostats-9999.ebuild
index 8a7b064..c863b94 100644
--- a/overlay/app-portage/gentoostats/gentoostats-9999.ebuild
+++ b/overlay/app-portage/gentoostats/gentoostats-9999.ebuild
@@ -1,45 +1,52 @@
-# Copyright 1999-2011 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: $
+# $Id$
-EAPI=3
+EAPI=6
-inherit distutils python git-2
+PYTHON_COMPAT=( python2_7 )
+
+inherit git-r3 distutils-r1
DESCRIPTION="Package statistics client"
-HOMEPAGE="http://soc.dev.gentoo.org/gentoostats"
+HOMEPAGE="https://wiki.gentoo.org/wiki/Gentoostats"
SRC_URI=""
-EGIT_REPO_URI="git://git.overlays.gentoo.org/proj/gentoostats.git"
+EGIT_REPO_URI="git://anongit.gentoo.org/proj/gentoostats.git"
LICENSE="GPL-3"
SLOT="0"
KEYWORDS=""
IUSE=""
-DEPEND=""
-RDEPEND="${DEPEND}
- sys-apps/portage
- >=app-portage/gentoolkit-0.3.0.2
- dev-python/argparse
- dev-python/simplejson"
+RDEPEND="
+ sys-apps/portage[${PYTHON_USEDEP}]
+ >=app-portage/gentoolkit-0.3.0.2[${PYTHON_USEDEP}]
+ dev-python/simplejson[${PYTHON_USEDEP}]"
+DEPEND="${RDEPEND}
+ dev-python/setuptools[${PYTHON_USEDEP}]"
-src_compile() {
- pushd "client"
- distutils_src_compile
+python_compile() {
+ cd "${S}"/client || die
+ distutils-r1_python_compile
}
-src_install() {
- pushd "client"
- distutils_src_install
+python_install() {
+ cd "${S}"/client || die
+ distutils-r1_python_install
+}
- dodir /etc/gentoostats || die
+python_install_all() {
insinto /etc/gentoostats
- doins payload.cfg || die
+ doins client/payload.cfg
# this doesn't work, why ?
- fowners root:portage /etc/gentoostats/payload.cfg || die
- fperms 0640 /etc/gentoostats/payload.cfg || die
+ fowners root:portage /etc/gentoostats/payload.cfg
+ fperms 0640 /etc/gentoostats/payload.cfg
+
+ dodoc docs/client.txt
+
+ distutils-r1_python_install_all
}
generate_uuid() {
@@ -56,11 +63,10 @@ generate_uuid() {
}
pkg_postinst() {
- distutils_pkg_postinst
-
AUTHFILE="${ROOT}/etc/gentoostats/auth.cfg"
- if ! [ -f "${AUTHFILE}" ]; then
+ if ! [[ -f "${AUTHFILE}" ]]; then
elog "Generating uuid and password in ${AUTHFILE}"
+ mkdir -p "$(dirname ${AUTHFILE})"
touch "${AUTHFILE}"
echo "[AUTH]" >> "${AUTHFILE}"
echo -n "UUID : " >> "${AUTHFILE}"