diff options
author | Devaev Maxim <[email protected]> | 2019-09-28 05:22:45 +0300 |
---|---|---|
committer | Devaev Maxim <[email protected]> | 2019-09-28 05:41:31 +0300 |
commit | ebe1255921742fa0ed93c7f8eff7ddc7437025be (patch) | |
tree | 3dcdb2c75ad19b42ea279b03e64abcd8bc87f267 /PKGBUILD | |
parent | c16e4c953ca197951c77a1cbab14e435d282c72b (diff) |
v2 configs
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 63 |
1 files changed, 33 insertions, 30 deletions
@@ -2,15 +2,19 @@ # Author: Maxim Devaev <[email protected]> -[ -n "$PIKVM_PLATFORM" ] || PIKVM_PLATFORM="v0-vga v0-hdmi v1-vga v1-hdmi" -[ -n "$PIKVM_BOARD" ] || PIKVM_BOARD="rpi2 rpi3" +_variants=(v2-hdmi-rpi4) +for _platform in v0-vga v0-hdmi v1-vga v1-hdmi; do + for _board in rpi2 rpi3; do + _variants+=($_platform:$_board) + done +done pkgname=(kvmd) -for _platform in $PIKVM_PLATFORM; do - for _board in $PIKVM_BOARD; do - pkgname+=(kvmd-platform-$_platform-$_board) - done +for _variant in "${_variants[@]}"; do + _platform=${_variant%:*} + _board=${_variant#*:} + pkgname+=(kvmd-platform-$_platform-$_board) done pkgbase=kvmd pkgver=1.11 @@ -97,28 +101,27 @@ package_kvmd() { done } - -for _platform in $PIKVM_PLATFORM; do - for _board in $PIKVM_BOARD; do - eval "package_kvmd-platform-$_platform-$_board() { - pkgdesc=\"Pi-KVM platform configs - $_platform for $_board\" - depends=(kvmd) - if [[ $_platform =~ ^.*-hdmi$ ]]; then - depends=(\"\${depends[@]}\" \"tc358743-dkms>=0.3\") - fi - - mkdir -p \"\$pkgdir/etc\"/{kvmd,sysctl.d,udev/rules.d,modules-load.d} - - local _cfg_default=\"/usr/share/kvmd/configs.default\" - - ln -sf \"\$_cfg_default/os/sysctl.conf\" \"\$pkgdir/etc/sysctl.d/99-kvmd.conf\" - ln -sf \"\$_cfg_default/os/udev/$_platform-$_board.rules\" \"\$pkgdir/etc/udev/rules.d/99-kvmd.rules\" - ln -sf \"\$_cfg_default/os/modules-load/$_platform.conf\" \"\$pkgdir/etc/modules-load.d/kvmd.conf\" - - ln -sf \"\$_cfg_default/kvmd/main/$_platform.yaml\" \"\$pkgdir/etc/kvmd/main.yaml\" - if [[ $_platform =~ ^.*-hdmi$ ]]; then - ln -sf \"\$_cfg_default/kvmd/tc358743-edid.hex\" \"\$pkgdir/etc/kvmd/tc358743-edid.hex\" - fi - }" - done +for _variant in "${_variants[@]}"; do + _platform=${_variant%:*} + _board=${_variant#*:} + eval "package_kvmd-platform-$_platform-$_board() { + pkgdesc=\"Pi-KVM platform configs - $_platform for $_board\" + depends=(kvmd) + if [[ $_platform =~ ^.*-hdmi$ ]]; then + depends=(\"\${depends[@]}\" \"tc358743-dkms>=0.3\") + fi + + mkdir -p \"\$pkgdir/etc\"/{kvmd,sysctl.d,udev/rules.d,modules-load.d} + + local _cfg_default=\"/usr/share/kvmd/configs.default\" + + ln -sf \"\$_cfg_default/os/sysctl.conf\" \"\$pkgdir/etc/sysctl.d/99-kvmd.conf\" + ln -sf \"\$_cfg_default/os/udev/$_platform-$_board.rules\" \"\$pkgdir/etc/udev/rules.d/99-kvmd.rules\" + ln -sf \"\$_cfg_default/os/modules-load/$_platform.conf\" \"\$pkgdir/etc/modules-load.d/kvmd.conf\" + + ln -sf \"\$_cfg_default/kvmd/main/$_platform.yaml\" \"\$pkgdir/etc/kvmd/main.yaml\" + if [[ $_platform =~ ^.*-hdmi$ ]]; then + ln -sf \"\$_cfg_default/kvmd/tc358743-edid.hex\" \"\$pkgdir/etc/kvmd/tc358743-edid.hex\" + fi + }" done |