Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 2 Aug 2021 06:50:56 GMT
From:      Jan Beich <jbeich@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 90344a12379e - main - sysutils/keyd: add new port
Message-ID:  <202108020650.1726oukA010795@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by jbeich:

URL: https://cgit.FreeBSD.org/ports/commit/?id=90344a12379e2bedf3f351ee51dfc8a72fd54f41

commit 90344a12379e2bedf3f351ee51dfc8a72fd54f41
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2021-08-01 07:14:32 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2021-08-02 06:48:53 +0000

    sysutils/keyd: add new port
    
    keyd has several unique features many of which are traditionally only
    found in custom keyboard firmware like QMK. Some of the more
    interesting ones include:
    
    - Layers.
    - Key overloading (different behaviour on tap/hold).
    - Per keyboard configuration.
    - Instantaneous remapping (no flashing required).
    - A simple and intuitive config format.
    - Being display server agnostic (works on wayland and virtual console alike).
    
    https://github.com/rvaiya/keyd
---
 sysutils/Makefile           |  1 +
 sysutils/keyd/Makefile      | 38 ++++++++++++++++++++++++++++++++++++++
 sysutils/keyd/distinfo      |  3 +++
 sysutils/keyd/files/keyd.in | 24 ++++++++++++++++++++++++
 sysutils/keyd/pkg-descr     | 12 ++++++++++++
 5 files changed, 78 insertions(+)

diff --git a/sysutils/Makefile b/sysutils/Makefile
index 794dee6096f7..2f572efe665f 100644
--- a/sysutils/Makefile
+++ b/sysutils/Makefile
@@ -576,6 +576,7 @@
     SUBDIR += kdf
     SUBDIR += kdialog
     SUBDIR += keyboard-daemon
+    SUBDIR += keyd
     SUBDIR += kf5-baloo
     SUBDIR += kf5-kwallet
     SUBDIR += kfloppy
diff --git a/sysutils/keyd/Makefile b/sysutils/keyd/Makefile
new file mode 100644
index 000000000000..994509221a8a
--- /dev/null
+++ b/sysutils/keyd/Makefile
@@ -0,0 +1,38 @@
+PORTNAME=	keyd
+PORTVERSION=	s20210801
+CATEGORIES=	sysutils
+
+MAINTAINER=	jbeich@FreeBSD.org
+COMMENT=	Key remapping daemon for evdev
+
+BUILD_DEPENDS=	evdev-proto>0:devel/evdev-proto
+LIB_DEPENDS=	libudev.so:devel/libudev-devd
+
+LICENSE=	MIT
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+USE_GITHUB=	yes
+USE_RC_SUBR=	${PORTNAME}
+GH_ACCOUNT=	rvaiya
+GH_TAGNAME=	4843f58
+MAKE_ENV=	CPATH="${LOCALBASE}/include" \
+		LIBRARY_PATH="${LOCALBASE}/lib"
+MAKE_ARGS=	DESTDIR="${DESTDIR}" PREFIX="${PREFIX}" \
+		GIT_HASH="${GH_TAGNAME:U${DISTVERSIONFULL}}"
+CFLAGS+=	-D_WITH_GETLINE # XXX Remove after FreeBSD 11 EOL
+PLIST_FILES=	bin/${PORTNAME} \
+		share/man/man1/${PORTNAME}.1.gz \
+		"@dir ${ETCDIR}"
+
+post-patch:
+	@${REINPLACE_CMD} -e 's,/etc,${PREFIX}&,' \
+		-e '/systemd/d' \
+		-e '/^CFLAGS/s/=/+=/' \
+		-e 's/ -O3//' \
+		${WRKSRC}/Makefile
+	@${REINPLACE_CMD} -e 's,/etc,${PREFIX}&,' \
+		${WRKSRC}/src/config.h
+	@${REINPLACE_CMD} -e 's,/var/lock,/var/run,' \
+		${WRKSRC}/src/main.c
+
+.include <bsd.port.mk>
diff --git a/sysutils/keyd/distinfo b/sysutils/keyd/distinfo
new file mode 100644
index 000000000000..b6fe57a9c9a7
--- /dev/null
+++ b/sysutils/keyd/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1627885170
+SHA256 (rvaiya-keyd-s20210801-4843f58_GH0.tar.gz) = b39d0d056e71d9f13a31ee07b19c1e18fd09e497966b26b6027ddd04e76adcd7
+SIZE (rvaiya-keyd-s20210801-4843f58_GH0.tar.gz) = 22648
diff --git a/sysutils/keyd/files/keyd.in b/sysutils/keyd/files/keyd.in
new file mode 100644
index 000000000000..01a4cf94b9e8
--- /dev/null
+++ b/sysutils/keyd/files/keyd.in
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+# PROVIDE: keyd
+# REQUIRE: DAEMON
+# KEYWORD: shutdown
+#
+# Add the following lines to /etc/rc.conf to enable this service:
+#
+# keyd_enable (bool):	Set it to YES to run keyd on startup.
+#			Default: NO
+
+. /etc/rc.subr
+
+name="keyd"
+rcvar="${name}_enable"
+
+load_rc_config "$name"
+
+: ${keyd_enable="NO"}
+
+command="%%PREFIX%%/bin/${name}"
+command_args="-d"
+
+run_rc_command "$1"
diff --git a/sysutils/keyd/pkg-descr b/sysutils/keyd/pkg-descr
new file mode 100644
index 000000000000..76437d427072
--- /dev/null
+++ b/sysutils/keyd/pkg-descr
@@ -0,0 +1,12 @@
+keyd has several unique features many of which are traditionally only
+found in custom keyboard firmware like QMK. Some of the more
+interesting ones include:
+
+- Layers.
+- Key overloading (different behaviour on tap/hold).
+- Per keyboard configuration.
+- Instantaneous remapping (no flashing required).
+- A simple and intuitive config format.
+- Being display server agnostic (works on wayland and virtual console alike).
+
+WWW: https://github.com/rvaiya/keyd



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202108020650.1726oukA010795>