From 7ec393a756daee04c1b32cf5f23d355dd176bfb1 Mon Sep 17 00:00:00 2001 From: noarchwastaken Date: Mon, 31 May 2021 22:27:36 -0400 Subject: [PATCH] New package: ydotool-0.2.0 --- srcpkgs/ydotool/files/80-uinput.rules | 3 +++ srcpkgs/ydotool/files/iodash-musl.patch | 24 +++++++++++++++++ srcpkgs/ydotool/files/ydotoold/run | 2 ++ srcpkgs/ydotool/template | 36 +++++++++++++++++++++++++ 4 files changed, 65 insertions(+) create mode 100644 srcpkgs/ydotool/files/80-uinput.rules create mode 100644 srcpkgs/ydotool/files/iodash-musl.patch create mode 100644 srcpkgs/ydotool/files/ydotoold/run create mode 100644 srcpkgs/ydotool/template diff --git a/srcpkgs/ydotool/files/80-uinput.rules b/srcpkgs/ydotool/files/80-uinput.rules new file mode 100644 index 000000000000..988d34547f52 --- /dev/null +++ b/srcpkgs/ydotool/files/80-uinput.rules @@ -0,0 +1,3 @@ +## ydotoold fix +## https://github.com/ReimuNotMoe/ydotool/issues/25#issuecomment-535842993 +KERNEL=="uinput", GROUP="input", MODE="0660", OPTIONS+="static_node=uinput" diff --git a/srcpkgs/ydotool/files/iodash-musl.patch b/srcpkgs/ydotool/files/iodash-musl.patch new file mode 100644 index 000000000000..d6a599927d14 --- /dev/null +++ b/srcpkgs/ydotool/files/iodash-musl.patch @@ -0,0 +1,24 @@ +upstream PR: https://github.com/YukiWorkshop/IODash/pull/3 + +--- build/_deps/iodash-src/IODash/Serial.hpp ++++ build/_deps/iodash-src/IODash/Serial.hpp +@@ -16,6 +16,7 @@ + #include + #include + ++#include + #include + + #ifdef __linux__ + +--- build/_deps/iodash-src/IODash/SocketAddress.hpp ++++ build/_deps/iodash-src/IODash/SocketAddress.hpp +@@ -18,6 +18,7 @@ + #include + + #include ++#include + + #include + #include + diff --git a/srcpkgs/ydotool/files/ydotoold/run b/srcpkgs/ydotool/files/ydotoold/run new file mode 100644 index 000000000000..2425089b3bea --- /dev/null +++ b/srcpkgs/ydotool/files/ydotoold/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec chpst -u root:input ydotoold --socket-perm 660 2>&1 diff --git a/srcpkgs/ydotool/template b/srcpkgs/ydotool/template new file mode 100644 index 000000000000..ee3dbec6e012 --- /dev/null +++ b/srcpkgs/ydotool/template @@ -0,0 +1,36 @@ +# Template file for 'ydotool' +pkgname=ydotool +version=0.2.0 +revision=1 +build_style=cmake +hostmakedepends="git scdoc" +short_desc="Generic command-line automation tool, works on Wayland and X11" +maintainer="noarchwastaken " +license="AGPL-3.0-or-later" +homepage="https://github.com/ReimuNotMoe/ydotool" +distfiles="${homepage}/archive/refs/tags/v${version}.tar.gz" +checksum=2311b003d2ff383f3348f17101f0df74f56616d530d66d0a014a52ba85a5dcf1 + +# patches a dependency pulled by CPM, so it must be done after configure +post_configure() { + patch -sl -Np0 -i ${FILESDIR}/iodash-musl.patch 2>/dev/null +} + +do_install() { + vbin build/ydotool + vbin build/ydotoold +} + +post_install() { + vsv ydotoold + + vinstall ${FILESDIR}/80-uinput.rules 644 usr/lib/udev/rules.d + + scdoc < manpage/ydotool.1.scd > ydotool.1 + scdoc < manpage/ydotoold.8.scd > ydotoold.8 + + vman ydotool.1 + vman ydotoold.8 + + vlicense LICENSE +}