File autocutsel-nightly.spec of Package autocutsel-nightly

# libtool rewrites source paths during compilation, causing find-debuginfo
# to produce an empty debugsourcefiles.list.  Keep debuginfo, skip debugsource.
%global _debugsource_packages 0
%global origname autocutsel

Name:           %{origname}-nightly
Version:        0
Release:        0
Summary:        Synchronize X selections and cutbuffer with mouse-only support (nightly)
License:        GPL-2.0-or-later
Group:          System/X11/Utilities
URL:            https://github.com/Pihaar/%{origname}
Source0:        %{origname}-%{version}.tar.gz
Conflicts:      %{origname}
Provides:       %{origname} = %{version}

BuildRequires:  gcc
BuildRequires:  make
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  libtool

BuildRequires:  pkgconfig(x11)
BuildRequires:  pkgconfig(xt)
BuildRequires:  pkgconfig(xmu)
BuildRequires:  pkgconfig(xext)
BuildRequires:  pkgconfig(libinput)
BuildRequires:  pkgconfig(libudev)
BuildRequires:  libXaw-devel
BuildRequires:  systemd-rpm-macros

%description
autocutsel tracks changes in the server's cutbuffer and clipboard selection,
keeping them synchronized.

This fork adds the -mouseonly option which synchronizes PRIMARY to CLIPBOARD
only when text is selected with the mouse. Keyboard-based selections (e.g.
Shift+Arrow) are ignored, preventing accidental clipboard overwrites in
text editors.

%prep
%autosetup -n %{origname}-%{version}

%build
./bootstrap
%configure --docdir=%{_docdir}/%{origname}
%make_build

%install
%make_install
install -d %{buildroot}%{_docdir}/%{origname}
install -pm 0644 README.md AUTHORS ChangeLog %{buildroot}%{_docdir}/%{origname}/

%check
%make_build check

%files
%license COPYING
%dir %{_docdir}/%{origname}
%{_docdir}/%{origname}/README.md
%{_docdir}/%{origname}/AUTHORS
%{_docdir}/%{origname}/ChangeLog
%dir %{_docdir}/%{origname}/examples
%{_docdir}/%{origname}/examples/mouseonly.args
%{_docdir}/%{origname}/examples/clipboard.args
%{_docdir}/%{origname}/examples/primary.args
%{_bindir}/%{origname}
%{_bindir}/cutsel
%{_mandir}/man1/%{origname}.1*
%{_mandir}/man1/cutsel.1*
%{_prefix}/lib/systemd/user/%{origname}@.service

%changelog
openSUSE Build Service is sponsored by