commit:     5e63d08530b6fe9701c2c44472ec1a226879c9db
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 10 11:47:37 2019 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun Nov 10 12:05:45 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5e63d085

sys-apps/qcontrol: Bump to EAPI 7

Closes: https://bugs.gentoo.org/697214
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 sys-apps/qcontrol/files/0.4.2-Makefile.patch |  4 +--
 sys-apps/qcontrol/qcontrol-0.4.2-r1.ebuild   | 41 ++++++++++++----------------
 2 files changed, 20 insertions(+), 25 deletions(-)

diff --git a/sys-apps/qcontrol/files/0.4.2-Makefile.patch 
b/sys-apps/qcontrol/files/0.4.2-Makefile.patch
index ad3701c549e..501e8321fc5 100644
--- a/sys-apps/qcontrol/files/0.4.2-Makefile.patch
+++ b/sys-apps/qcontrol/files/0.4.2-Makefile.patch
@@ -1,5 +1,5 @@
---- Makefile.orig      2011-04-02 20:44:05.021252507 +0200
-+++ Makefile   2011-04-02 20:45:21.751248966 +0200
+--- a/Makefile 2011-04-02 20:44:05.021252507 +0200
++++ b/Makefile 2011-04-02 20:45:21.751248966 +0200
 @@ -1,5 +1,4 @@
 -CFLAGS=-Os -Wall -I /usr/include/lua5.1
 -LDFLAGS=-llua5.1 -lpthread

diff --git a/sys-apps/qcontrol/qcontrol-0.4.2-r1.ebuild 
b/sys-apps/qcontrol/qcontrol-0.4.2-r1.ebuild
index f135fd986de..9330b5503f8 100644
--- a/sys-apps/qcontrol/qcontrol-0.4.2-r1.ebuild
+++ b/sys-apps/qcontrol/qcontrol-0.4.2-r1.ebuild
@@ -1,16 +1,16 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=0
+EAPI=7
 
-inherit eutils toolchain-funcs
+inherit toolchain-funcs
 
 DESCRIPTION="Send commands to some microcontrollers, e.g., to change LEDs or 
sound a buzzer"
 HOMEPAGE="http://qnap.nas-central.org/index.php/PIC_Control_Software";
 SRC_URI="mirror://debian/pool/main/q/qcontrol/${P/-/_}.orig.tar.gz
        mirror://debian/pool/main/q/qcontrol/${P/-/_}-6.diff.gz"
 
-LICENSE="GPL-3"
+LICENSE="GPL-3+"
 SLOT="0"
 KEYWORDS="arm"
 IUSE=""
@@ -18,45 +18,40 @@ IUSE=""
 DEPEND=">=dev-lang/lua-5.1"
 RDEPEND="${DEPEND}"
 
-src_unpack () {
-       unpack ${A}
-       cd "${WORKDIR}"
-
-       epatch *.diff
-
-       cd "${S}"
-       epatch debian/patches/*.patch
-
-       epatch "${FILESDIR}"/${PV}-Makefile.patch
+src_prepare() {
+       default
+       eapply "${WORKDIR}"/*.diff
+       eapply debian/patches/*.patch
+       eapply "${FILESDIR}"/${PV}-Makefile.patch
 }
 
 src_compile() {
-       emake CC="$(tc-getCC)" qcontrol || die "emake failed"
+       emake CC="$(tc-getCC)" qcontrol
 }
 
 src_install() {
        dosbin qcontrol
-       doman "${S}"/debian/qcontrol.1
+       doman debian/qcontrol.1
 
        insinto /etc/qcontrol
-       doins "${S}"/debian/configs/*.lua
+       doins debian/configs/*.lua
 
        newconfd "${FILESDIR}"/conf.d qcontrol
        newinitd "${FILESDIR}"/init.d qcontrol
 }
 
-pkg_postinst() {
+pkg_preinst() {
        device=$(grep "Hardware[[:space:]]*:" /proc/cpuinfo 2>/dev/null | \
                head -n1 | sed "s/^[^:]*: //")
-       case $device in
+       case ${device} in
                "QNAP TS-109/TS-209")
-               dosym /etc/qcontrol/ts209.lua /etc/qcontrol.conf ;;
+               dosym qcontrol/ts209.lua /etc/qcontrol.conf ;;
                "QNAP TS-119/TS-219")
-               dosym /etc/qcontrol/ts219.lua /etc/qcontrol.conf ;;
+               dosym qcontrol/ts219.lua /etc/qcontrol.conf ;;
                "QNAP TS-409")
-               dosym /etc/qcontrol/ts409.lua /etc/qcontrol.conf ;;
+               dosym qcontrol/ts409.lua /etc/qcontrol.conf ;;
                "QNAP TS-41x")
-               dosym /etc/qcontrol/ts41x.lua /etc/qcontrol.conf ;;
+               dosym qcontrol/ts41x.lua /etc/qcontrol.conf ;;
                *)
                ewarn "Your device is unsupported" ;;
        esac

Reply via email to