aboutsummaryrefslogtreecommitdiffstats
path: root/main/linux-firmware
diff options
context:
space:
mode:
authorOliver Smith <ollieparanoid@bitmessage.ch>2018-01-09 15:40:42 +0000
committerWilliam Pitcock <nenolod@dereferenced.org>2018-01-10 07:44:08 +0000
commit0f1c436cdbc63bb1f0050f9b89514120726caa92 (patch)
tree891d50b5a487f07db33fb57a9485caabf744fb0c /main/linux-firmware
parent3fbd5e9a3024e4de9afa289ac4b5638db01cbd3d (diff)
downloadaports-0f1c436cdbc63bb1f0050f9b89514120726caa92.tar.bz2
aports-0f1c436cdbc63bb1f0050f9b89514120726caa92.tar.xz
main/linux-firmware: lowercase subpackages / use local
* Always use lowercase subpackage names (no more linux-firmware-RTL8192E) * Use `local` for local variables
Diffstat (limited to 'main/linux-firmware')
-rw-r--r--main/linux-firmware/APKBUILD30
1 files changed, 17 insertions, 13 deletions
diff --git a/main/linux-firmware/APKBUILD b/main/linux-firmware/APKBUILD
index 83f2857593..5c8644cc9d 100644
--- a/main/linux-firmware/APKBUILD
+++ b/main/linux-firmware/APKBUILD
@@ -25,12 +25,12 @@ _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
+_folders="3com 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 rtl8192e 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"
@@ -66,25 +66,29 @@ package() {
}
folder() {
- _folder=${subpkgname##linux-firmware-}
+ local folder=${subpkgname##linux-firmware-}
pkgdesc="firmware files for linux ($_folder folder)"
depends=""
+ # Move /lib/firmware/$folder (case insensitive)
mkdir -p "$subpkgdir/lib/firmware"
- mv "$pkgdir/lib/firmware/$_folder" "$subpkgdir/lib/firmware"
+ mv "$(find "$pkgdir/lib/firmware" -iname "$folder" -type d)" \
+ "$subpkgdir/lib/firmware"
}
other() {
# Requires subfolders to be split in subpackages
- _leftover=""
+ local leftover=""
+ local i
for i in "$pkgdir"/lib/firmware/*; do
- [ -d "$i" ] && _leftover="$_leftover $(basename $i)"
+ [ -d "$i" ] && leftover="$leftover $(basename $i)"
done
- if [ "$_leftover" != "" ]; then
+ if [ "$leftover" != "" ]; then
+ local fixed
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
+ fixed="$(echo $_folders$leftover | tr " " "\n" | tr '[A-Z]' '[a-z]' | sort)"
+ echo "_folders=\"$(printf "$fixed" | tr "\n" " ")\"" | fold -s
return 1
fi