diff -ur http-replicator.orig//http-replicator-3.0-r2.ebuild http-replicator/http-replicator-3.0-r2.ebuild --- http-replicator.orig//http-replicator-3.0-r2.ebuild 2009-06-10 04:30:18.000000000 +0800 +++ http-replicator/http-replicator-3.0-r2.ebuild 2011-11-28 21:54:55.147969699 +0800 @@ -2,7 +2,9 @@ # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/net-proxy/http-replicator/http-replicator-3.0-r2.ebuild,v 1.5 2009/06/09 20:30:18 jer Exp $ -inherit eutils +EAPI=4 +PYTHON_DEPEND="2:2.6:2.7" +inherit eutils python MY_P="${PN}_${PV}" @@ -16,9 +18,13 @@ KEYWORDS="alpha amd64 hppa ppc ~sparc x86" IUSE="" -DEPEND=">=dev-lang/python-2.3" +DEPEND="" RDEPEND="${DEPEND}" +pkge_setup() { + python_set_active_version 2 +} + src_compile() { epatch "${FILESDIR}/http-replicator-3.0-sighup.patch" einfo "No compilation necessary" @@ -47,6 +53,15 @@ insinto /etc/logrotate.d newins debian/logrotate http-replicator + + # Set the shebangs according to the eselected python + if [[ $(python_get_version) == "2.6" ]] || [[ $(python_get_version) == "2.7" ]]; then + python_convert_shebangs $(python_get_version) "${ED}"/usr/bin/http-replicator \ + "${ED}"/usr/bin/repcacheman.py + else + ewarn "The current selected system version of python does not support http-replicator" + python_convert_shebangs -r 2.7 "${ED}" + fi } pkg_postinst() {