File unetd.spec of Package unetd

#
# spec file for package unetd
#
# Copyright (c) 2024, Martin Hauke <mardnh@gmx.de>
#
# 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 http://bugs.opensuse.org/
#


Name:           unetd
Version:        0~git20240331
Release:        0
Summary:        WireGuard based VPN connection manager for OpenWrt
License:        GPL-2.0-or-later
Group:          System/Daemons
URL:            https://git.openwrt.org/?p=project/unetd.git;a=summary
Source:         %{name}-%{version}.tar.xz
Patch0:         unetd-cmake-gnuinstalldirs.patch
BuildRequires:  cmake
BuildRequires:  libbpf-devel
BuildRequires:  libelf-devel
BuildRequires:  libnl-tiny-devel
BuildRequires:  libubox-devel
BuildRequires:  pkgconfig
BuildRequires:  ubus-devel
BuildRequires:  pkgconfig(json-c)
BuildRequires:  pkgconfig(zlib)

%description
WireGuard based VPN connection manager for OpenWrt.

%prep
%setup -q
%autopatch -p1

%build
CFLAGS="%{optflags} $(pkg-config --cflags libnl-tiny) $(pkg-config --libs libnl-tiny)"
%cmake \
  -DUBUS_SUPPORT=ON \
  -DVXLAN_SUPPORT=ON
%make_jobs

%install
%cmake_install

%files
%doc PEX.md
%{_libdir}/libunet.so
%{_sbindir}/unet-dht
%{_sbindir}/unet-tool
%{_sbindir}/unetd

%changelog
openSUSE Build Service is sponsored by