# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils # AVM doesn't release versioned archives for their firmware! # So this ebuild has a 'config' section for easy download # current firmware files and package them into $DISTDIR # for easy upload to gentoo mirrors. # Instructions for version bumping: # # 1. check $HOMEPAGE for latest version # 2. copy old ebuild to new one with new version # 3. run "ebuild config" to download firmware # 4. run "ebuild digest" to create the digest # 5. check if the ebuild works properly # # And if you're a maintainer: # # 6. upload the created "${P}.tar.bz2" to gentoo mirrors # 7. release ebuild AVM_CARD="${PN##*-}" AVM_VER="${PV//./-}" AVM_CUT_DIRS=2 # cut "pub/capi4linux" out of path (see $HOMEPAGE) DESCRIPTION="Firmware for the AVM C4 card" HOMEPAGE="ftp://ftp.in-berlin.de/pub/capi4linux/firmware/" SRC_URI="mirror://gentoo/${P}.tar.bz2" LICENSE="as-is" SLOT="0" KEYWORDS="~x86 ~amd64 ~ppc" # same as 'capi4k-utils' IUSE="" DEPEND="" RDEPEND="net-dialup/capi4k-utils" S="${WORKDIR}/firmware/${AVM_CARD}/${AVM_VER}" src_compile() { return # nothing to do } src_install() { insinto /lib/firmware insopts -m 0644 doins * } pkg_config() { local FILE="${DISTDIR}/${P}.tar.bz2" if [ -f "$FILE" ] then ewarn "WARNING: ${FILE} already exists!" return fi local DIR="$(mktemp -d)" local URL="${HOMEPAGE}${AVM_CARD}/${AVM_VER}" umask 022 cd "${DIR}" einfo "Downloading ${URL}" if wget -N -nv -nH -x --cut-dirs=${AVM_CUT_DIRS} -o /dev/stdout "${URL}/*" then einfo "Creating ${FILE}" chmod 644 "firmware/${AVM_CARD}/${AVM_VER}"/* tar cjvf "${DISTDIR}/${P}.tar.bz2" "firmware/${AVM_CARD}/${AVM_VER}"/* | while read LINE; do einfo "$LINE"; done else eerror "ERROR: Could not download firmware files!" fi rm -rf "${DIR}" }