aboutsummaryrefslogtreecommitdiffstats
path: root/main/linux-firmware
diff options
context:
space:
mode:
authorOliver Smith <ollieparanoid@bitmessage.ch>2018-01-08 16:40:21 +0000
committerWilliam Pitcock <nenolod@dereferenced.org>2018-01-08 22:33:22 +0000
commit133ebbcf836126748f910e9225050545bda77875 (patch)
treec8579000a3e7343b8110c0fcb2d55be9e56e3dfa /main/linux-firmware
parent9a7e1a495186614a8c917a569896128ddbb8fb6c (diff)
downloadaports-133ebbcf836126748f910e9225050545bda77875.tar.bz2
aports-133ebbcf836126748f910e9225050545bda77875.tar.xz
main/linux-firmware: split up in subpackages
As discussed in <https://lists.alpinelinux.org/alpine-devel/6005.html>
Diffstat (limited to 'main/linux-firmware')
-rw-r--r--main/linux-firmware/APKBUILD58
1 files changed, 47 insertions, 11 deletions
diff --git a/main/linux-firmware/APKBUILD b/main/linux-firmware/APKBUILD
index 7be428e7bf..cee5d63b37 100644
--- a/main/linux-firmware/APKBUILD
+++ b/main/linux-firmware/APKBUILD
@@ -1,17 +1,16 @@
# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Contributor: Oliver Smith <ollieparanoid@bitmessage.ch>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=linux-firmware
pkgver=20171227
-pkgrel=0
+pkgrel=1
pkgdesc="firmware files for linux"
#url="http://git.kernel.org/?p=linux/kernel/git/dwmw2/linux-firmware.git;a=summary"
url="http://git.kernel.org/?p=linux/kernel/git/firmware/linux-firmware.git;a=summary"
arch="all"
license="custom:multiple"
-depends=
makedepends=
install=""
-subpackages=
replaces="linux-grsec linux-vserver"
options="!strip !check"
source="http://dev.alpinelinux.org/archive/$pkgname/$pkgname-${pkgver}.tar.gz
@@ -25,6 +24,22 @@ _upload=dev.alpinelinux.org:/archive/$pkgname/
_builddir="$srcdir"/$pkgname-$pkgver
+# Put /lib/firmware/* folders in subpackages
+_folders="3com RTL8192E acenic adaptec advansys amd-ucode amdgpu ar3k ath10k
+ ath6k ath9k_htc atmel atusb av7110 bnx2 bnx2x brcm carl9170fw cavium cis cpia2
+ cxgb3 cxgb4 dabusb dsp56k e100 edgeport emi26 emi62 ene-ub6250 ess go7007 i915
+ imx intel isci kaweth keyspan keyspan_pda korg libertas liquidio matrox
+ mellanox moxa mrvl mwl8k mwlwifi myricom netronome nvidia ositech qca qcom qed
+ qlogic r128 radeon rockchip rsi rtl_bt rtl_nic rtlwifi sb16 slicoss sun sxg
+ tehuti ti-connectivity ti-keystone tigon ttusb-budget ueagle-atm vicam vxge yam
+ yamaha"
+subpackages="$pkgname-other"
+depends="linux-firmware-other"
+for i in $_folders; do
+ subpackages="$pkgname-$i:folder $subpackages"
+ depends="$pkgname-$i $depends"
+done
+
snapshot() {
local _date=$(date +%Y%m%d)
local _pkg=$pkgname-$_date.tar.gz
@@ -41,14 +56,6 @@ snapshot() {
fi
}
-prepare() {
- return 0
-}
-
-build() {
- return 0
-}
-
package() {
cd "${_builddir}"
make DESTDIR="${pkgdir}" FIRMWAREDIR="/lib/firmware" install
@@ -58,6 +65,35 @@ package() {
rm -f "${pkgdir}/usr/lib/firmware/{Makefile,README,configure,GPL-3}"
}
+folder() {
+ _folder=${subpkgname##linux-firmware-}
+ pkgdesc="firmware files for linux ($_folder folder)"
+ depends=""
+
+ mkdir -p "$subpkgdir/lib/firmware"
+ mv "$pkgdir/lib/firmware/$_folder" "$subpkgdir/lib/firmware"
+}
+
+other() {
+ # Requires subfolders to be split in subpackages
+ _leftover=""
+ for i in "$pkgdir"/lib/firmware/*; do
+ [ -d "$i" ] && _leftover="$_leftover $(basename $i)"
+ done
+ if [ "$_leftover" != "" ]; then
+ error "Not all subfolders have been moved to subpackages!"
+ error "Fix this by adjusting _folders as follows:"
+ _fixed="$(echo $_folders$_leftover | tr " " "\n" | sort)"
+ echo "_folders=\"$(printf "$_fixed" | tr "\n" " ")\"" | fold -s
+ return 1
+ fi
+
+ # Move /lib/firmware (which doesn't have subfolders now)
+ pkgdesc="firmware files for linux (uncategorized)"
+ depends=""
+ mv "$pkgdir"/lib "$subpkgdir"/
+}
+
sha512sums="749201c9bb9ea620789f8871d4d52ef5f617b34d59a9db39334edb8fbc86a79d78aa496209d0afc732b64bace78d1a71217b5ec22c9dc3f94c12a80f6acba702 linux-firmware-20171227.tar.gz
bd6417ada7dbb940e75f43d85d9778f362f6c2801b27b4e13043eebfb5f38da4e728bdfe7240304d0ad172ba8ac1a3eff4df40119317093ea19ae23333819024 brcmfmac43430-sdio.txt
6751470a48e0225731d91ab33464eaeac86da3e10dcf63a85ae0aeea6fa114ab01567fda08604e500c54bb14d38578f6c0b135c7772597d07b5ebda1e662b935 brcmfmac43430-sdio.bin