wip
This commit is contained in:
parent
65da0103d8
commit
e9c4a26387
3 changed files with 31 additions and 22 deletions
|
@ -1,5 +1,6 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
unset PACKAGE &&
|
||||||
PACKAGE=hyprgraphics
|
PACKAGE=hyprgraphics
|
||||||
|
|
||||||
# ─< Check if the given command exists silently >─────────────────────────────────────────
|
# ─< Check if the given command exists silently >─────────────────────────────────────────
|
||||||
|
@ -59,7 +60,7 @@ getDependencies() {
|
||||||
# │ automagically be pulled via the $pkgArray[$distro] variable │
|
# │ automagically be pulled via the $pkgArray[$distro] variable │
|
||||||
# ╰─────────────────────────────────────────────────────────────────────────╯
|
# ╰─────────────────────────────────────────────────────────────────────────╯
|
||||||
#
|
#
|
||||||
depsDebian=(libpixman-1-dev libcairo2-dev cmake wayland-protocols hyprutils)
|
depsDebian=(libpixman-1-dev libcairo2-dev cmake wayland-protocols libwebp-dev libjpeg-dev libspng-dev libmagic-dev hyprutils)
|
||||||
depsArch=(hyprutils)
|
depsArch=(hyprutils)
|
||||||
# depsFedora=()
|
# depsFedora=()
|
||||||
# depsOpensuse=()
|
# depsOpensuse=()
|
||||||
|
@ -96,29 +97,35 @@ getDependencies() {
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
build() {
|
||||||
|
echo_info "Building $PACKAGE"
|
||||||
|
run cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_INSTALL_PREFIX:PATH=/usr -S . -B ./build
|
||||||
|
run cmake --build ./build --config Release --target all -j$(nproc 2>/dev/null || getconf NPROCESSORS_CONF)
|
||||||
|
}
|
||||||
|
|
||||||
|
cloneAndInstall() {
|
||||||
|
local cloneDir="$(mktemp -d)"
|
||||||
|
cd $cloneDir || mkdir -p "$cloneDir" && cd "$cloneDir"
|
||||||
|
|
||||||
|
git clone --depth=1 https://github.com/hyprwm/hyprgraphics.git &&
|
||||||
|
cd hyprgraphics
|
||||||
|
|
||||||
|
if build; then
|
||||||
|
echo_info "Installing package.."
|
||||||
|
$_sudo cmake --install build
|
||||||
|
else
|
||||||
|
echo_error "Build has failed for $distro compiling $PACKAGE"
|
||||||
|
return 69
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
case "$distro" in
|
case "$distro" in
|
||||||
arch)
|
arch)
|
||||||
echo "arch"
|
_install hyprgraphics
|
||||||
;;
|
;;
|
||||||
debian)
|
debian)
|
||||||
echo "debian"
|
cloneAndInstall
|
||||||
;;
|
|
||||||
ubuntu)
|
|
||||||
echo "ubuntu"
|
|
||||||
;;
|
|
||||||
fedora)
|
|
||||||
echo "fedora"
|
|
||||||
;;
|
|
||||||
alpine)
|
|
||||||
echo "alpine"
|
|
||||||
;;
|
|
||||||
opensuse)
|
|
||||||
echo "opensuse"
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "$distro is not supported by this script!"
|
|
||||||
exit 1
|
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
unset PACAKGE &&
|
||||||
PACKAGE=hyprutils
|
PACKAGE=hyprutils
|
||||||
|
|
||||||
# ─< Check if the given command exists silently >─────────────────────────────────────────
|
# ─< Check if the given command exists silently >─────────────────────────────────────────
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
unset PACKAGE &&
|
||||||
PACKAGE=hyprlock
|
PACKAGE=hyprlock
|
||||||
|
|
||||||
# ─< Check if the given command exists silently >─────────────────────────────────────────
|
# ─< Check if the given command exists silently >─────────────────────────────────────────
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue