| 1 |
# Copyright 1999-2012 Gentoo Foundation
|
| 2 |
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
# $Header: /var/cvsroot/gentoo-x86/sys-kernel/linux-firmware/linux-firmware-20120502.ebuild,v 1.8 2012/08/18 20:15:52 ulm Exp $
|
| 4 |
|
| 5 |
EAPI=4
|
| 6 |
inherit savedconfig
|
| 7 |
|
| 8 |
if [[ ${PV} == 99999999* ]]; then
|
| 9 |
inherit git-2
|
| 10 |
SRC_URI=""
|
| 11 |
EGIT_REPO_URI="git://git.kernel.org/pub/scm/linux/kernel/git/firmware/${PN}.git"
|
| 12 |
else
|
| 13 |
SRC_URI="mirror://gentoo/${P}.tar.xz"
|
| 14 |
fi
|
| 15 |
|
| 16 |
DESCRIPTION="Linux firmware files"
|
| 17 |
HOMEPAGE="http://git.kernel.org/?p=linux/kernel/git/firmware/linux-firmware.git"
|
| 18 |
|
| 19 |
LICENSE="GPL-1 GPL-2 GPL-3 BSD freedist"
|
| 20 |
KEYWORDS="amd64 arm ~ia64 x86"
|
| 21 |
SLOT="0"
|
| 22 |
IUSE="savedconfig"
|
| 23 |
|
| 24 |
DEPEND=""
|
| 25 |
RDEPEND="!savedconfig? (
|
| 26 |
!media-sound/alsa-firmware[alsa_cards_korg1212]
|
| 27 |
!media-sound/alsa-firmware[alsa_cards_maestro3]
|
| 28 |
!media-sound/alsa-firmware[alsa_cards_sb16]
|
| 29 |
!media-sound/alsa-firmware[alsa_cards_ymfpci]
|
| 30 |
!media-tv/cx18-firmware
|
| 31 |
!media-tv/ivtv-firmware
|
| 32 |
!media-tv/linuxtv-dvb-firmware[dvb_cards_cx231xx]
|
| 33 |
!media-tv/linuxtv-dvb-firmware[dvb_cards_cx23885]
|
| 34 |
!media-tv/linuxtv-dvb-firmware[dvb_cards_usb-dib0700]
|
| 35 |
!net-dialup/ueagle-atm
|
| 36 |
!net-dialup/ueagle4-atm
|
| 37 |
!net-wireless/ar9271-firmware
|
| 38 |
!net-wireless/i2400m-fw
|
| 39 |
!net-wireless/libertas-firmware
|
| 40 |
!net-wireless/rt61-firmware
|
| 41 |
!net-wireless/rt73-firmware
|
| 42 |
!net-wireless/rt2860-firmware
|
| 43 |
!net-wireless/rt2870-firmware
|
| 44 |
!sys-block/qla-fc-firmware
|
| 45 |
!sys-firmware/iwl1000-ucode
|
| 46 |
!sys-firmware/iwl2030-ucode
|
| 47 |
!sys-firmware/iwl3945-ucode
|
| 48 |
!sys-firmware/iwl4965-ucode
|
| 49 |
!sys-firmware/iwl5000-ucode
|
| 50 |
!sys-firmware/iwl5150-ucode
|
| 51 |
!sys-firmware/iwl6000-ucode
|
| 52 |
!sys-firmware/iwl6005-ucode
|
| 53 |
!sys-firmware/iwl6030-ucode
|
| 54 |
!sys-firmware/iwl6050-ucode
|
| 55 |
!x11-drivers/radeon-ucode
|
| 56 |
)"
|
| 57 |
#add anything else that collides to this
|
| 58 |
|
| 59 |
src_unpack() {
|
| 60 |
if [[ ${PV} == 99999999* ]]; then
|
| 61 |
git-2_src_unpack
|
| 62 |
else
|
| 63 |
default
|
| 64 |
# rename directory from git snapshot tarball
|
| 65 |
mv ${PN}-*/ ${P} || die
|
| 66 |
fi
|
| 67 |
}
|
| 68 |
|
| 69 |
src_prepare() {
|
| 70 |
echo "# Remove files that shall not be installed from this list." > ${PN}.conf
|
| 71 |
find * \( \! -type d -and \! -name ${PN}.conf \) >> ${PN}.conf
|
| 72 |
|
| 73 |
if use savedconfig; then
|
| 74 |
restore_config ${PN}.conf
|
| 75 |
ebegin "Removing all files not listed in config"
|
| 76 |
find * \( \! -type d -and \! -name ${PN}.conf \) \
|
| 77 |
| sort ${PN}.conf ${PN}.conf - \
|
| 78 |
| uniq -u | xargs -r rm
|
| 79 |
eend $? || die
|
| 80 |
# remove empty directories, bug #396073
|
| 81 |
find -type d -empty -delete || die
|
| 82 |
fi
|
| 83 |
}
|
| 84 |
|
| 85 |
src_install() {
|
| 86 |
save_config ${PN}.conf
|
| 87 |
rm ${PN}.conf || die
|
| 88 |
insinto /lib/firmware/
|
| 89 |
doins -r *
|
| 90 |
}
|
| 91 |
|
| 92 |
pkg_preinst() {
|
| 93 |
if use savedconfig; then
|
| 94 |
ewarn "USE=savedconfig is active. You must handle file collisions manually."
|
| 95 |
fi
|
| 96 |
}
|
| 97 |
|
| 98 |
pkg_postinst() {
|
| 99 |
elog "If you are only interested in particular firmware files, edit the saved"
|
| 100 |
elog "configfile and remove those that you do not want."
|
| 101 |
}
|