media-sound/apetag: python-single-r1, EAPI=6
authorMichał Górny <mgorny@gentoo.org>
Sat, 18 Feb 2017 21:24:07 +0000 (22:24 +0100)
committerMichał Górny <mgorny@gentoo.org>
Sat, 18 Feb 2017 21:32:32 +0000 (22:32 +0100)
media-sound/apetag/apetag-1.12-r1.ebuild [new file with mode: 0644]
media-sound/apetag/apetag-1.12.ebuild [deleted file]

diff --git a/media-sound/apetag/apetag-1.12-r1.ebuild b/media-sound/apetag/apetag-1.12-r1.ebuild
new file mode 100644 (file)
index 0000000..6a35cba
--- /dev/null
@@ -0,0 +1,48 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit python-single-r1 toolchain-funcs
+
+DESCRIPTION="Command-line ape 2.0 tagger"
+HOMEPAGE="http://muth.org/Robert/Apetag/"
+SRC_URI="http://muth.org/Robert/Apetag/${PN}.${PV}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 ~ppc64 x86"
+IUSE=""
+
+S=${WORKDIR}/Apetag
+
+src_prepare() {
+       eapply_user
+       sed -i \
+               -e 's:CXXDEBUG:LDFLAGS:' \
+               Makefile || die
+       python_fix_shebang *.py
+}
+
+src_compile() {
+       tc-export CXX
+       emake \
+               CXXFLAGS="${CXXFLAGS} -Wall -pedantic" \
+               LDFLAGS="${LDFLAGS}"
+}
+
+src_install() {
+       dobin ${PN}
+
+       python_moduleinto /usr/lib/apetag
+       python_domodule *.py
+
+       fperms +x /usr/lib/apetag/{rmid3tag,tagdir}.py
+       dosym ../lib/apetag/rmid3tag.py /usr/bin/rmid3tag.py
+       dosym ../lib/apetag/tagdir.py /usr/bin/tagdir.py
+
+       dodoc 00readme
+}
diff --git a/media-sound/apetag/apetag-1.12.ebuild b/media-sound/apetag/apetag-1.12.ebuild
deleted file mode 100644 (file)
index 97c2acb..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-# Copyright 1999-2010 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=3
-
-PYTHON_DEPEND="2"
-
-inherit python toolchain-funcs
-
-DESCRIPTION="Command-line ape 2.0 tagger"
-HOMEPAGE="http://muth.org/Robert/Apetag/"
-SRC_URI="http://muth.org/Robert/Apetag/${PN}.${PV}.tar.gz"
-
-LICENSE="GPL-3"
-SLOT="0"
-KEYWORDS="amd64 ~ppc64 x86"
-IUSE=""
-
-S=${WORKDIR}/Apetag
-
-pkg_setup() {
-       python_set_active_version 2
-       python_pkg_setup
-}
-
-src_prepare() {
-       sed -i \
-               -e 's:CXXDEBUG:LDFLAGS:' \
-               Makefile || die
-       python_convert_shebangs -r 2 .
-}
-
-src_compile() {
-       tc-export CXX
-       emake \
-               CXXFLAGS="${CXXFLAGS} -Wall -pedantic" \
-               LDFLAGS="${LDFLAGS}" || die
-}
-
-src_install() {
-       dobin ${PN} || die
-
-       local sitedir="$(python_get_sitedir)"/${PN}
-       exeinto ${sitedir}
-       doexe *.py || die
-
-       local x
-       for x in {rmid3tag,tagdir}.py; do
-               ln -s "${sitedir}"/${x} "${D}"/usr/bin/${x} || die
-       done
-
-       dodoc 00readme
-}
-
-pkg_postinst() {
-       python_mod_optimize apetag
-}
-
-pkg_postrm() {
-       python_mod_cleanup apetag
-}