feat: add ydotool, ydotoold
Some checks failed
/ ansible-semaphore (push) Successful in 2m2s
/ daliserver (push) Successful in 1m45s
/ forgejo (push) Successful in 3m15s
/ forgejo-runner (push) Successful in 1m21s
/ http-mqtt-bridge (push) Successful in 3m8s
/ keycloak-26 (push) Successful in 3m46s
/ linux-diversion-ath-regd-optional (push) Has started running
/ lottieconverter (push) Successful in 45s
/ matterbridge (push) Successful in 2m25s
/ matrix-element-web (push) Successful in 2m16s
/ matrix-hydrogen (push) Successful in 1m8s
/ matrix.to (push) Successful in 3m32s
/ maubot (push) Successful in 5m42s
/ maubot-plugin-spaceapi (push) Successful in 1m29s
/ maubot-plugin-ultimaker (push) Successful in 1m23s
/ mautrix-signal (push) Successful in 1m12s
/ mautrix-telegram (push) Successful in 1m6s
/ mediawiki-extension-auth-remoteuser (push) Successful in 1m9s
/ mediawiki-extension-nativesvghandler (push) Successful in 58s
/ mediawiki-extension-openidconnect (push) Successful in 1m19s
/ mediawiki-extension-pluggableauth (push) Successful in 1m8s
/ mqtt2prometheus (push) Successful in 3m5s
/ prometheus-ipmi-exporter (push) Successful in 1m34s
/ prometheus-dnsbl-exporter (push) Successful in 1m13s
/ prometheus2influxdb (push) Successful in 41s
/ python3-mautrix (push) Successful in 1m2s
/ python3-telethon (push) Successful in 58s
/ repo.s3lph.me-apt-source (push) Successful in 35s
/ republik-feeder (push) Successful in 54s
/ ydotool (push) Failing after 44s
/ ydotoold (push) Failing after 26s
Some checks failed
/ ansible-semaphore (push) Successful in 2m2s
/ daliserver (push) Successful in 1m45s
/ forgejo (push) Successful in 3m15s
/ forgejo-runner (push) Successful in 1m21s
/ http-mqtt-bridge (push) Successful in 3m8s
/ keycloak-26 (push) Successful in 3m46s
/ linux-diversion-ath-regd-optional (push) Has started running
/ lottieconverter (push) Successful in 45s
/ matterbridge (push) Successful in 2m25s
/ matrix-element-web (push) Successful in 2m16s
/ matrix-hydrogen (push) Successful in 1m8s
/ matrix.to (push) Successful in 3m32s
/ maubot (push) Successful in 5m42s
/ maubot-plugin-spaceapi (push) Successful in 1m29s
/ maubot-plugin-ultimaker (push) Successful in 1m23s
/ mautrix-signal (push) Successful in 1m12s
/ mautrix-telegram (push) Successful in 1m6s
/ mediawiki-extension-auth-remoteuser (push) Successful in 1m9s
/ mediawiki-extension-nativesvghandler (push) Successful in 58s
/ mediawiki-extension-openidconnect (push) Successful in 1m19s
/ mediawiki-extension-pluggableauth (push) Successful in 1m8s
/ mqtt2prometheus (push) Successful in 3m5s
/ prometheus-ipmi-exporter (push) Successful in 1m34s
/ prometheus-dnsbl-exporter (push) Successful in 1m13s
/ prometheus2influxdb (push) Successful in 41s
/ python3-mautrix (push) Successful in 1m2s
/ python3-telethon (push) Successful in 58s
/ repo.s3lph.me-apt-source (push) Successful in 35s
/ republik-feeder (push) Successful in 54s
/ ydotool (push) Failing after 44s
/ ydotoold (push) Failing after 26s
This commit is contained in:
parent
630f4ca015
commit
228c36d888
11 changed files with 179 additions and 0 deletions
|
@ -62,3 +62,5 @@ jobs:
|
|||
python3-telethon: *job
|
||||
repo.s3lph.me-apt-source: *job
|
||||
republik-feeder: *job
|
||||
ydotool: *job
|
||||
ydotoold: *job
|
||||
|
|
|
@ -38,3 +38,5 @@ information, please see [https://repo.s3lph.me/](https://repo.s3lph.me/).
|
|||
- [python3-telethon](https://github.com/tulir/Telethon)
|
||||
- [repo.s3lph.me-apt-source](https://repo.s3lph.me)
|
||||
- [republik-feeder](https://github.com/maetthu/republik-feeder)
|
||||
- [ydotool](https://github.com/s3lph/ydotool) (My fork until https://github.com/ReimuNotMoe/ydotool/pull/261 is merged)
|
||||
- [ydotoold](https://github.com/s3lph/ydotool) (My fork until https://github.com/ReimuNotMoe/ydotool/pull/261 is merged)
|
||||
|
|
83
ydotool/build.sh
Executable file
83
ydotool/build.sh
Executable file
|
@ -0,0 +1,83 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -exo pipefail
|
||||
|
||||
ROOT=$(pwd)
|
||||
|
||||
function fetch() {
|
||||
git clone https://github.com/s3lph/ydotool "${SRCDIR}/ydotool"
|
||||
}
|
||||
|
||||
function prepare() {
|
||||
apt install -y build-essential cmake pkg-config scdoc
|
||||
cd "${SRCDIR}/ydotool"
|
||||
export VERSION="$(git describe --tags | cut -d- -f1-2 | sed -re "s/-/~/g" -e "s/^v//g")-1"
|
||||
export ISODATE="$(git log -1 --format="%aI")"
|
||||
mkdir build
|
||||
cd build
|
||||
cmake ..
|
||||
make
|
||||
strip ydotool
|
||||
strip ydotoold
|
||||
}
|
||||
|
||||
function prepare_ydotool() {
|
||||
mkdir -p \
|
||||
"${PKGDIR_YDOTOOL}/DEBIAN" \
|
||||
"${PKGDIR_YDOTOOL}/usr/bin" \
|
||||
"${PKGDIR_YDOTOOL}/usr/share/man/man1" \
|
||||
"${PKGDIR_YDOTOOL}/usr/share/doc/ydotool"
|
||||
cp "${SRCDIR}/ydotool/build/ydotool" "${PKGDIR_YDOTOOL}/usr/bin/ydotool"
|
||||
cp "${SRCDIR}/ydotool/build/manpage/ydotool.1" "${PKGDIR_YDOTOOL}/usr/share/man/man1/ydotool.1"
|
||||
gzip -9n "${PKGDIR_YDOTOOL}/usr/share/man/man1/ydotool.1"
|
||||
cp "${SRCDIR}/ydotool/LICENSE" "${PKGDIR_YDOTOOL}/usr/share/doc/ydotool/copyright"
|
||||
cp "${ROOT}/ydotool.debian.control" "${PKGDIR_YDOTOOL}/DEBIAN/control"
|
||||
sed -re "s/__VERSION__/${VERSION}/g" -i "${PKGDIR_YDOTOOL}/DEBIAN/control"
|
||||
sed -re "s/__MAINTAINER__/${MAINTAINER}/g" -i "${PKGDIR_YDOTOOL}/DEBIAN/control"
|
||||
find "${PKGDIR_YDOTOOL}" -exec touch -m -d "${ISODATE}" {} \;
|
||||
}
|
||||
|
||||
function prepare_ydotoold() {
|
||||
mkdir -p \
|
||||
"${PKGDIR_YDOTOOLD}/DEBIAN" \
|
||||
"${PKGDIR_YDOTOOLD}/etc/default" \
|
||||
"${PKGDIR_YDOTOOLD}/usr/bin" \
|
||||
"${PKGDIR_YDOTOOLD}/lib/systemd/system" \
|
||||
"${PKGDIR_YDOTOOLD}/usr/share/man/man8" \
|
||||
"${PKGDIR_YDOTOOLD}/usr/share/doc/ydotoold"
|
||||
cp "${SRCDIR}/ydotool/build/ydotoold" "${PKGDIR_YDOTOOLD}/usr/bin/ydotoold"
|
||||
cp "${SRCDIR}/ydotool/build/manpage/ydotoold.8" "${PKGDIR_YDOTOOLD}/usr/share/man/man8/ydotoold.8"
|
||||
gzip -9n "${PKGDIR_YDOTOOLD}/usr/share/man/man8/ydotoold.8"
|
||||
cp "${SRCDIR}/ydotool/LICENSE" "${PKGDIR_YDOTOOLD}/usr/share/doc/ydotoold/copyright"
|
||||
cp "${ROOT}/ydotoold.debian.control" "${PKGDIR_YDOTOOLD}/DEBIAN/control"
|
||||
cp "${ROOT}/debian.conffiles" "${PKGDIR_YDOTOOLD}/DEBIAN/conffiles"
|
||||
cp "${ROOT}/debian.default" "${PKGDIR_YDOTOOLD}/etc/default/ydotoold"
|
||||
cp "${ROOT}/debian.postinst" "${PKGDIR_YDOTOOLD}/DEBIAN/postinst"
|
||||
cp "${ROOT}/debian.prerm" "${PKGDIR_YDOTOOLD}/DEBIAN/prerm"
|
||||
cp "${ROOT}/debian.postrm" "${PKGDIR_YDOTOOLD}/DEBIAN/postrm"
|
||||
cp "${ROOT}/ydotoold.service" "${PKGDIR_YDOTOOLD}/lib/systemd/system/ydotoold.service"
|
||||
sed -re "s/__VERSION__/${VERSION}/g" -i "${PKGDIR_YDOTOOLD}/DEBIAN/control"
|
||||
sed -re "s/__MAINTAINER__/${MAINTAINER}/g" -i "${PKGDIR_YDOTOOLD}/DEBIAN/control"
|
||||
find "${PKGDIR_YDOTOOLD}" -exec touch -m -d "${ISODATE}" {} \;
|
||||
}
|
||||
|
||||
function package() {
|
||||
cd "${BUILDDIR}"
|
||||
dpkg-deb --build "${PKGDIR_YDOTOOL}" "${BUILDDIR}"
|
||||
dpkg-deb --build "${PKGDIR_YDOTOOLD}" "${BUILDDIR}"
|
||||
}
|
||||
|
||||
function build() {
|
||||
export BUILDDIR=${ROOT}/build
|
||||
export SRCDIR=${BUILDDIR}/srcdir
|
||||
export PKGDIR_YDOTOOL=${BUILDDIR}/pkgdir-ydotool
|
||||
export PKGDIR_YDOTOOLD=${BUILDDIR}/pkgdir-ydotoold
|
||||
mkdir -p ${SRCDIR} ${PKGDIR_YDOTOOL} ${PKGDIR_YDOTOOLD}
|
||||
fetch
|
||||
prepare
|
||||
prepare_ydotool
|
||||
prepare_ydotoold
|
||||
package
|
||||
}
|
||||
|
||||
build
|
1
ydotool/debian.conffiles
Normal file
1
ydotool/debian.conffiles
Normal file
|
@ -0,0 +1 @@
|
|||
/etc/default/ydotoold
|
1
ydotool/debian.default
Normal file
1
ydotool/debian.default
Normal file
|
@ -0,0 +1 @@
|
|||
ARGS="--socket-path=/run/.ydotool_socket --socket-own=root:ydotool --socket-perm=0660"
|
15
ydotool/debian.postinst
Executable file
15
ydotool/debian.postinst
Executable file
|
@ -0,0 +1,15 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
if [[ "$1" == "configure" ]]; then
|
||||
|
||||
if ! getent group ydotool >/dev/null; then
|
||||
groupadd --system ydotool
|
||||
fi
|
||||
|
||||
deb-systemd-helper enable ydotoold.service
|
||||
deb-systemd-invoke restart ydotoold.service
|
||||
|
||||
fi
|
||||
|
9
ydotool/debian.postrm
Executable file
9
ydotool/debian.postrm
Executable file
|
@ -0,0 +1,9 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
if [[ "$1" == "remove" ]]; then
|
||||
|
||||
systemctl daemon-reload || true
|
||||
|
||||
fi
|
9
ydotool/debian.prerm
Executable file
9
ydotool/debian.prerm
Executable file
|
@ -0,0 +1,9 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
if [[ "$1" == "remove" ]]; then
|
||||
|
||||
deb-systemd-invoke stop ydotoold.service
|
||||
|
||||
fi
|
22
ydotool/ydotool.debian.control
Normal file
22
ydotool/ydotool.debian.control
Normal file
|
@ -0,0 +1,22 @@
|
|||
Package: ydotool
|
||||
Version: 2:__VERSION__
|
||||
Maintainer: __MAINTAINER__
|
||||
Section: utils
|
||||
Priority: optional
|
||||
Architecture: amd64
|
||||
Depends: libc6
|
||||
Recommends: ydotoold
|
||||
Description: Command-line automation tool - cli
|
||||
Generic Linux command-line automation tool
|
||||
.
|
||||
ydotool works differently from xdotool. xdotool
|
||||
sends X events directly to X server, while ydotool
|
||||
uses the uinput framework of Linux kernel to emulate
|
||||
an input device.
|
||||
.
|
||||
When ydotool runs and creates an virtual input device,
|
||||
it will take some time for your graphical environment
|
||||
(X11/Wayland) to recognize and enable the virtual
|
||||
input device. (Usually done by udev)
|
||||
.
|
||||
This package contains the command-line utility.
|
22
ydotool/ydotoold.debian.control
Normal file
22
ydotool/ydotoold.debian.control
Normal file
|
@ -0,0 +1,22 @@
|
|||
Package: ydotoold
|
||||
Version: 2:__VERSION__
|
||||
Maintainer: __MAINTAINER__
|
||||
Section: utils
|
||||
Priority: optional
|
||||
Architecture: amd64
|
||||
Depends: libc6
|
||||
Suggests: ydotool
|
||||
Description: Command-line automation tool - daemon
|
||||
Generic Linux command-line automation tool
|
||||
.
|
||||
ydotool works differently from xdotool. xdotool
|
||||
sends X events directly to X server, while ydotool
|
||||
uses the uinput framework of Linux kernel to emulate
|
||||
an input device.
|
||||
.
|
||||
When ydotool runs and creates an virtual input device,
|
||||
it will take some time for your graphical environment
|
||||
(X11/Wayland) to recognize and enable the virtual
|
||||
input device. (Usually done by udev)
|
||||
.
|
||||
This package contains the daemon.
|
13
ydotool/ydotoold.service
Normal file
13
ydotool/ydotoold.service
Normal file
|
@ -0,0 +1,13 @@
|
|||
[Unit]
|
||||
Description=Command-line automation tool - daemon
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=root
|
||||
WorkingDirectory=/run
|
||||
EnvironmentFile=/etc/default/ydotoold
|
||||
ExecStart=/usr/bin/ydotoold $ARGS
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
Loading…
Reference in a new issue