summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Beich <jbeich@FreeBSD.org>2023-05-06 15:44:22 +0200
committerJan Beich <jbeich@FreeBSD.org>2023-12-01 15:11:25 +0100
commit3dc4863f379f5bb2a2d0b5ec1d5dce208e08b965 (patch)
treeb993721df451b91b8997b8f3ce39fed6f99c5b98
parentnet-mgmt/netbox: Update to 3.6.6 (diff)
x11/gtklock: add new port
gtklock is a lockscreen based on gtkgreet. It uses the wlr-layer-shell and wlr-input-inhibitor Wayland protocols. Works on sway and other wlroots-based compositors. https://github.com/jovanlanik/gtklock
-rw-r--r--x11/Makefile1
-rw-r--r--x11/gtklock/Makefile31
-rw-r--r--x11/gtklock/distinfo3
-rw-r--r--x11/gtklock/files/patch-pam_gtklock11
-rw-r--r--x11/gtklock/pkg-descr3
5 files changed, 49 insertions, 0 deletions
diff --git a/x11/Makefile b/x11/Makefile
index 4fb52d5784ef..8e22cfb1a92c 100644
--- a/x11/Makefile
+++ b/x11/Makefile
@@ -108,6 +108,7 @@
SUBDIR += gtk-app-menu
SUBDIR += gtk-theme-switch2
SUBDIR += gtkchtheme
+ SUBDIR += gtklock
SUBDIR += gtkterm2
SUBDIR += guake
SUBDIR += gxkb
diff --git a/x11/gtklock/Makefile b/x11/gtklock/Makefile
new file mode 100644
index 000000000000..83c3415e3653
--- /dev/null
+++ b/x11/gtklock/Makefile
@@ -0,0 +1,31 @@
+PORTNAME= gtklock
+DISTVERSIONPREFIX= v
+DISTVERSION= 2.1.0
+CATEGORIES= x11 wayland
+
+MAINTAINER= jbeich@FreeBSD.org
+COMMENT= GTK-based lockscreen for Wayland
+WWW= https://github.com/jovanlanik/gtklock
+
+LICENSE= GPLv3
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+BUILD_DEPENDS= scdoc:textproc/scdoc
+LIB_DEPENDS= libwayland-client.so:graphics/wayland \
+ libgtk-layer-shell.so:x11-toolkits/gtk-layer-shell
+RUN_DEPENDS= unix-selfauth-helper>0:security/unix-selfauth-helper
+
+USES= compiler:c11 gmake gnome pkgconfig
+USE_GITHUB= yes
+USE_GNOME= gtk30
+GH_ACCOUNT= jovanlanik
+MAKEFILE= makefile
+LDFLAGS+= -Wl,--as-needed # gtk30 deps
+PLIST_FILES= bin/${PORTNAME} \
+ etc/pam.d/${PORTNAME} \
+ share/man/man1/${PORTNAME}.1.gz
+
+post-install:
+ @${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/${PORTNAME}
+
+.include <bsd.port.mk>
diff --git a/x11/gtklock/distinfo b/x11/gtklock/distinfo
new file mode 100644
index 000000000000..352e5ec1be93
--- /dev/null
+++ b/x11/gtklock/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1683380662
+SHA256 (jovanlanik-gtklock-v2.1.0_GH0.tar.gz) = 47cc09ab773e90e3a28240faaabb8d9ac4e36f5234a2b5c3a956039783365f43
+SIZE (jovanlanik-gtklock-v2.1.0_GH0.tar.gz) = 56550
diff --git a/x11/gtklock/files/patch-pam_gtklock b/x11/gtklock/files/patch-pam_gtklock
new file mode 100644
index 000000000000..b3320bb6725c
--- /dev/null
+++ b/x11/gtklock/files/patch-pam_gtklock
@@ -0,0 +1,11 @@
+"login" has "auth sufficient pam_self.so" but a screen locker is
+supposed to ask for password regardless.
+
+pam_unix(8) requires root priveleges to access master.passwd(5),
+so try authenticating via setuid helper first.
+
+--- pam/gtklock.orig 2023-05-06 13:44:22 UTC
++++ pam/gtklock
+@@ -1 +1 @@
+-auth include login
++auth include unix-selfauth
diff --git a/x11/gtklock/pkg-descr b/x11/gtklock/pkg-descr
new file mode 100644
index 000000000000..6090480799b7
--- /dev/null
+++ b/x11/gtklock/pkg-descr
@@ -0,0 +1,3 @@
+gtklock is a lockscreen based on gtkgreet. It uses the wlr-layer-shell
+and wlr-input-inhibitor Wayland protocols. Works on sway and other
+wlroots-based compositors.