net-mail/archivemail: distutils-r1, EAPI=6
authorMichał Górny <mgorny@gentoo.org>
Fri, 17 Feb 2017 16:45:24 +0000 (17:45 +0100)
committerMichał Górny <mgorny@gentoo.org>
Fri, 17 Feb 2017 16:57:06 +0000 (17:57 +0100)
net-mail/archivemail/archivemail-0.9.0-r1.ebuild [new file with mode: 0644]
net-mail/archivemail/archivemail-0.9.0.ebuild [deleted file]

diff --git a/net-mail/archivemail/archivemail-0.9.0-r1.ebuild b/net-mail/archivemail/archivemail-0.9.0-r1.ebuild
new file mode 100644 (file)
index 0000000..f366ee8
--- /dev/null
@@ -0,0 +1,41 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+PYTHON_COMPAT=( python2_7 )
+
+inherit distutils-r1
+
+DESCRIPTION="Tool written archiving old email in mailboxes"
+HOMEPAGE="http://archivemail.sourceforge.net/"
+SRC_URI="mirror://sourceforge/archivemail/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 sparc x86"
+IUSE=""
+
+python_prepare_all() {
+       # Fix tests for python-2.7
+       sed -i -e 's:\(fp_archive = \)FixedGzipFile:\1gzip.GzipFile:' \
+               test_archivemail || die "sed failed"
+
+       distutils-r1_python_prepare_all
+}
+
+python_test() {
+       "${S}"/test_archivemail || die "test_archivemail failed"
+}
+
+python_install() {
+       distutils-r1_python_install --install-data=/usr/share
+}
+
+python_install_all() {
+       distutils-r1_python_install_all
+       dodoc examples/* FAQ
+
+       mv "${D}/usr/share/share/man" "${D}/usr/share/" || die
+       rm -rf "${D}/usr/share/share" || die
+}
diff --git a/net-mail/archivemail/archivemail-0.9.0.ebuild b/net-mail/archivemail/archivemail-0.9.0.ebuild
deleted file mode 100644 (file)
index 65396a6..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI="3"
-PYTHON_DEPEND="2"
-
-inherit distutils
-
-DESCRIPTION="Tool written in Python for archiving and compressing old email in mailboxes"
-HOMEPAGE="http://archivemail.sourceforge.net/"
-SRC_URI="mirror://sourceforge/archivemail/${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="amd64 sparc x86"
-IUSE=""
-
-DOCS="examples/* FAQ"
-
-pkg_setup() {
-       python_set_active_version 2
-       python_pkg_setup
-}
-
-src_prepare() {
-       distutils_src_prepare
-       # Fix tests for python-2.7
-       sed -i -e 's:\(fp_archive = \)FixedGzipFile:\1gzip.GzipFile:' \
-               test_archivemail || die "sed failed"
-}
-
-src_test() {
-       echo ">>> Test phase: ${CATEGORY}/${PF}"
-       "${S}"/test_archivemail || die "test_archivemail failed"
-}
-
-src_install() {
-       distutils_src_install --install-data=/usr/share
-       mv "${D}/usr/share/share/man" "${D}/usr/share/" && \
-               rm -rf "${D}/usr/share/share" || die
-}