From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id zPyMGAPRUWELZwEAgWs5BA (envelope-from ) for ; Mon, 27 Sep 2021 16:11:15 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id qLi4EwPRUWHtIgAA1q6Kng (envelope-from ) for ; Mon, 27 Sep 2021 14:11:15 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id D1AB168D0 for ; Mon, 27 Sep 2021 16:11:14 +0200 (CEST) Received: from localhost ([::1]:36570 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mUrLd-0001B6-Rp for larch@yhetil.org; Mon, 27 Sep 2021 10:11:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55420) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mUr8s-0000tX-IZ for guix-patches@gnu.org; Mon, 27 Sep 2021 09:58:07 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:58848) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mUr8s-00047j-B6 for guix-patches@gnu.org; Mon, 27 Sep 2021 09:58:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mUr8s-0004cq-AQ for guix-patches@gnu.org; Mon, 27 Sep 2021 09:58:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50847] [PATCH 5/5] gnu: Add ydotool. References: <87wnn2ruq9.fsf@posteo.org> In-Reply-To: <87wnn2ruq9.fsf@posteo.org> Resent-From: Alexandr Vityazev Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 27 Sep 2021 13:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50847 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 50847@debbugs.gnu.org Received: via spool by 50847-submit@debbugs.gnu.org id=B50847.163275103017684 (code B ref 50847); Mon, 27 Sep 2021 13:58:02 +0000 Received: (at 50847) by debbugs.gnu.org; 27 Sep 2021 13:57:10 +0000 Received: from localhost ([127.0.0.1]:42161 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mUr7v-0004az-UB for submit@debbugs.gnu.org; Mon, 27 Sep 2021 09:57:10 -0400 Received: from mout02.posteo.de ([185.67.36.66]:38629) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mUr7t-0004aM-4s for 50847@debbugs.gnu.org; Mon, 27 Sep 2021 09:57:02 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id 64890240103 for <50847@debbugs.gnu.org>; Mon, 27 Sep 2021 15:56:55 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.org; s=2017; t=1632751015; bh=RV0Uoeetz87i9GZvGiiuQGn/BK+0rX4uXGS8GjIZypI=; h=From:To:Subject:Date:From; b=VqLJiQUrhXjSxoyKPrBssd0NjezRIqmkGbOZq/tSXlB9TpzW5olRIuoY5tp4FJI84 cHxM9UzX+sYv6/rcwD0EdE3h1LA+1vJF+SVOzX6G4+q7klKAfF190347UkINev5Mu3 56uqMszni+nUsrbpF/0u2DOqeaZljV4a3fQxIEkRrftpWZmQB3FlYHiaWFJBKI21nx oI6TbIsOaomJYpke49qwIkYvCr3TO6puNyMAgl/VqsnGAcmXUKu4dK3QV/wtARW8GS FpdsXp+m3AHWSVAGzVbm7F11NnoGZGdX5Pl2yBxGsS/rFH8JW2gRvv6gqIpHs/SUSj NwznvHeH/qjHQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4HJ41y5gWhz6tm9 for <50847@debbugs.gnu.org>; Mon, 27 Sep 2021 15:56:54 +0200 (CEST) From: Alexandr Vityazev Date: Mon, 27 Sep 2021 13:57:01 +0000 Message-ID: <87pmsuruj6.fsf@posteo.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1632751874; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=aqefwjBsYKnJsmVTGq8mAd0Dsa2Gc0ze4IHMb1uPMLQ=; b=o7J3+QYu8LhT56DFjfbzPM+eBfgka4mNQREPxR/MG2cTzcRcq3Tkn6s2KKSfwOWKYhuK7y 5vGcEiusCI2XehKw00GCaYYXBFwb6/CUa9DXtTQkcBZwsdlmWh/LqoSaXvrquu/VYGyuXH fv8pylSVJAgKdY7piHaMJqSDv3ANwPTEZ3nm5ssYii0s2CHkyal5q8F9q34zJRs9yDXc+D l8st+RldExdUgQYz7+GINui8vQATJ8ieRwCFnu5Xu64zfq684XwjBSIMatE/HELW7kdsm/ dh612LNAJICGbSpHy8gj6ZQNHFsQMmQYYE67WQx9GRw2nJo8snxiiZHvF7Nh6w== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1632751874; a=rsa-sha256; cv=none; b=t6e9NPuIEeZX9oRhofRuz7uMtvLz3+6asTF5Wd3d0YSio9gJaDwqAtdvcoFFBAnAUqkiWP QShgXr0yfJJhNz/SxfL8RcZfmewUv7Bweet8lzyGIBL4vLVNo2tp/BrjCZ0MN52O9r3fAI wZWBOaf+Jb88g9XwX1q+hy/jAb/13km07BoMZQJFZu6kQ4vukW7AgvQm7UmqHIMpYAu9Px l5215Sj4eXvnh6u7UJ5y9Yjpj7p1wCSHRrNG1SkIr5zDuUhJokqaQSOU36KByecbRodaIW nR/4ab1YP2//Ik7eL6Ixz5wXpQUROfBLsmeSPuxEqv/8BLRsZEfX5phBeUtz6w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=posteo.org header.s=2017 header.b=VqLJiQUr; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -1.89 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=posteo.org header.s=2017 header.b=VqLJiQUr; dmarc=fail reason="SPF not aligned (strict)" header.from=posteo.org (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: D1AB168D0 X-Spam-Score: -1.89 X-Migadu-Scanner: scn1.migadu.com X-TUID: vTvVeUcHbuHT * gnu/packages/linux.scm (ydotool): New variable. * gnu/packages/patches/ydotool-cmakelists-remove-cpm.patch: NEW FILE. * gnu/local.mk: Add ydotool-cmakelists-remove-cpm.patch to dist_patch_DATA. --- gnu/local.mk | 2 + gnu/packages/linux.scm | 36 ++++++ .../ydotool-cmakelists-remove-cpm.patch | 118 ++++++++++++++++++ 3 files changed, 156 insertions(+) create mode 100644 gnu/packages/patches/ydotool-cmakelists-remove-cpm.patch diff --git a/gnu/local.mk b/gnu/local.mk index b8ae060326..9efe2d18e9 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -44,6 +44,7 @@ # Copyright =C2=A9 2021 Arun Isaac # Copyright =C2=A9 2021 Sharlatan Hellseher # Copyright =C2=A9 2021 Dmitry Polyakov +# Copyright =C2=A9 2021 Alexandr Vityazev # # This file is part of GNU Guix. # @@ -1902,6 +1903,7 @@ dist_patch_DATA =3D \ %D%/packages/patches/xsane-fix-snprintf-buffer-length.patch \ %D%/packages/patches/xsane-support-ipv6.patch \ %D%/packages/patches/xsane-tighten-default-umask.patch \ + %D%/packages/patches/ydotool-cmakelists-remove-cpm.patch \ %D%/packages/patches/yggdrasil-extra-config.patch \ %D%/packages/patches/ytfzf-programs.patch \ %D%/packages/patches/ytfzf-updates.patch \ diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 41b6dfd022..e260c1ee4c 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -52,6 +52,7 @@ ;;; Copyright =C2=A9 2020 pukkamustard ;;; Copyright =C2=A9 2021 B. Wilson ;;; Copyright =C2=A9 2021 Ivan Gankevich +;;; Copyright =C2=A9 2021 Alexandr Vityazev ;;; ;;; This file is part of GNU Guix. ;;; @@ -145,6 +146,7 @@ #:use-module (gnu packages rsync) #:use-module (gnu packages selinux) #:use-module (gnu packages swig) + #:use-module (gnu packages cpp) #:use-module (guix build-system cmake) #:use-module (guix build-system gnu) #:use-module (guix build-system go) @@ -8524,6 +8526,40 @@ These trace events are logged in @file{/sys/kernel/d= ebug/tracing} and reported through standard log mechanisms like syslog.") (license license:gpl2))) =20 +(define-public ydotool + (package + (name "ydotool") + (version "0.2.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/ReimuNotMoe/ydotool") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "17mgg9cqw4wjkmp9k6c8kgm7v2bvri5y49giqkbs6l2hv6ap5m9a")) + (patches (search-patches "ydotool-cmakelists-remove-cpm.patch")))) + (build-system cmake-build-system) + (arguments + `(#:tests? #f ;No tests + #:configure-flags + (let* ((out (assoc-ref %outputs "out"))) + (list (string-append "-DCMAKE_INSTALL_MANDIR=3D" out "/share/man") + (string-append "-DCMAKE_INSTALL_SYSCONFDIR=3D" out "/etc"))= ))) + (inputs + `(("libuinputplus" ,libuinputplus) + ("libevdevplus" ,libevdevplus) + ("cxxopts" ,cxxopts-next) + ("iodash" ,iodash) + ("scdoc" ,scdoc))) + (home-page "https://github.com/ReimuNotMoe/ydotool") + (synopsis "Generic Linux command-line automation tool (no X!)") + (description "@code{ydotool} is a Linux command-line tool that simulat= es +keyboard input, mouse actions, etc. programmatically or manually.") + (license license:agpl3+))) + (define-public libgpiod (package (name "libgpiod") diff --git a/gnu/packages/patches/ydotool-cmakelists-remove-cpm.patch b/gnu= /packages/patches/ydotool-cmakelists-remove-cpm.patch new file mode 100644 index 0000000000..42ee38fd94 --- /dev/null +++ b/gnu/packages/patches/ydotool-cmakelists-remove-cpm.patch @@ -0,0 +1,118 @@ +From f68869deba8b71ff77cc0a2acd22eb449a61f7e9 Mon Sep 17 00:00:00 2001 +From: Alexandr Vityazev +Date: Sat, 25 Sep 2021 23:15:15 +0300 +Subject: [PATCH] CMakeLists: remove CPM. + +- CMakeLists: remove CPM, remove linking cxxopts - header-only library, +- add targets to install binaries; +- ADD: Daemon/80-uinput.rules, Daemon/CMakeLists, manpage/CMakeLists. + +--- + CMakeLists.txt | 48 ++++++------------------------------------ + Daemon/80-uinput.rules | 1 + + Daemon/CMakeLists.txt | 1 + + manpage/CMakeLists.txt | 9 ++++++++ + 4 files changed, 17 insertions(+), 42 deletions(-) + create mode 100644 Daemon/80-uinput.rules + create mode 100644 Daemon/CMakeLists.txt + create mode 100644 manpage/CMakeLists.txt + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 3dd15bf..8a882c5 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -3,41 +3,6 @@ project(ydotool) + + set(CMAKE_CXX_STANDARD 17) + +-set(CPM_DOWNLOAD_VERSION 0.27.5) +-set(CPM_DOWNLOAD_LOCATION "${CMAKE_BINARY_DIR}/cmake/CPM_${CPM_DOWNLOAD_V= ERSION}.cmake") +- +-if(NOT (EXISTS ${CPM_DOWNLOAD_LOCATION})) +- message(STATUS "Downloading CPM.cmake") +- file(DOWNLOAD https://github.com/TheLartians/CPM.cmake/releases/downl= oad/v${CPM_DOWNLOAD_VERSION}/CPM.cmake ${CPM_DOWNLOAD_LOCATION}) +-endif() +- +-include(${CPM_DOWNLOAD_LOCATION}) +- +-CPMAddPackage( +- NAME IODash +- GITHUB_REPOSITORY YukiWorkshop/IODash +- VERSION 0.1.0 +-) +- +-CPMAddPackage( +- NAME libevdevPlus +- GITHUB_REPOSITORY YukiWorkshop/libevdevPlus +- VERSION 0.2.1 +-) +- +-CPMAddPackage( +- NAME libuInputPlus +- GITHUB_REPOSITORY YukiWorkshop/libuInputPlus +- VERSION 0.2.1 +-) +- +-CPMAddPackage( +- NAME cxxopts +- GITHUB_REPOSITORY jarro2783/cxxopts +- VERSION 3.0.0 +- GIT_TAG 2d8e17c4f88efce80e274cb03eeb902e055a91d3 +-) +- + set(SOURCE_FILES_LIBRARY + CommonIncludes.hpp + Library/Tool.hpp Library/Tool.cpp +@@ -59,15 +24,14 @@ set(SOURCE_FILES_CLIENT + CommonIncludes.hpp + Client/ydotool.cpp Client/ydotool.hpp) + +-include_directories(${libevdevPlus_SOURCE_DIR}) +-include_directories(${libuInputPlus_SOURCE_DIR}) +-include_directories(${IODash_SOURCE_DIR}) +-include_directories(${IODash_SOURCE_DIR}/cpp_modules/portable-endian) # F= IXME +-include_directories(${cxxopts_SOURCE_DIR}/include) +- + add_executable(ydotoold ${SOURCE_FILES_DAEMON}) +-target_link_libraries(ydotoold PUBLIC cxxopts uInputPlus evdevPlus) ++target_link_libraries(ydotoold PUBLIC uInputPlus evdevPlus) ++install(TARGETS ydotoold DESTINATION ${CMAKE_INSTALL_BINDIR}) + + add_library(ydotool_library STATIC ${SOURCE_FILES_LIBRARY}) + add_executable(ydotool ${SOURCE_FILES_CLIENT}) + target_link_libraries(ydotool ydotool_library dl pthread uInputPlus evdev= Plus) ++install(TARGETS ydotool DESTINATION ${CMAKE_INSTALL_BINDIR}) ++ ++add_subdirectory(manpage) ++add_subdirectory(Daemon) +diff --git a/Daemon/80-uinput.rules b/Daemon/80-uinput.rules +new file mode 100644 +index 0000000..fad61d4 +--- /dev/null ++++ b/Daemon/80-uinput.rules +@@ -0,0 +1 @@ ++KERNEL=3D=3D"uinput", GROUP=3D"input", MODE=3D"0660", OPTIONS+=3D"static_= node=3Duinput" +diff --git a/Daemon/CMakeLists.txt b/Daemon/CMakeLists.txt +new file mode 100644 +index 0000000..0f478f8 +--- /dev/null ++++ b/Daemon/CMakeLists.txt +@@ -0,0 +1 @@ ++install(FILES 80-uinput.rules DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/ude= v/rules.d/) +diff --git a/manpage/CMakeLists.txt b/manpage/CMakeLists.txt +new file mode 100644 +index 0000000..c749dfc +--- /dev/null ++++ b/manpage/CMakeLists.txt +@@ -0,0 +1,9 @@ ++function(man_page section page) ++ set(src "${CMAKE_CURRENT_SOURCE_DIR}/${page}.${section}.scd") ++ set(bin "${CMAKE_CURRENT_BINARY_DIR}/${page}.${section}") ++ add_custom_target(${page}.${section} ALL COMMAND scdoc < ${src} > ${bin= }) ++ install(FILES ${bin} DESTINATION ${CMAKE_INSTALL_MANDIR}/man${section}/) ++endfunction(man_page) ++ ++man_page(1 ydotool) ++man_page(8 ydotoold) +-- +2.33.0 --=20 2.33.0 --=20 Alexandr Vityazev