103 lines
3.3 KiB
RPMSpec
103 lines
3.3 KiB
RPMSpec
|
#
|
||
|
# 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: wsdd
|
||
|
Version: 0.5
|
||
|
Release: 0
|
||
|
Summary: A Web Service Discovery host daemon
|
||
|
License: MIT
|
||
|
Url: https://github.com/christgau/wsdd
|
||
|
BuildArch: noarch
|
||
|
Source: https://github.com/christgau/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.xz
|
||
|
Source1: %{name}-init.sh
|
||
|
Source2: %{name}.service
|
||
|
Source3: %{name}.xml
|
||
|
Source4: sysconfig.%{name}
|
||
|
Source5: %{name}.conf
|
||
|
Patch1: %{name}-shebang.patch
|
||
|
BuildRequires: python3
|
||
|
BuildRequires: firewall-macros
|
||
|
Requires: sysconfig
|
||
|
Supplements: samba
|
||
|
Supplements: samba-ad-dc
|
||
|
|
||
|
%description
|
||
|
wsdd implements a Web Service Discovery host daemon. This enables (Samba) hosts,
|
||
|
like your local NAS device, to be found by Web Service Discovery Clients like Windows.
|
||
|
|
||
|
Since NetBIOS discovery is not supported by Windows anymore, wsdd makes hosts to
|
||
|
appear in Windows again using the Web Service Discovery method. This is beneficial
|
||
|
for devices running Samba, like NAS or file sharing servers on your local network.
|
||
|
|
||
|
%prep
|
||
|
%setup -q
|
||
|
%patch1 -p1
|
||
|
|
||
|
%build
|
||
|
|
||
|
%install
|
||
|
install -m 755 -D src/wsdd.py %{buildroot}%{_sbindir}/%{name}
|
||
|
install -m 644 -D man/wsdd.1 %{buildroot}/%{_mandir}/man1/wsdd.1
|
||
|
install -m 755 -D %{SOURCE1} %{buildroot}%{_libexecdir}/wsdd/wsdd-init.sh
|
||
|
install -m 644 -D %{SOURCE2} %{buildroot}%{_unitdir}/wsdd.service
|
||
|
install -m 644 -D %{SOURCE3} %{buildroot}%{_libexecdir}/firewalld/services/wsdd.xml
|
||
|
install -m 644 -D %{SOURCE4} %{buildroot}%{_fillupdir}/sysconfig.wsdd
|
||
|
install -m 755 -d %{buildroot}%{_sbindir}
|
||
|
ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}
|
||
|
mkdir -p %{buildroot}/usr/lib/tmpfiles.d/
|
||
|
install -m 644 %{SOURCE5} %{buildroot}/usr/lib/tmpfiles.d/
|
||
|
mkdir -p %{buildroot}/run/wsdd
|
||
|
mkdir -p %{buildroot}/var/lib/wsdd
|
||
|
|
||
|
%pre
|
||
|
getent group wsdd >/dev/null || %{_sbindir}/groupadd -r wsdd
|
||
|
getent passwd wsdd >/dev/null || %{_sbindir}/useradd -r -g wsdd -c "User for wsdd" -s /sbin/nologin -d /run/wsdd wsdd
|
||
|
%service_add_pre wsdd.service
|
||
|
|
||
|
%post
|
||
|
%{fillup_only}
|
||
|
%service_add_post wsdd.service
|
||
|
%tmpfiles_create /usr/lib/tmpfiles.d/wsdd.conf
|
||
|
%firewalld_reload
|
||
|
|
||
|
%preun
|
||
|
%service_del_preun wsdd.service
|
||
|
|
||
|
%postun
|
||
|
%service_del_postun wsdd.service
|
||
|
|
||
|
%files
|
||
|
%license LICENCE
|
||
|
%doc README.md
|
||
|
%{_sbindir}/%{name}
|
||
|
%{_mandir}/man1/wsdd.1.gz
|
||
|
%{_sbindir}/rc%{name}
|
||
|
%{_unitdir}/wsdd.service
|
||
|
%{_libexecdir}/wsdd
|
||
|
%dir /usr/lib/tmpfiles.d
|
||
|
/usr/lib/tmpfiles.d/wsdd.conf
|
||
|
%dir %{_libexecdir}/firewalld
|
||
|
%dir %{_libexecdir}/firewalld/services
|
||
|
%{_libexecdir}/firewalld/services/wsdd.xml
|
||
|
%{_fillupdir}/sysconfig.%{name}
|
||
|
%dir %attr(0755,wsdd,wsdd) %ghost /run/sysconfig
|
||
|
%attr(0644,wsdd,wsdd) %ghost /run/sysconfig/wsdd
|
||
|
%dir %attr(0755,wsdd,wsdd) %ghost /run/wsdd
|
||
|
|
||
|
%changelog
|