Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add package for keyd #744

Open
wants to merge 23 commits into
base: testing
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 22 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions package/keyd/default.conf
Eeems marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[ids]
# 2edd:0001 # type folio

[main]
58 changes: 58 additions & 0 deletions package/keyd/package
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
#!/usr/bin/env bash
# Copyright (c) 2020 The Toltec Contributors
# SPDX-License-Identifier: MIT

pkgnames=(keyd)
pkgdesc="A key remapping daemon for linux"
url="https://github.com/rvaiya/keyd"
pkgver=2.4.3-1
timestamp=2023-05-16T10:11Z
section=utils
maintainer="Kai <[email protected]>"
license=MIT

image=base:v3.1
source=(
https://github.com/rvaiya/keyd/archive/refs/tags/v2.4.3.zip
default.conf
)
sha256sums=(
cdfcc2cf0518b9a2d292ebac17b18f78548b92803e2a9deeb9f18c9641bf80e5
SKIP
)

build() {
make PREFIX=/opt CONFIG_DIR=/opt/etc/keyd "CC=${CROSS_COMPILE}cc"
sed -i 's|ExecStart=/usr/bin/keyd|ExecStart=/opt/bin/keyd|' keyd.service
}

package() {
cd "$srcdir"
make PREFIX=/opt CONFIG_DIR=/opt/etc/keyd DESTDIR="$pkgdir" install
rmdir "$pkgdir"/etc/keyd
install -D -m 644 -t "$pkgdir"/etc/systemd/system "$srcdir"/keyd.service
install -D -m 644 -t "$pkgdir"/opt/etc/keyd "$srcdir"/default.conf
}

configure() {
addgroup keyd
systemctl daemon-reload
if is-active keyd; then
systemctl restart keyd
elif ! is-enabled "$pkgname.service"; then
echo ""
echo "Run the following command(s) to enable the keyd service"
how-to-enable "$pkgname.service"
echo ""
echo "You will need to modify /opt/etc/keyd/default.conf before starting the service"
fi
}

preremove() {
kiwiz marked this conversation as resolved.
Show resolved Hide resolved
disable-unit keyd
delgroup keyd
}

postremove() {
systemctl daemon-reload
}
Loading