iwl3160-ucode-0.10.11.23.ebuild 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit linux-info versionator
  5. DEV_N="${PN:3:4}"
  6. vc=($(get_all_version_components "${PV}"))
  7. MY_PV="${vc[6]}.${vc[4]}.${vc[2]}.${vc[0]}"
  8. MY_PN="iwlwifi-${DEV_N}-ucode"
  9. DV_MAJOR="3"
  10. DV_MINOR="17"
  11. DV_PATCH="0"
  12. DESCRIPTION="Firmware for Intel (R) Dual Band Wireless-AC ${DEV_N}"
  13. HOMEPAGE="https://wireless.kernel.org/en/users/Drivers/iwlwifi"
  14. SRC_URI="https://wireless.kernel.org/en/users/Drivers/iwlwifi?action=AttachFile&do=get&target=${MY_PN}-${MY_PV}.tgz -> ${P}.tgz"
  15. LICENSE="ipw3945"
  16. SLOT="${vc[2]}"
  17. KEYWORDS="~amd64 ~x86"
  18. IUSE="bluetooth"
  19. DEPEND=""
  20. RDEPEND="bluetooth? ( sys-firmware/iwl3160-7260-bt-ucode )
  21. !sys-kernel/linux-firmware[-savedconfig]"
  22. S="${WORKDIR}/${MY_PN}-${MY_PV}"
  23. CONFIG_CHECK="~IWLMVM"
  24. ERROR_IWLMVM="CONFIG_IWLMVM is required to be enabled in /usr/src/linux/.config for the kernel to be able to load the ${DEV_N} firmware"
  25. pkg_pretend() {
  26. if kernel_is lt "${DV_MAJOR}" "${DV_MINOR}" "${DV_PATCH}"; then
  27. ewarn "Your kernel version is ${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}."
  28. ewarn "This microcode image requires a kernel >= ${DV_MAJOR}.${DV_MINOR}.${DV_PATCH}."
  29. ewarn "For kernel versions < ${DV_MAJOR}.${DV_MINOR}.${DV_PATCH}, you may install older SLOTS"
  30. fi
  31. }
  32. src_install() {
  33. insinto /lib/firmware
  34. doins "${S}/iwlwifi-${DEV_N}-${vc[2]}.ucode"
  35. dodoc README*
  36. }