# Maintainer: Anjandev Momi # Contributor: Maarten van Gompel pkgname=sxmo-utils pkgver=1.14.2 pkgrel=4 pkgdesc="Utility scripts, programs, and configs that hold the Sxmo UI environment together" url="https://git.sr.ht/~mil/sxmo-utils" arch="all !ppc64le" # limited by codemadness-frontends license="AGPL-3.0-only" depends=" coreutils gawk curl doas gojq " makedepends=" libx11-dev linux-headers scdoc xproto " options="!check" # has no tests subpackages=" $pkgname-openrc $pkgname-doc $pkgname-common::noarch $pkgname-x11::noarch $pkgname-wayland::noarch $pkgname-dwm::noarch $pkgname-sway::noarch $pkgname-audio-pipewire:audio_pipewire:noarch $pkgname-audio-pulseaudio:audio_pulseaudio:noarch $pkgname-audio-bluetooth:audio_bluetooth:noarch $pkgname-audio-bluetooth-pipewire:audio_bluetooth_pipewire:noarch $pkgname-audio-bluetooth-pulseaudio:audio_bluetooth_pulseaudio:noarch " source=" $pkgname-$pkgver.tar.gz::https://git.sr.ht/~mil/sxmo-utils/archive/$pkgver.tar.gz rootfs-etc-NetworkManager-conf.d-00-sxmo.conf rootfs-etc-polkit-1-rules.d-00-sxmo.rules rootfs-etc-polkit-1-rules.d-50-org.freedesktop.NetworkManager.rules " package() { mkdir -p "$pkgdir/etc/modules-load.d/" printf %b "snd-aloop" > "$pkgdir/etc/modules-load.d/sxmo.conf" mkdir -p "$pkgdir/etc/modprobe.d/" printf %b "options snd slots=,snd-aloop" > "$pkgdir/etc/modprobe.d/sxmo.conf" make -C "$builddir" DESTDIR=$pkgdir install install -Dm644 "$srcdir/rootfs-etc-NetworkManager-conf.d-00-sxmo.conf" \ "$pkgdir/etc/NetworkManager/conf.d/00-sxmo.conf" install -Dm755 "$srcdir/rootfs-etc-polkit-1-rules.d-00-sxmo.rules" \ "$pkgdir/etc/polkit-1/rules.d/00-sxmo.rules" install -Dm755 "$srcdir/rootfs-etc-polkit-1-rules.d-50-org.freedesktop.NetworkManager.rules" \ "$pkgdir/etc/polkit-1/rules.d/50-org.freedesktop.NetworkManager.rules" } common() { pkgdesc="$pkgdesc - common dependencies" depends=" $pkgname=$pkgver-r$pkgrel $pkgname-audio $pkgname-wm adwaita-icon-theme alsa-utils callaudiod codemadness-frontends conky dnsmasq dunstify file font-dejavu font-dejavu-sans-mono-nerd geoclue inotify-tools light linux-tools-iio lisgd mediainfo mmsd-tng mmsd-tng-tools mnc modemmanager mpv ncurses pnc polkit pulseaudio-utils superd tinydm tzdata v4l-utils vim vvmd xdg-user-dirs yt-dlp " # bonsai and sxmobar requires hare which doesnt work on all arches # refer to https://pkgs.alpinelinux.org/packages?name=hare&branch=edge&repo=&arch=&maintainer= # and add arches here as they become available. Bonsai should always be preferred # cause it fixes alot of issues. If bonsai is not installed, sxmo will fallback # to the old buggy shell script. case "$CARCH" in x86_64|aarch64) depends="$depends bonsai sxmobar" ;; esac mkdir -p "$subpkgdir" } x11() { pkgdesc="$pkgdesc - x11 dependencies" depends=" $pkgname-common=$pkgver-r$pkgrel autocutsel dunst feh svkbd sxiv sxmo-dmenu sxmo-dwm sxmo-st unclutter-xfixes xcalib xclip xdotool xdpyinfo xinput xprintidle xprop xrandr xrdb xsel xset xsetroot xwininfo " mkdir -p "$subpkgdir" } wayland() { pkgdesc="$pkgdesc - wayland dependencies" depends=" $pkgname-common=$pkgver-r$pkgrel bemenu foot grim mako slurp swaybg swayidle wl-clipboard wob wtype wvkbd xwayland " mkdir -p "$subpkgdir" } dwm() { pkgdesc="$pkgdesc - dwm dependencies" provides="$pkgname-wm" provider_priority="10" depends=" $pkgname-x11=$pkgver-r$pkgrel sxmo-dwm " install="$subpkgname.post-install" mkdir -p "$subpkgdir" } sway() { pkgdesc="$pkgdesc - sway dependencies" provides="$pkgname-wm" provider_priority="20" depends=" $pkgname-wayland=$pkgver-r$pkgrel sxmo-sway seatd " install="$subpkgname.post-install" mkdir -p "$subpkgdir" } audio_pipewire() { provides="$pkgname-audio" provider_priority="20" depends="pipewire-pulse pipewire wireplumber pipewire-alsa" mkdir -p "$subpkgdir" } audio_pulseaudio() { provides="$pkgname-audio" provider_priority="10" depends="pulseaudio pulseaudio-alsa" mkdir -p "$subpkgdir" } audio_bluetooth() { mkdir -p "$subpkgdir" } audio_bluetooth_pipewire() { install_if="$pkgname-audio-bluetooth=$pkgver-r$pkgrel $pkgname-audio-pipewire=$pkgver-r$pkgrel" depends=" bluez pipewire-spa-bluez " mkdir -p "$subpkgdir" } audio_bluetooth_pulseaudio() { install_if="$pkgname-audio-bluetooth=$pkgver-r$pkgrel $pkgname-audio-pulseaudio=$pkgver-r$pkgrel" depends=" bluez pulseaudio-bluez !$pkgname-audio-pipewire " mkdir -p "$subpkgdir" } sha512sums=" c56ad0ed416ac08a15533b808af962de69f6ebefe15b9ff66fbe9d40a6149875794928ff146eadf517cfa929e2e6a58057b3ce0c2185cf3b1a1a26161adc86ae sxmo-utils-1.14.2.tar.gz 67a031f309a3232ac1e8abc3fedeaee912c035f9c81b4f709248895905a27ab5844ec92c65e55b79af3894450ba3883549d4004f11efebb47114d41f730e4a5f rootfs-etc-NetworkManager-conf.d-00-sxmo.conf 32532ad5071588b80f43d539b3bd140e3f5b4100fca244be2ade5b8c697c76043ce5278ae7bf14762106aed2c9690f34c14e73031e5d86c11cc042c8f7245421 rootfs-etc-polkit-1-rules.d-00-sxmo.rules 7b34e861bc4ec57d970d2a7aacca36e3c3742a63ff995af1336f80b666e4a38c1035b35e129322e0d62dc75011bfaf495eb2bcae5392f2bf39f1d7b1400afcce rootfs-etc-polkit-1-rules.d-50-org.freedesktop.NetworkManager.rules "