diff --git a/.gitignore b/.gitignore index 6d138a0..ba1299f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,11 +1 @@ /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 -/ydotool-1.0.0.tar.gz -/ydotool-1.0.1.tar.gz -/ydotool-1.0.3.tar.gz -/ydotool-1.0.4.tar.gz diff --git a/sources b/sources index a96e355..528dfc2 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (ydotool-1.0.4.tar.gz) = bbf66d752aa1dce9173c930e3a71bc277b330763b1aa0e38f9fec1976c282c64330251ba5abe222a991f4bcafbabf1312a940eb4b40a34bf99f628c2a41bc4a2 +SHA512 (ydotool-0.1.9.tar.gz) = 2e1a303e29b781a1183e5293291170f32a8b74b1464a0277af8a7c3521b4c72a5fd4012e789acc8591419db5da20d42e3becd6ba4b2a06fe7af8e86c064cc169 diff --git a/ydotool-patch1-cmakelist.patch b/ydotool-patch1-cmakelist.patch new file mode 100644 index 0000000..a9acaa6 --- /dev/null +++ b/ydotool-patch1-cmakelist.patch @@ -0,0 +1,34 @@ +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 ") + 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 f830497..9f459f6 100644 --- a/ydotool.spec +++ b/ydotool.spec @@ -1,21 +1,31 @@ # -*-Mode: rpm-spec-mode; -*- %undefine __cmake_in_source_build - -%global debug_package %{nil} +%global commit 787fd2549dc0972895a94e4b0964389296608922 +%global shortcommit %(c=%{commit}; echo ${c:0:7}) Name: ydotool -Version: 1.0.4 -Release: 9%{?dist} +Version: 0.1.9 +Release: 0.4.20200815.git.%{shortcommit}%{?dist} Summary: Generic command-line automation tool (no X!) -# Automatically converted from old format: AGPLv3 -License: AGPL-3.0-only -URL: https://github.com/ReimuNotMoe/%{name} +License: MIT +URL: https://github.com/ReimuNotMoe/ydotool +Source0: %{url}/archive/%{commit}/%{name}-%{version}.tar.gz -Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz +# 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 +# Create patch with: +# diff -rNu -x build ydotool-%%{version}-orig ydotool-%%{version} +Patch0: ydotool-patch1-cmakelist.patch + +BuildRequires: boost-devel BuildRequires: cmake -BuildRequires: gcc +BuildRequires: gcc-c++ +BuildRequires: pkgconfig(evdevPlus) >= 0.1.1 +BuildRequires: pkgconfig(uInputPlus) >= 0.1.4 BuildRequires: make BuildRequires: scdoc BuildRequires: systemd-rpm-macros @@ -25,31 +35,46 @@ 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) -N.B. it is strongly recommended to start the ydotoold daemon with: +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 + +N.B. optionally, you can 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 -%setup -q +%autosetup -n %{name}-%{commit} %build -%cmake -DBUILD_SHARED_LIBS:BOOL=OFF - -make -C %{_vpath_builddir} -j `nproc` +%cmake +%cmake_build %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} +%cmake_install + mkdir -p %{buildroot}/%{_unitdir} -install -p -m 0644 */%{name}.service %{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 @@ -61,6 +86,7 @@ scdoc < manpage/%{name}d.8.scd > %{buildroot}/%{_mandir}/man8/%{name}d.8 %systemd_postun_with_restart %{name}.service %files +%{_libdir}/lib%{name}.so.0* %{_unitdir}/%{name}.service %{_bindir}/%{name}* %license LICENSE @@ -68,85 +94,11 @@ scdoc < manpage/%{name}d.8.scd > %{buildroot}/%{_mandir}/man8/%{name}d.8 %{_mandir}/man1/%{name}.1.* %{_mandir}/man8/%{name}d.8.* +%files devel +%{_libdir}/lib%{name}.so +%{_includedir}/%{name}/ + %changelog -* Fri Jul 17 2026 Fedora Release Engineering - 1.0.4-9 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild - -* Sat Jan 17 2026 Fedora Release Engineering - 1.0.4-8 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild - -* Fri Jul 25 2025 Fedora Release Engineering - 1.0.4-7 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild - -* Sun Jan 19 2025 Fedora Release Engineering - 1.0.4-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild - -* Sat Jul 20 2024 Fedora Release Engineering - 1.0.4-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild - -* Wed Jul 17 2024 Miroslav Suchý - 1.0.4-4 -- convert license to SPDX - -* Sat Jan 27 2024 Fedora Release Engineering - 1.0.4-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Sat Jul 22 2023 Fedora Release Engineering - 1.0.4-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild - -* Tue Jan 31 2023 Bob Hepple - 1.0.4-1 -- new version - -* Sat Jan 21 2023 Fedora Release Engineering - 1.0.3-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild - -* Thu Jan 12 2023 Bob Hepple - 1.0.3-1 -- new version - -* Sat Jul 23 2022 Fedora Release Engineering - 1.0.1-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild - -* Mon Mar 21 2022 Bob Hepple - 1.0.1-2 -- added new manual (also pushed upstream) - -* Thu Feb 17 2022 Bob Hepple - 1.0.1-1 -- new version - -* Sun Feb 06 2022 Bob Hepple - 1.0.0-2 -- now builds on all architectures without patches - -* Sun Feb 06 2022 Bob Hepple - 1.0.0-1 -- new version - -* Sun Jan 30 2022 Bob Hepple - 0.2.0-8 -- add -Wno-error= flags for FTBFS #2047136 in f36 -- exclude armv7hl as it fails to compile - -* Sat Jan 22 2022 Fedora Release Engineering - 0.2.0-7 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild - -* Fri Jul 23 2021 Fedora Release Engineering - 0.2.0-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild - -* Tue Mar 02 2021 Zbigniew Jędrzejewski-Szmek - 0.2.0-5 -- Rebuilt for updated systemd-rpm-macros - See https://pagure.io/fesco/issue/2583. - -* Thu Jan 28 2021 Fedora Release Engineering - 0.2.0-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild - -* Fri Jan 22 2021 Jonathan Wakely - 0.2.0-3 -- Rebuilt for Boost 1.75 - -* Wed Jan 20 2021 Bob Hepple - 0.2.0-2 -- rebuilt excluding s390x and ppc64le - -* Mon Jan 11 2021 Bob Hepple - 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 - 0.1.9-0.4.20200815.git.787fd25 - most recent version