Skip to content

Commit

Permalink
net-dialup/ueagle4-atm: update ebuild - new EAPI, replace deprecated …
Browse files Browse the repository at this point in the history
…built_with_use with has_version

Package-Manager: Portage-2.3.5, Repoman-2.3.1
  • Loading branch information
Pinkbyte committed Apr 14, 2017
1 parent ce6f9c2 commit 7a1e2c4
Showing 1 changed file with 6 additions and 24 deletions.
30 changes: 6 additions & 24 deletions net-dialup/ueagle4-atm/ueagle4-atm-1.0.ebuild
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright 1999-2012 Gentoo Foundation
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI="2"
EAPI=6

inherit eutils linux-info

Expand All @@ -12,38 +12,20 @@ SRC_URI="http://eagle-usb.org/ueagle-atm/non-free/ueagle4-data-${PV}.tar.gz"
LICENSE="Ikanos"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""

DEPEND=""
RDEPEND="net-dialup/ppp
!sys-kernel/linux-firmware"

S="${WORKDIR}/ueagle4-data-${PV}"

pkg_setup() {
linux-info_pkg_setup

if kernel_is lt 2 6 16 ; then
eerror "The kernel-space driver exists only in kernels >= 2.6.16."
eerror "Please emerge net-dialup/eagle-usb instead or upgrade the kernel."
die "Unsupported kernel version"
fi

if ! has_version '>=sys-apps/baselayout-1.12.0' ; then
ewarn "The best way of using this driver is through the PPP net module of the"
ewarn " >=sys-apps/baselayout-1.12.0"
ewarn "which is also the only documented mode of using ${PN} driver."
ewarn "Please install baselayout-1.12.0 or else you will be on your own!"
fi
}

src_install() {
# Copy to the firmware directory
insinto /lib/firmware/ueagle-atm
doins * || die "doins firmware failed"
doins *

# Documentation necessary to complete the setup
dodoc "${FILESDIR}/README" || die "dodoc failed"
dodoc "${FILESDIR}/README"
}

pkg_postinst() {
Expand All @@ -57,13 +39,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
Expand Down

0 comments on commit 7a1e2c4

Please sign in to comment.