File wsdd2.spec of Package wsdd2

#
# spec file for package wsdd
#
# Copyright (c) 2020 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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:           wsdd2
Version:        1.8.7
Release:        0
Summary:	WSD/LLMNR Discovery/Name Service Daemon
Group:          System/Daemons
License:        GPL-3.0
Url:            https://github.com/Andy2244/wsdd2
Source:         %{name}-%{version}.tar.xz
Patch0:		wsdd2-service-fix.patch
BuildRequires:	make
BuildRequires:	gcc
BuildRequires:  firewall-macros
Requires:	samba-client
Conflicts:	wsdd
Conflicts:	llmnrd

%description
WSD/LLMNR Discovery/Name Service Daemon

NOTE: Consumed by this openwrt package:

https://github.com/openwrt/packages/tree/master/net/wsdd2

%prep
%autosetup

%build
make

%install
%make_install
install -m 755 -d %{buildroot}%{_sbindir}

%pre
%service_add_pre wsdd2.service

%post
%{fillup_only}
%service_add_post wsdd2.service

%preun
%service_del_preun wsdd2.service

%postun
%service_del_postun wsdd2.service

%files
%license LICENSE
%doc README.md
%{_sbindir}/%{name}
%attr(0644,-,-) %{_mandir}/man8/wsdd2.8.gz
%{_unitdir}/wsdd2.service

%changelog
openSUSE Build Service is sponsored by