From f41612bc9c8633f931517c59f145a86f9e09eca3 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Wed, 5 Feb 2020 19:28:25 -0800 Subject: [PATCH] avahi: convert to procd Add license information. Small cleanups. Signed-off-by: Rosen Penev --- libs/avahi/Makefile | 10 +++------- libs/avahi/files/avahi-daemon.init | 25 ++++++++++--------------- 2 files changed, 13 insertions(+), 22 deletions(-) diff --git a/libs/avahi/Makefile b/libs/avahi/Makefile index 922b8b6f4..1fc066054 100644 --- a/libs/avahi/Makefile +++ b/libs/avahi/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=avahi PKG_VERSION:=0.7 -PKG_RELEASE:=4 +PKG_RELEASE:=5 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/lathiat/avahi/releases/download/v$(PKG_VERSION) \ @@ -17,6 +17,8 @@ PKG_SOURCE_URL:=https://github.com/lathiat/avahi/releases/download/v$(PKG_VERSIO PKG_HASH:=57a99b5dfe7fdae794e3d1ee7a62973a368e91e414bd0dfa5d84434de5b14804 PKG_MAINTAINER:=Ted Hess +PKG_LICENSE:=LGPL-2.1-or-later +PKG_LICENSE_FILES:=LICENSE PKG_CPE_ID:=cpe:/a:avahi:avahi PKG_BUILD_DEPENDS:=intltool/host @@ -26,12 +28,6 @@ PKG_REMOVE_FILES:=autogen.sh PKG_INSTALL:=1 PKG_BUILD_PARALLEL:=1 -ifeq ($(BUILD_VARIANT),dbus) -PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)/dbus/$(PKG_NAME)-$(PKG_VERSION) -else -PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)/nodbus/$(PKG_NAME)-$(PKG_VERSION) -endif - include $(INCLUDE_DIR)/package.mk define Package/avahi/Default diff --git a/libs/avahi/files/avahi-daemon.init b/libs/avahi/files/avahi-daemon.init index b2ae4580e..f580a31d8 100644 --- a/libs/avahi/files/avahi-daemon.init +++ b/libs/avahi/files/avahi-daemon.init @@ -2,22 +2,17 @@ # Copyright (C) 2006 OpenWrt.org START=61 -BIN=avahi-daemon -DEFAULT=/etc/default/$BIN -OPTIONS="-D" -RUN_D=/var/run/$BIN +USE_PROCD=1 +PROG=avahi-daemon -start() { - [ -f $DEFAULT ] && . $DEFAULT - mkdir -p $RUN_D - $BIN $OPTIONS +start_service() { + procd_open_instance + procd_set_param command "$PROG" + procd_append_param command -s + procd_set_param respawn + procd_close_instance } -stop() { - $BIN -k +reload_service() { + procd_send_signal "$PROG" } - -reload() { - $BIN -r -} -