diff options
author | Devaev Maxim <[email protected]> | 2019-02-17 05:38:15 +0300 |
---|---|---|
committer | Devaev Maxim <[email protected]> | 2019-02-17 05:38:15 +0300 |
commit | cca04b10e0a827be356e7e795b38eea1dd627bd4 (patch) | |
tree | f8802ac17951c102144484fad13e5b22d8c22ac2 /PKGBUILD | |
parent | 9841988dcde869783b4095cda9d35e8f7d6f29dc (diff) |
package fixes
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 38 |
1 files changed, 29 insertions, 9 deletions
@@ -33,7 +33,8 @@ depends=( python-dbus python-pygments v4l-utils - nginx + nginx-mainline + openssl ) makedepends=(python-setuptools) source=("$url/archive/v$pkgver.tar.gz") @@ -57,11 +58,13 @@ package_kvmd() { mkdir -p "$pkgdir/usr/lib/systemd/system" cp configs/os/systemd/*.service "$pkgdir/usr/lib/systemd/system" - _cfgdir="$pkgdir/usr/share/kvmd/configs.default" mkdir -p "$pkgdir/usr/share/kvmd" cp -r web "$pkgdir/usr/share/kvmd" cp -r extras "$pkgdir/usr/share/kvmd" - cp -r configs "$_cfgdir" + + _cfgdir="$pkgdir/usr/share/kvmd/configs.default" + mkdir -p "$_cfgdir" + cp -r configs/* "$_cfgdir" rm -rf "$_cfgdir/os/systemd" find "$pkgdir" -name ".gitignore" -delete @@ -69,8 +72,15 @@ package_kvmd() { find "$_cfgdir" -type f -exec chmod 444 '{}' \; chmod 440 "$_cfgdir/kvmd/htpasswd" - mkdir -p "$pkgdir/etc/kvmd/nginx" - for path in "$_cfgdir/nginx/*.conf"; do + mkdir -p "$pkgdir/etc/kvmd/nginx/ssl" + chmod 750 "$pkgdir/etc/kvmd/nginx/ssl" + for path in "$_cfgdir/kvmd"/*.yaml; do + ln -sf "/usr/share/kvmd/configs.default/kvmd/`basename $path`" "$pkgdir/etc/kvmd" + done + rm "$pkgdir/etc/kvmd/meta.yaml" + cp "$_cfgdir/kvmd/meta.yaml" "$pkgdir/etc/kvmd" + cp -a "$_cfgdir/kvmd/htpasswd" "$pkgdir/etc/kvmd" + for path in "$_cfgdir/nginx"/*.conf; do ln -sf "/usr/share/kvmd/configs.default/nginx/`basename $path`" "$pkgdir/etc/kvmd/nginx" done } @@ -79,11 +89,21 @@ export pkgdir for _platform in $_PLATFORMS; do for _board in $_BOARDS; do eval "package_kvmd-platform-$_platform-$_board() { + pkgdesc=\"Pi-KVM platform configs - $_platform for $_board\" + mkdir -p \"$pkgdir/etc/\"{sysctl.d,udev/rules.d,modules-load.d} - _osdir=\"/usr/share/kvmd/configs.default/os\" - ln -sf \"$_osdir/sysctl.conf\" \"$pkgdir/etc/sysctl.d/99-pikvm.conf\" - ln -sf \"$_osdir/udev/$_platform-$_board.rules\" \"$pkgdir/etc/udev/rules.d/99-pikvm.rules\" - ln -sf \"$_osdir/modules-load/$_platform.conf\" \"$pkgdir/etc/modules-load.d/pikvm.conf\" + + _cfgdir=\"/usr/share/kvmd/configs.default/os\" + + ln -sf \"$_cfgdir/os/sysctl.conf\" \"$pkgdir/etc/sysctl.d/99-pikvm.conf\" + ln -sf \"$_cfgdir/os/udev/$_platform-$_board.rules\" \"$pkgdir/etc/udev/rules.d/99-pikvm.rules\" + ln -sf \"$_cfgdir/os/modules-load/$_platform.conf\" \"$pkgdir/etc/modules-load.d/pikvm.conf\" + + ln -sf \"$_cfgdir/kvmd/main/$_platform.yaml\" \"$pkgdir/etc/kvmd/main.yaml\" + if [ $_platform == v1-hdmi ]; then + depends+=(dkms tc358743-dkms) + ln -sf \"$_cfgdir/kvmd/tc358743-edid.hex\" \"$pkgdir/etc/kvmd/tc358743-edid.hex\" + fi }" done done |