# Generated by go2rpm 1.19.0 %bcond check 1 # https://git.sr.ht/~geb/dotool %global goipath git.sr.ht/~geb/dotool %global forgeurl https://git.sr.ht/~geb/dotool Version: 1.6 %global tag 1.6 %gometa -L -f Name: dotool Release: %autorelease Summary: Reads actions from stdin and simulates keyboard/mouse input # Generated by go-vendor-tools License: GPL-3.0-only AND MIT URL: %{gourl} Source0: %{gosource} # Generated by go-vendor-tools Source1: %{archivename}-vendor.tar.bz2 Source2: go-vendor-tools.toml BuildRequires: fdupes BuildRequires: go-vendor-tools BuildRequires: scdoc # xkb/xkb.go needs it. BuildRequires: pkgconfig(xkbcommon) %global _description %{expand: dotool reads actions from stdin and simulates keyboard/mouse input using Linux's uinput module. It works system-wide and supports keyboard layout.} %description %{_description} %prep %goprep -p1 tar -xf %{S:1} %generate_buildrequires %go_vendor_license_buildrequires -c %{S:2} %build %global gomodulesmode GO111MODULE=on # Following build.sh here. export GO_LDFLAGS="-X main.Version=%version" %gobuild -o %{gobuilddir}/bin/dotool %{goipath} %install %go_vendor_license_install -c %{S:2} install -m 0755 -vd %{buildroot}%{_bindir} install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ # Just scripts, so no-manual-page-for-binary doesn't apply. install -m 0755 -vp dotool{c,d} %{buildroot}%{_bindir}/ install -m 0755 -vd %{buildroot}%{_prefix}/lib/udev/rules.d install -m 0644 -vp 80-dotool.rules %{buildroot}%{_prefix}/lib/udev/rules.d/ install -m 0755 -vd %{buildroot}%{_mandir}/man1 scdoc < doc/%{name}.1.scd > %{buildroot}%{_mandir}/man1/%{name}.1 # dotool.x86_64: W: files-duplicate /usr/share/licenses/dotool/vendor/git.sr.ht/~geb/opt/LICENSE /usr/share/licenses/dotool/LICENSE %fdupes %{buildroot}%{_datadir}/licenses # As recommended at https://git.sr.ht/~geb/dotool#install-from-source %post udevadm control --reload udevadm trigger %postun udevadm control --reload udevadm trigger %check %go_vendor_license_check -c %{S:2} %if %{with check} %gotest ./... %endif %files -f %{go_vendor_license_filelist} %doc CHANGELOG.md README.md %{_prefix}/lib/udev/rules.d/80-dotool.rules %{_mandir}/man1/%{name}.1* %{_bindir}/%{name}{,c,d} %changelog %autochangelog