summaryrefslogtreecommitdiff
path: root/PKGBUILD
diff options
context:
space:
mode:
authorDevaev Maxim <[email protected]>2019-02-17 05:38:15 +0300
committerDevaev Maxim <[email protected]>2019-02-17 05:38:15 +0300
commitcca04b10e0a827be356e7e795b38eea1dd627bd4 (patch)
treef8802ac17951c102144484fad13e5b22d8c22ac2 /PKGBUILD
parent9841988dcde869783b4095cda9d35e8f7d6f29dc (diff)
package fixes
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD38
1 files changed, 29 insertions, 9 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 8d103835..f3e66549 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -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