From owner-dev-commits-ports-main@freebsd.org Mon Aug 2 06:50:57 2021 Return-Path: Delivered-To: dev-commits-ports-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 37C5F66EBEB; Mon, 2 Aug 2021 06:50:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GdTDK0rtZz4vC4; Mon, 2 Aug 2021 06:50:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 053991B1A1; Mon, 2 Aug 2021 06:50:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1726ouUA010796; Mon, 2 Aug 2021 06:50:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1726oukA010795; Mon, 2 Aug 2021 06:50:56 GMT (envelope-from git) Date: Mon, 2 Aug 2021 06:50:56 GMT Message-Id: <202108020650.1726oukA010795@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Jan Beich Subject: git: 90344a12379e - main - sysutils/keyd: add new port MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jbeich X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 90344a12379e2bedf3f351ee51dfc8a72fd54f41 Auto-Submitted: auto-generated X-BeenThere: dev-commits-ports-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the main branch of the FreeBSD ports repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Aug 2021 06:50:57 -0000 The branch main has been updated by jbeich: URL: https://cgit.FreeBSD.org/ports/commit/?id=90344a12379e2bedf3f351ee51dfc8a72fd54f41 commit 90344a12379e2bedf3f351ee51dfc8a72fd54f41 Author: Jan Beich AuthorDate: 2021-08-01 07:14:32 +0000 Commit: Jan Beich 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 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