diff --git a/Makefile b/Makefile index 61d359b..22bb571 100644 --- a/Makefile +++ b/Makefile @@ -9,8 +9,9 @@ OBJFILES = wsdd2.o wsd.o llmnr.o HEADERS = wsdd.h wsd.h INSTALLPREFIX ?= $(PREFIX)/usr -SBININSTALLDIR = $(INSTALLPREFIX)/sbin +SBININSTALLDIR = $(INSTALLPREFIX)/bin MANINSTALLDIR = $(INSTALLPREFIX)/share/man +LIBINSTALLDIR = $(INSTALLPREFIX)/lib all: wsdd2 @@ -23,8 +24,8 @@ install: wsdd2 install wsdd2 $(DESTDIR)/$(SBININSTALLDIR) install -d $(DESTDIR)/$(MANINSTALLDIR)/man8 install wsdd2.8 $(DESTDIR)/$(MANINSTALLDIR)/man8/wsdd2.8 - install -d $(DESTDIR)/lib/systemd/system - install -m 0644 wsdd2.service $(DESTDIR)/lib/systemd/system + install -d $(DESTDIR)/$(LIBINSTALLDIR)/systemd/system + install -m 0644 wsdd2.service $(DESTDIR)/$(LIBINSTALLDIR)/systemd/system clean: rm -f wsdd2 $(OBJFILES) diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 0000000..0a340de --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,25 @@ +pkgname=wsdd2 +pkgver=1.8 +pkgrel=2 +url="" +pkgdesc="WSDD and LLMNR daemon" +arch=('x86_64' 'armv7h') +license=('GPL3') +sources=('wsd.c' + 'wsdd2.8' + 'wsdd.h' + 'llmnr.c' + 'Makefile' + 'wsdd2.c' + 'wsdd2.service' + 'wsd.h') + +build() { + cd .. + make +} + +package() { + cd .. + make DESTDIR="$pkgdir/" install +} diff --git a/wsdd2.service b/wsdd2.service index f4a75a3..ee3b115 100644 --- a/wsdd2.service +++ b/wsdd2.service @@ -1,8 +1,13 @@ [Unit] Description=WSD/LLMNR Discovery/Name Service Daemon -PartOf=smbd.service +PartOf=smb.service [Service] +DynamicUser=true +PrivateTmp=true +PrivateDevices=true +ProtectSystem=strict +ProtectHome=true ExecStart=/usr/sbin/wsdd2 ExecReload=/bin/kill -HUP $MAINPID Restart=on-failure