summaryrefslogtreecommitdiff
path: root/opt/swaylock/MAKEPKG
diff options
context:
space:
mode:
Diffstat (limited to 'opt/swaylock/MAKEPKG')
-rw-r--r--opt/swaylock/MAKEPKG47
1 files changed, 47 insertions, 0 deletions
diff --git a/opt/swaylock/MAKEPKG b/opt/swaylock/MAKEPKG
new file mode 100644
index 0000000..65c3704
--- /dev/null
+++ b/opt/swaylock/MAKEPKG
@@ -0,0 +1,47 @@
+#!/bin/mkpkg
+# description: screen locker for wayland compositors
+# url: https://github.com/swaywm/swaylock
+
+name=swaylock
+version=1.8.6
+release=1
+depends=(wayland libxkbcommon cairo)
+makedeps=(meson wayland-protocols)
+source=(https://github.com/swaywm/swaylock/releases/download/v$version/$name-$version.tar.gz)
+
+sha256sums=(
+ "a15154348fef852fdb224112d137c393c826478b777f63479beb15e8d3812eaf"
+)
+
+build() {
+ cd $name-$version
+
+ # musl provides crypt() in libc, no separate libcrypt exists.
+ # meson.build does: crypt = cc.find_library('crypt', required: not libpam.found())
+ # With PAM disabled this becomes required and fails on musl.
+ # Fix: make crypt library optional since symbols are in libc.
+ sed -i "s|cc.find_library('crypt', required: not libpam.found())|cc.find_library('crypt', required: false)|" meson.build
+
+ meson setup build \
+ --prefix=/usr \
+ -Dpam=disabled \
+ -Dgdk-pixbuf=disabled \
+ -Dman-pages=disabled \
+ -Dzsh-completions=false \
+ -Dbash-completions=false \
+ -Dfish-completions=false
+
+ ninja -C build
+ DESTDIR=$PKG ninja -C build install
+
+ # musl has native tcb/shadow support, no suid needed.
+ # If auth fails at runtime, uncomment:
+ # chmod u+s $PKG/usr/bin/swaylock
+}
+
+signify() {
+ untrusted comment: public key
+ RWTZ9IduCSQ/mL8337TEUinPwT92xFEUpD92hkS7IxcOnzTt9QdpohT3
+}
+
+# vim: filetype=sh