The package rpms/ydotool.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/ydotool.git/commit/?id=c36228d6dc....
Change:
+ExcludeArch: s390x
Thanks.
Full change:
============
commit c36228d6dcefab4274d10fe0c19e6a43d8be9a2c
Author: Bob Hepple <bob.hepple(a)gmail.com>
Date: Thu Jan 21 10:09:10 2021 +1000
v0.2.0-2
diff --git a/ydotool.spec b/ydotool.spec
index 3d06de7..16e3e82 100644
--- a/ydotool.spec
+++ b/ydotool.spec
@@ -18,11 +18,26 @@
Name: ydotool
Version: 0.2.0
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Generic command-line automation tool (no X!)
License: AGPLv3, Public Domain
URL: %github_url/ReimuNotMoe/%{name}
+# lacks support for TCGETS2:
+ExcludeArch: ppc64le
+
+# failure in rpmbuild toolchain:
+# Checking for unpackaged file(s): /usr/lib/rpm/check-files
/builddir/build/BUILDROOT/ydotool-0.2.0-1.fc34.s390x
+# Child return code was: -11
+# EXCEPTION: [Error()]
+# Traceback (most recent call last):
+# File "/usr/lib/python3.9/site-packages/mockbuild/trace_decorator.py", line
93, in trace
+# result = func(*args, **kw)
+# File "/usr/lib/python3.9/site-packages/mockbuild/util.py", line 600, in
do_with_status
+# raise exception.Error("Command failed: \n # %s\n%s" % (command, output),
child.returncode)
+# mockbuild.exception.Error: Command failed:
+ExcludeArch: s390x
+
Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
Source1:
%{github_url}/YukiWorkshop/%{iodash_name}/archive/v%{iodash_version}/%(c=%{iodash_name};
echo ${c,,})-%{iodash_version}.tar.gz
Source2:
%{github_url}/YukiWorkshop/%{libevdevplus_name}/archive/v%{libevdevplus_version}/%{libevdevplus_name}-%{libevdevplus_version}.tar.gz
@@ -79,15 +94,12 @@ gzip -dc %{S:4} | tar xf -
gzip -dc %{S:5} | tar xf -
# this is missing from IODash - I have logged a bug report upstream
+#
https://github.com/YukiWorkshop/IODash/issues/1
# it is licenced 'public domain':
cp %{S:6} %{iodash_name}-%{iodash_version}/portable-endian.h
%build
-cmake -S . -B %{_vpath_builddir} -DCMAKE_C_FLAGS_RELEASE:STRING=-DNDEBUG \
--DCMAKE_CXX_FLAGS_RELEASE:STRING=-DNDEBUG -DCMAKE_Fortran_FLAGS_RELEASE:STRING=-DNDEBUG
\
--DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DCMAKE_INSTALL_PREFIX:PATH=/usr
-DINCLUDE_INSTALL_DIR:PATH=/usr/include \
--DLIB_INSTALL_DIR:PATH=/usr/lib64 -DSYSCONF_INSTALL_DIR:PATH=/etc \
--DSHARE_INSTALL_PREFIX:PATH=/usr/share -DLIB_SUFFIX=64 \
+%cmake -DBUILD_SHARED_LIBS:BOOL=OFF \
-DCPM_%{iodash_name}_SOURCE=$PWD/%{iodash_name}-%{iodash_version} \
-DCPM_%{libevdevplus_name}_SOURCE=$PWD/%{libevdevplus_name}-%{libevdevplus_version} \
-DCPM_%{libuinputplus_name}_SOURCE=$PWD/%{libuinputplus_name}-%{libuinputplus_version} \
@@ -126,6 +138,9 @@ scdoc < manpage/%{name}d.8.scd >
%{buildroot}/%{_mandir}/man8/%{name}d.8
%{_mandir}/man8/%{name}d.8.*
%changelog
+* Wed Jan 20 2021 Bob Hepple <bob.hepple(a)gmail.com> - 0.2.0-2
+- rebuilt excluding s390x and ppc64le
+
* Mon Jan 11 2021 Bob Hepple <bob.hepple(a)gmail.com> - 0.2.0-1
- new version
- upstream has dropped the idea of -devel libraries so we are only
commit e8cf31bfd5e97e361c19d1d9aa18bde66f8b5d20
Author: Bob Hepple <bob.hepple(a)gmail.com>
Date: Thu Jan 21 08:57:52 2021 +1000
New version
diff --git a/.gitignore b/.gitignore
index ba1299f..bcaabcb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,7 @@
/ydotool-0.1.9.tar.gz
+/cpm.cmake-0.27.5.tar.gz
+/cxxopts-2d8e17c4f88efce80e274cb03eeb902e055a91d3.tar.gz
+/iodash-0.1.0.tar.gz
+/libevdevPlus-0.2.1.tar.gz
+/libuInputPlus-0.2.1.tar.gz
+/ydotool-0.2.0.tar.gz
diff --git a/portable_endian.h b/portable_endian.h
new file mode 100644
index 0000000..e89694a
--- /dev/null
+++ b/portable_endian.h
@@ -0,0 +1,118 @@
+// "License": Public Domain
+// I, Mathias Panzenböck, place this file hereby into the public domain. Use it at your
own risk for whatever you like.
+// In case there are jurisdictions that don't support putting things in the public
domain you can also consider it to
+// be "dual licensed" under the BSD, MIT and Apache licenses, if you want to.
This code is trivial anyway. Consider it
+// an example on how to get the endian conversion functions on different platforms.
+
+#ifndef PORTABLE_ENDIAN_H__
+#define PORTABLE_ENDIAN_H__
+
+#if (defined(_WIN16) || defined(_WIN32) || defined(_WIN64)) &&
!defined(__WINDOWS__)
+
+# define __WINDOWS__
+
+#endif
+
+#if defined(__linux__) || defined(__CYGWIN__)
+
+# include <endian.h>
+
+#elif defined(__APPLE__)
+
+# include <libkern/OSByteOrder.h>
+
+# define htobe16(x) OSSwapHostToBigInt16(x)
+# define htole16(x) OSSwapHostToLittleInt16(x)
+# define be16toh(x) OSSwapBigToHostInt16(x)
+# define le16toh(x) OSSwapLittleToHostInt16(x)
+
+# define htobe32(x) OSSwapHostToBigInt32(x)
+# define htole32(x) OSSwapHostToLittleInt32(x)
+# define be32toh(x) OSSwapBigToHostInt32(x)
+# define le32toh(x) OSSwapLittleToHostInt32(x)
+
+# define htobe64(x) OSSwapHostToBigInt64(x)
+# define htole64(x) OSSwapHostToLittleInt64(x)
+# define be64toh(x) OSSwapBigToHostInt64(x)
+# define le64toh(x) OSSwapLittleToHostInt64(x)
+
+# define __BYTE_ORDER BYTE_ORDER
+# define __BIG_ENDIAN BIG_ENDIAN
+# define __LITTLE_ENDIAN LITTLE_ENDIAN
+# define __PDP_ENDIAN PDP_ENDIAN
+
+#elif defined(__OpenBSD__)
+
+# include <sys/endian.h>
+
+#elif defined(__NetBSD__) || defined(__FreeBSD__) || defined(__DragonFly__)
+
+# include <sys/endian.h>
+
+# define be16toh(x) betoh16(x)
+# define le16toh(x) letoh16(x)
+
+# define be32toh(x) betoh32(x)
+# define le32toh(x) letoh32(x)
+
+# define be64toh(x) betoh64(x)
+# define le64toh(x) letoh64(x)
+
+#elif defined(__WINDOWS__)
+
+# include <winsock2.h>
+# include <sys/param.h>
+
+# if BYTE_ORDER == LITTLE_ENDIAN
+
+# define htobe16(x) htons(x)
+# define htole16(x) (x)
+# define be16toh(x) ntohs(x)
+# define le16toh(x) (x)
+
+# define htobe32(x) htonl(x)
+# define htole32(x) (x)
+# define be32toh(x) ntohl(x)
+# define le32toh(x) (x)
+
+# define htobe64(x) htonll(x)
+# define htole64(x) (x)
+# define be64toh(x) ntohll(x)
+# define le64toh(x) (x)
+
+# elif BYTE_ORDER == BIG_ENDIAN
+
+ /* that would be xbox 360 */
+# define htobe16(x) (x)
+# define htole16(x) __builtin_bswap16(x)
+# define be16toh(x) (x)
+# define le16toh(x) __builtin_bswap16(x)
+
+# define htobe32(x) (x)
+# define htole32(x) __builtin_bswap32(x)
+# define be32toh(x) (x)
+# define le32toh(x) __builtin_bswap32(x)
+
+# define htobe64(x) (x)
+# define htole64(x) __builtin_bswap64(x)
+# define be64toh(x) (x)
+# define le64toh(x) __builtin_bswap64(x)
+
+# else
+
+# error byte order not supported
+
+# endif
+
+# define __BYTE_ORDER BYTE_ORDER
+# define __BIG_ENDIAN BIG_ENDIAN
+# define __LITTLE_ENDIAN LITTLE_ENDIAN
+# define __PDP_ENDIAN PDP_ENDIAN
+
+#else
+
+# error platform not supported
+
+#endif
+
+#endif
diff --git a/sources b/sources
index 528dfc2..4a8e373 100644
--- a/sources
+++ b/sources
@@ -1 +1,6 @@
-SHA512 (ydotool-0.1.9.tar.gz) =
2e1a303e29b781a1183e5293291170f32a8b74b1464a0277af8a7c3521b4c72a5fd4012e789acc8591419db5da20d42e3becd6ba4b2a06fe7af8e86c064cc169
+SHA512 (cpm.cmake-0.27.5.tar.gz) =
ef3a8dac77c189f0e612acc714e27464a075b86ba3454fe3410ab043a221d0a11ccd4654b9b1d3f4b33fc7a0f0fd64a1e30322a0552e3fc13528e33b82f1b350
+SHA512 (cxxopts-2d8e17c4f88efce80e274cb03eeb902e055a91d3.tar.gz) =
ff26b941bdbae999b0d476f62d4a3c0c66aee2f1dac7bd4c1e05380532fbf93b462a2355d809a89eddb2d52aa8a6c7c31625a7fa442deca494e3358fa95ea009
+SHA512 (iodash-0.1.0.tar.gz) =
3ef05b5d909276c2e1be4619d0b075fcf001b5577939234f4952dd43b81f8806089d6e5d20dbe04743e3bd0c586f659709814cd0a4eb6938ebec4f727ff617ac
+SHA512 (libevdevPlus-0.2.1.tar.gz) =
2cf4725c491631f25263d27d07722e85ddd2c4489426fd3842c75ca84e697765003083262b565d85d232f178684fae52f0f2ca3d5c89a3c0d1655d9f08a8d3d3
+SHA512 (libuInputPlus-0.2.1.tar.gz) =
aeaa23c4b5631ddc0c9a54507d4cecb38d8b792015aa636d37bab3dbc3fa1229a6a02297d4c7c0d922fa512c3e3a8429b32a2432f06e1ceaeed1a91c857731cd
+SHA512 (ydotool-0.2.0.tar.gz) =
e4c78e4958b49b6b03a34f9624363cb83ca918b07e530c354c0a3495b4950d41fb5871cf646872f2bd17044db747effefb11ae9353b059fe3893f1fb7c87f286
diff --git a/ydotool-cpm.cmake.patch b/ydotool-cpm.cmake.patch
new file mode 100644
index 0000000..ac9643a
--- /dev/null
+++ b/ydotool-cpm.cmake.patch
@@ -0,0 +1,12 @@
+diff -ruN ydotool-0.2.0-orig/CMakeLists.txt ydotool-0.2.0/CMakeLists.txt
+--- ydotool-0.2.0-orig/CMakeLists.txt 2021-01-09 19:31:54.000000000 +1000
++++ ydotool-0.2.0/CMakeLists.txt 2021-01-18 16:24:57.479830987 +1000
+@@ -4,7 +4,7 @@
+ set(CMAKE_CXX_STANDARD 17)
+
+ set(CPM_DOWNLOAD_VERSION 0.27.5)
+-set(CPM_DOWNLOAD_LOCATION
"${CMAKE_BINARY_DIR}/cmake/CPM_${CPM_DOWNLOAD_VERSION}.cmake")
++set(CPM_DOWNLOAD_LOCATION
"CPM.cmake-${CPM_DOWNLOAD_VERSION}/cmake/CPM.cmake")
+
+ if(NOT (EXISTS ${CPM_DOWNLOAD_LOCATION}))
+ message(STATUS "Downloading CPM.cmake")
diff --git a/ydotool-new-man-pages.patch b/ydotool-new-man-pages.patch
new file mode 100644
index 0000000..cd73745
--- /dev/null
+++ b/ydotool-new-man-pages.patch
@@ -0,0 +1,234 @@
+diff -ruN ydotool-0.2.0-orig/manpage/ydotool.1.scd ydotool-0.2.0/manpage/ydotool.1.scd
+--- ydotool-0.2.0-orig/manpage/ydotool.1.scd 2021-01-09 19:31:54.000000000 +1000
++++ ydotool-0.2.0/manpage/ydotool.1.scd 2021-01-20 18:35:11.920031708 +1000
+@@ -6,14 +6,16 @@
+
+ # SYNOPSIS
+
+-*ydotool* *cmd* _args..._
++*ydotool* *cmd* _args_ [ , *cmd* _args_ ... ]
+
+-*ydotool* *cmd* --help\fR
++*ydotool* *cmd* --help
+
+ # DESCRIPTION
+
+ *ydotool* lets you programmatically (or manually) simulate keyboard input and mouse
activity, etc. It does this by writing directly to _/dev/uinput_ so it generally needs to
run as root.
+
++It's possible to chain multiple commands together, separated by a comma between two
spaces.
++
+ Currently implemented command(s):
+
+ *type*
+@@ -22,19 +24,15 @@
+ Press keys
+ *mousemove*
+ Move mouse pointer to absolute position
+-*mousemove_relative*
+- Move mouse pointer to relative position
+ *click*
+ Click on mouse buttons
+ *recorder*
+ Record/replay input events
+-*mouseup*
+- Send a mouse up event.
+-*mousedown*
+- Send a mouse down event.
++*sleep*
++ sleep for a while
+
+ # KEYBOARD COMMANDS
+-*key* [*--up*] [*--down*] [*--delay* _<ms>_] [*--key-delay* _<ms>_]
[*--repeat* _<times>_] [*--repeat-delay <ms>*] [*--persist-delay <ms>*]
_<key sequence>_
++*key* [*--up*] [*--down*] [*--next-delay* _<ms>_] [*--key-delay* _<ms>_]
[*--repeat* _<times>_] [*--repeat-delay <ms>*] _<key sequence>_
+
+ Type a given keystroke. Examples being "alt+r", "ctrl+J",
+ "ctrl+alt+n", "backspace".
+@@ -59,12 +57,10 @@
+ *--repeat-delay* _<ms>_
+ Delay time between repetitions. Default 0ms.
+
+- *--persist-delay* _<ms>_
+- Keep virtual device alive for _<ms>_ ms. Should be used in conjunction with
*--down* or *--up*
+-
+ Generally, any valid name from _/usr/include/linux/input-event-codes.h_ will work.
Multiple keys are separated by '+'.
+
+ Each key sequence can be any number of modifiers and keys, separated by plus (+)
++
+ For example: alt+r Alt+F4 CTRL+alt+f3 aLT+1+2+3 ctrl+Backspace
+
+ Since we are emulating keyboard input, combinations like Shift+# is invalid because
typing a `#' involves pressing Shift and 3.
+@@ -75,20 +71,20 @@
+ Example: Close a window in graphical environment:
+ ydotool key Alt+F4
+
+-*type* [*--delay* _<ms>_] [*--key-delay* _<ms>_] [*--args* _<N>_]
[*--file* _<filepath>_] "_something to type_"
++*type* [*--next-delay* _<ms>_] [*--key-delay* _<ms>_] [*--texts* _arg_]
[*--file* _<filepath>_] "_texts_"
+
+ Types text as if you had typed it on the keyboard.
+
+ Options:
+
+- *--delay* _<ms>_
++ *--next-delay* _<ms>_
+ Delay before starting typing. Default 100ms.
+
+ *--key-delay* _<ms>_
+ Delay time between keystrokes. Default 12ms.
+
+- *--args* _<N>_
+- ????
++ *--texts* _arg_
++ Texts to type
+
+ *--file* _<filepath>_
+ Specify a file, the contents of which will be typed as if passed as an argument. The
filepath may also be '-' to read from stdin.
+@@ -98,43 +94,39 @@
+
+ # MOUSE COMMANDS
+
+-*mousemove* [*--delay* _<ms>_] _<x> <y>_
+- Move the mouse to the specific X and Y coordinates on the screen.
++*mousemove* _<x> <y>_
++ Move the mouse to the specific relative X and Y coordinates on the screen.
+
+ Options:
+- *--delay* _<ms>_
+- Delay before starting move. Default 100ms.
++ *--absolute*
++ Use absolute position
+
+ Example: to move the cursor to absolute coordinates (100,100):
+- ydotool mousemove 100 100
++ ydotool mousemove --absolute 100 100
+
+-*mousemove_relative* [*--delay* _<ms>_] _<x>_ _<y>_
+- Move the mouse x,y pixels relative to the current position of the mouse cursor.
++*click* [*--next-delay* _<ms>_] _button_
++ Send a click. Buttons are: _left_, _right_ or _middle_
+
+ Options:
+- *--delay* _<ms>_
+- Delay before starting move. Default 100ms.
+
+- Example: Relatively move mouse pointer to -100,100:
+- ydotool mousemove_relative -- -100 100
++ *--next-delay* _<ms>_
++ Delay before click. Default 100ms.
+
+-*click* [*--delay* _<ms>_] _button_
+- Send a click. Buttons are: 1=left 2=right 3=middle
++ *--up*
++ Only mouseup
+
+- Options:
+-
+- *--delay* _<ms>_
+- Delay before click. Default 100ms.
++ *--down*
++ Only mousedown
+
+- Example: Mouse right click:
+- ydotool click 2
++ *--buttons* _<arg>_
++ Buttons to press (left, right, middle)
+
+-*recorder* [*--delay* _<ms>_] [*--record* _<devices>_] [*--replay*
_<input files>_] [*--display*] [*--duration* _<ms>_]
++ Example: Mouse middle click:
++ ydotool click middle
+
+- Options:
++*recorder* [*--record* _<devices>_] [*--replay* _<input files>_]
[*--display*] [*--duration* _<ms>_] [*--devices* _<path>_] [*--file*
_<path>_]
+
+- *--delay* _<ms>_
+- Delay time before start recording/replaying. Default 5000ms.
++ Options:
+
+ *--record* _<devices>_
+ Devices to record from. Default is all, including non-keyboard devices.
+@@ -143,32 +135,16 @@
+ The record file can't be replayed on an architecture with different endianness.
+
+ *--display*
+- ????
++ Display
+
+ *--duration* _<ms>_
+ Record duration. Otherwise use SIGINT to stop recording.
+
+-*mouseup* [*--delay* _<ms>_] _button_
+- Send a mouse up event. Buttons are: 1=left 2=right 3=middle
+-
+- Options:
+-
+- *--delay* _<ms>_
+- Delay before click. Default 100ms.
+-
+- Example: Mouse right click:
+- ydotool click 2
+-
+-*mousedown* [*--delay* _<ms>_] _button_
+- Send a mouse down event. Buttons are: 1=left 2=right 3=middle
+-
+- Options:
+-
+- *--delay* _<ms>_
+- Delay before click. Default 100ms.
++ *--devices* _<path>_
++ Devices, separated by comma, to record from. Default is all devices (default:
"")
+
+- Example: Mouse right click:
+- ydotool click 2
++ *--file* _<path>_
++ File to record to / replay from
+
+ # AUTHOR
+
+@@ -184,8 +160,8 @@
+
+ In order to solve this problem, there is a persistent background service, *ydotoold*(1),
to hold a persistent virtual device, and accept input from *ydotool*(1). When
*ydotoold*(1) is unavailable, *ydotool*(1) will work without it.
+
+-# COPYRIGHT
+-MIT License
++# LICENCE
++AGPLv3
+
+ # SEE ALSO
+
+diff -ruN ydotool-0.2.0-orig/manpage/ydotoold.8.scd ydotool-0.2.0/manpage/ydotoold.8.scd
+--- ydotool-0.2.0-orig/manpage/ydotoold.8.scd 2021-01-09 19:31:54.000000000 +1000
++++ ydotool-0.2.0/manpage/ydotoold.8.scd 2021-01-20 18:33:48.815128767 +1000
+@@ -6,7 +6,7 @@
+
+ # SYNOPSIS
+
+-*ydotoold*
++*ydotoold* _[OPTION...]_
+
+ # DESCRIPTION
+
+@@ -20,15 +20,23 @@
+
+ In order to solve this problem, the *ydotoold* background service holds a persistent
virtual device, and accepts input from *ydotool*(1). When *ydotoold*(1) is unavailable,
*ydotool*(1) will work without it.
+
++# OPTIONS
++
++ *--socket-path arg* _<path>_
++ Socket path (default: /tmp/.ydotool_socket)
++
++ *--socket-perm arg* _<perms>_
++ Socket permission (default: 0600)
++
+ # AUTHOR
+
+ *ydotool*(1) and *ydotoold*(8) were written by ReimuNotMoe.
+
+ This man page by bob.hepple(a)gmail.com
+
+-# COPYRIGHT
++# LICENCE
+
+-MIT License
++AGPLv3
+
+ # SEE ALSO
+
diff --git a/ydotool-patch1-cmakelist.patch b/ydotool-patch1-cmakelist.patch
deleted file mode 100644
index a9acaa6..0000000
--- a/ydotool-patch1-cmakelist.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-diff -ruN ydotool-787fd2549dc0972895a94e4b0964389296608922-orig/CMakeLists.txt
ydotool-787fd2549dc0972895a94e4b0964389296608922/CMakeLists.txt
---- ydotool-787fd2549dc0972895a94e4b0964389296608922-orig/CMakeLists.txt 2020-08-09
19:35:43.000000000 +1000
-+++ ydotool-787fd2549dc0972895a94e4b0964389296608922/CMakeLists.txt 2020-08-15
12:12:12.786053240 +1000
-@@ -2,11 +2,11 @@
- project(ydotool)
-
- set(CMAKE_CXX_STANDARD 14)
--set(PROJECT_VERSION "0.1.5")
-+set(PROJECT_VERSION "0.1.9")
- set(CPACK_PACKAGE_VERSION ${PROJECT_VERSION})
- set(CPACK_PACKAGE_VERSION_MAJOR "0")
- set(CPACK_PACKAGE_VERSION_MINOR "1")
--set(CPACK_PACKAGE_VERSION_PATCH "5")
-+set(CPACK_PACKAGE_VERSION_PATCH "9")
- set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Generic Linux command-line automation tool
(no X!)")
- set(CPACK_PACKAGE_CONTACT "Reimu NotMoe
<
https://github.com/ReimuNotMoe>")
- set(CMAKE_PROJECT_HOMEPAGE_URL "https://github.com/ReimuNotMoe/ydotool")
-@@ -17,6 +17,7 @@
- set(CPACK_DEBIAN_COMPRESSION_TYPE "xz")
- set(CPACK_GENERATOR "DEB;RPM;TXZ")
- set(CPACK_SOURCE_GENERATOR "DEB;RPM;TXZ")
-+set(STATIC_BUILD "no")
- include(CPack)
-
- include(GNUInstallDirs)
-@@ -53,6 +54,8 @@
- if (NOT DEFINED DYNAMIC_BUILD OR (${DYNAMIC_BUILD}))
- add_library(ydotool_library SHARED ${SOURCE_FILES_LIBRARY})
- set_target_properties(ydotool_library PROPERTIES OUTPUT_NAME ydotool)
-+ set_target_properties(ydotool_library PROPERTIES VERSION ${PROJECT_VERSION})
-+ set_target_properties(ydotool_library PROPERTIES SOVERSION
${CPACK_PACKAGE_VERSION_MAJOR})
- target_link_libraries(ydotool_library dl boost_program_options uInputPlus
evdevPlus)
-
- add_executable(ydotoold ${SOURCE_FILES_DAEMON})
diff --git a/ydotool.spec b/ydotool.spec
index 9f459f6..3d06de7 100644
--- a/ydotool.spec
+++ b/ydotool.spec
@@ -1,31 +1,41 @@
# -*-Mode: rpm-spec-mode; -*-
%undefine __cmake_in_source_build
-%global commit 787fd2549dc0972895a94e4b0964389296608922
-%global shortcommit %(c=%{commit}; echo ${c:0:7})
+
+%global github_url
https://github.com
+%global iodash_name IODash
+%global iodash_version 0.1.0
+%global libevdevplus_name libevdevPlus
+%global libevdevplus_version 0.2.1
+%global libuinputplus_name libuInputPlus
+%global libuinputplus_version 0.2.1
+%global cxxopts_name cxxopts
+%global cxxopts_version 3.0.0
+%global cxxopts_commit 2d8e17c4f88efce80e274cb03eeb902e055a91d3
+%global cpm_cmake_name cpm.cmake
+%global cpm_cmake_version 0.27.5
+%global debug_package %{nil}
Name: ydotool
-Version: 0.1.9
-Release: 0.4.20200815.git.%{shortcommit}%{?dist}
+Version: 0.2.0
+Release: 1%{?dist}
Summary: Generic command-line automation tool (no X!)
-License: MIT
-URL:
https://github.com/ReimuNotMoe/ydotool
-Source0: %{url}/archive/%{commit}/%{name}-%{version}.tar.gz
+License: AGPLv3, Public Domain
+URL: %github_url/ReimuNotMoe/%{name}
-# This patch removes the static elements from the build and applies a
-# version number to the shared library. To this date, upstream has
-# not responded to a request to do this:
-#
https://github.com/ReimuNotMoe/ydotool/issues/60
+Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
+Source1:
%{github_url}/YukiWorkshop/%{iodash_name}/archive/v%{iodash_version}/%(c=%{iodash_name};
echo ${c,,})-%{iodash_version}.tar.gz
+Source2:
%{github_url}/YukiWorkshop/%{libevdevplus_name}/archive/v%{libevdevplus_version}/%{libevdevplus_name}-%{libevdevplus_version}.tar.gz
+Source3:
%{github_url}/YukiWorkshop/%{libuinputplus_name}/archive/v%{libuinputplus_version}/%{libuinputplus_name}-%{libuinputplus_version}.tar.gz
+Source4:
%{github_url}/jarro2783/%{cxxopts_name}/archive/%{cxxopts_commit}/%{cxxopts_name}-%{cxxopts_commit}.tar.gz
+Source5:
%{github_url}/TheLartians/%{cpm_cmake_name}/archive/v%{cpm_cmake_version}/%{cpm_cmake_name}-%{cpm_cmake_version}.tar.gz
+Source6:
https://gist.githubusercontent.com/panzi/6856583/raw/1eca2ab34f2301b9641a...
-# Create patch with:
-# diff -rNu -x build ydotool-%%{version}-orig ydotool-%%{version}
-Patch0: ydotool-patch1-cmakelist.patch
+Patch0: ydotool-cpm.cmake.patch
+Patch1: ydotool-new-man-pages.patch
-BuildRequires: boost-devel
BuildRequires: cmake
BuildRequires: gcc-c++
-BuildRequires: pkgconfig(evdevPlus) >= 0.1.1
-BuildRequires: pkgconfig(uInputPlus) >= 0.1.4
BuildRequires: make
BuildRequires: scdoc
BuildRequires: systemd-rpm-macros
@@ -35,46 +45,68 @@ BuildRequires: systemd-rpm-macros
Performs some of the functions of xdotool(1) without requiring X11 -
however, it generally requires root permission (to open /dev/uinput)
+NOTE: changes in this release:
+NOTE: --delay option is now --next-delay
+NOTE: mousemove is now relative unless --absolute is given
+NOTE: mouseup, mousedown, mousemove_relative is removed
+NOTE: click accepts left, right, middle instead of 1, 2, 3
+NOTE: sleep is a new command
+
+SEE: ydotool <cmd> --help for latest info
+
Currently implemented command(s):
- type - Type a string
- key - Press keys
- mousemove - Move mouse pointer to absolute position
-- mousemove_relative - Move mouse pointer to relative position
-- mouseup - Generate mouse up event
-- mousedown - Generate mouse down event
- click - Click on mouse buttons
- recorder - Record/replay input events
+- sleep - sleep ms
-N.B. optionally, you can start the ydotoold daemon with:
+N.B. it is strongly recommended to start the ydotoold daemon with:
- systemctl enable ydotool
- systemctl start ydotool
-%package devel
-Summary: Development files for %{name}
-Requires: %{name}%{?_isa} = %{version}-%{release}
-%description devel
-This package contains header files for %{name}.
-
%prep
-%autosetup -n %{name}-%{commit}
+%setup -q
+%patch0 -p1
+%patch1 -p1
+gzip -dc %{S:1} | tar xf -
+gzip -dc %{S:2} | tar xf -
+gzip -dc %{S:3} | tar xf -
+gzip -dc %{S:4} | tar xf -
+gzip -dc %{S:5} | tar xf -
+
+# this is missing from IODash - I have logged a bug report upstream
+# it is licenced 'public domain':
+cp %{S:6} %{iodash_name}-%{iodash_version}/portable-endian.h
%build
-%cmake
-%cmake_build
+cmake -S . -B %{_vpath_builddir} -DCMAKE_C_FLAGS_RELEASE:STRING=-DNDEBUG \
+-DCMAKE_CXX_FLAGS_RELEASE:STRING=-DNDEBUG -DCMAKE_Fortran_FLAGS_RELEASE:STRING=-DNDEBUG
\
+-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DCMAKE_INSTALL_PREFIX:PATH=/usr
-DINCLUDE_INSTALL_DIR:PATH=/usr/include \
+-DLIB_INSTALL_DIR:PATH=/usr/lib64 -DSYSCONF_INSTALL_DIR:PATH=/etc \
+-DSHARE_INSTALL_PREFIX:PATH=/usr/share -DLIB_SUFFIX=64 \
+-DCPM_%{iodash_name}_SOURCE=$PWD/%{iodash_name}-%{iodash_version} \
+-DCPM_%{libevdevplus_name}_SOURCE=$PWD/%{libevdevplus_name}-%{libevdevplus_version} \
+-DCPM_%{libuinputplus_name}_SOURCE=$PWD/%{libuinputplus_name}-%{libuinputplus_version} \
+-DCPM_%{cxxopts_name}_SOURCE=$PWD/%{cxxopts_name}-%{cxxopts_commit}
+
+make -C %{_vpath_builddir} -j `nproc`
%install
-%cmake_install
-
+mkdir -p %{buildroot}/%{_bindir}
+strip */%{name}
+strip */%{name}d
+install -p -m 0755 */%{name} %{buildroot}/%{_bindir}
+install -p -m 0755 */%{name}d %{buildroot}/%{_bindir}
mkdir -p %{buildroot}/%{_unitdir}
install -p -m 0644 Daemon/%{name}.service %{buildroot}/%{_unitdir}
mkdir -p %{buildroot}/%{_mandir}/man1
mkdir -p %{buildroot}/%{_mandir}/man8
scdoc < manpage/%{name}.1.scd > %{buildroot}/%{_mandir}/man1/%{name}.1
scdoc < manpage/%{name}d.8.scd > %{buildroot}/%{_mandir}/man8/%{name}d.8
-mkdir -p %{buildroot}/%{_includedir}/ydotool
-find . -name '*.hpp' -exec cp --parents {} %{buildroot}/%{_includedir}/ydotool/
';'
%post
%systemd_post %{name}.service
@@ -86,7 +118,6 @@ find . -name '*.hpp' -exec cp --parents {}
%{buildroot}/%{_includedir}/ydotool/
%systemd_postun_with_restart %{name}.service
%files
-%{_libdir}/lib%{name}.so.0*
%{_unitdir}/%{name}.service
%{_bindir}/%{name}*
%license LICENSE
@@ -94,11 +125,14 @@ find . -name '*.hpp' -exec cp --parents {}
%{buildroot}/%{_includedir}/ydotool/
%{_mandir}/man1/%{name}.1.*
%{_mandir}/man8/%{name}d.8.*
-%files devel
-%{_libdir}/lib%{name}.so
-%{_includedir}/%{name}/
-
%changelog
+* Mon Jan 11 2021 Bob Hepple <bob.hepple(a)gmail.com> - 0.2.0-1
+- new version
+- upstream has dropped the idea of -devel libraries so we are only
+ distributing the regular package now; also libevdevPlus-devel and
+ libuInputPlus-devel are no longer needed as they are now compiled
+ in.
+
* Sat Aug 15 2020 Bob Hepple <bob.hepple(a)gmail.com> -
0.1.9-0.4.20200815.git.787fd25
- most recent version