From f4cc5018fb6d589921ea4a72e3d903c1cf070bb3 Mon Sep 17 00:00:00 2001 From: Sergey Popov Date: Fri, 14 Apr 2017 13:59:58 +0300 Subject: net-dialup/speedtouch-usb: update ebuild - new EAPI, replace deprecated built_with_use with has_version Package-Manager: Portage-2.3.5, Repoman-2.3.1 --- .../speedtouch-usb-3.0.1.2-r3.ebuild | 28 ++++++++-------------- 1 file changed, 10 insertions(+), 18 deletions(-) diff --git a/net-dialup/speedtouch-usb/speedtouch-usb-3.0.1.2-r3.ebuild b/net-dialup/speedtouch-usb/speedtouch-usb-3.0.1.2-r3.ebuild index 9a948fa17260..4cbf0542da62 100644 --- a/net-dialup/speedtouch-usb/speedtouch-usb-3.0.1.2-r3.ebuild +++ b/net-dialup/speedtouch-usb/speedtouch-usb-3.0.1.2-r3.ebuild @@ -1,9 +1,11 @@ -# Copyright 1999-2013 Gentoo Foundation +# Copyright 1999-2017 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 +EAPI=6 + inherit eutils linux-info -DESCRIPTION="Firmware, kernel driver and configuration instructions for Alcatel SpeedTouch USB modems" +DESCRIPTION="Firmware and configuration instructions for Alcatel SpeedTouch USB modems" HOMEPAGE="http://www.speedtouch.com/" SRC_URI="http://www.speedtouch.com/download/drivers/USB/SpeedTouch330_firmware_${PV//./}.zip" @@ -11,23 +13,12 @@ SRC_URI="http://www.speedtouch.com/download/drivers/USB/SpeedTouch330_firmware_$ LICENSE="SpeedTouch-USB-Firmware" SLOT="0" KEYWORDS="~amd64 x86" -IUSE="" RDEPEND="net-dialup/ppp" DEPEND="app-arch/unzip" S="${WORKDIR}" -pkg_setup() { - linux-info_pkg_setup - - if kernel_is lt 2 6 10 ; then - eerror "The kernel-space driver exists only in kernels >= 2.6.10." - eerror "Please upgrade the kernel." - die "Unsupported kernel version" - fi -} - src_install() { local FILE_VER="${PV#*.}" FILE_VER="${PV%%.*}.${FILE_VER//./}" # {major_ver}.{minor_digits} @@ -53,10 +44,10 @@ src_install() { # Copy to the firmware directory insinto /lib/firmware insopts -m 600 - doins speedtch-{1,2}.bin.{2,4} || die "doins firmware failed" + doins speedtch-{1,2}.bin.{2,4} # Symlinks for other revisions of the modem - cd "${D}/lib/firmware" + pushd "${D}/lib/firmware" >/dev/null || die for n in 1 2 ; do for rev in 0 1 ; do ln -sfn speedtch-${n}.bin.2 speedtch-${n}.bin.${rev} @@ -64,9 +55,10 @@ src_install() { # Seems like a reasonable guess, for revision 3 ln -sfn speedtch-${stub}${n}.bin.4 speedtch-${n}.bin.3 done + popd >/dev/null || die # Documentation necessary to complete the setup - dodoc "${FILESDIR}/README" || die "dodoc failed" + dodoc "${FILESDIR}/README" } pkg_postinst() { @@ -83,13 +75,13 @@ pkg_postinst() { echo # Check user-space for PPPoA support - if ! built_with_use net-dialup/ppp atm ; then + if ! has_version net-dialup/ppp[atm] ; then ewarn "Run the following command if connecting via PPPoA protocol:" ewarn " euse -E atm && emerge net-dialup/ppp" echo fi # Check user-space for PPPoE support - if ! has_version >=net-dialup/linux-atm-2.5.0 ; then + if ! has_version net-dialup/linux-atm ; then ewarn "Run the following command if connecting via PPPoE protocol:" ewarn " emerge net-dialup/linux-atm" echo -- cgit v1.2.3-65-gdbad