File Clipboard.spec of Package Clipboard

#
# spec file for package Clipboard
#
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via https://bugs.opensuse.org/
#


Name:           Clipboard
Version:        0.7.0
Release:        0
Summary:        Clipboard manager
License:        GPL-3.0-or-later
URL:            https://getclipboard.app/
Source0:        https://github.com/Slackadays/Clipboard/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.gz
# PATCH-FIX-OPENSUSe Clipboard_plugin_path.patch -- install modules in subdir
Patch0:         Clipboard_plugin_path.patch
%if 0%{?suse_version} > 1500
BuildRequires:  gcc-c++
%else
BuildRequires:  gcc12-c++
%endif
BuildRequires:  cmake
BuildRequires:  pkgconfig(x11)
BuildRequires:  pkgconfig(wayland-client)
BuildRequires:  pkgconfig(wayland-protocols)

%description
Clipboard manager with the following features:
- Copy text, files, directories, pipes, _anything_,
- Get an _infinite_ number of independent clipboards,
- Make persistent clipboards that stick around just for you,
- Jot down custom notes for any clipboard,
- Harness the power of regex on everything you copy,
- Connect with your desktop clipboard system,
- Use languages like español, português, and Türkçe,
- Script _everything_ to automate your workflows,
- Customize the UI to your viewing pleasure,
- And more.

%prep
%autosetup -p1
# set arch-dependent path for plugins
sed -i 's|__LIBDIR__|%{_libdir}|g' src/cb/src/x11wl.cpp

%build
export CXX=g++
test -x "$(type -p g++-12)" && export CXX=g++-12
%cmake \
%if 0%{?suse_version} <= 1500
  -DNO_LTO=ON \
%endif
  -DCMAKE_SKIP_RPATH=ON

%cmake_build

%install
%cmake_install

%files
%license LICENSE
%doc README.md
%{_bindir}/cb
%{_mandir}/man1/cb.1%{?ext_man}
%{_libdir}/Clipboard

%changelog
openSUSE Build Service is sponsored by