avahi: convert to procd
authorRosen Penev <rosenp@gmail.com>
Thu, 6 Feb 2020 03:28:25 +0000 (19:28 -0800)
committerRosen Penev <rosenp@gmail.com>
Sat, 28 Mar 2020 02:48:47 +0000 (19:48 -0700)
Add license information.

Small cleanups.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
(cherry picked from commit f41612bc9c8633f931517c59f145a86f9e09eca3)

libs/avahi/Makefile
libs/avahi/files/avahi-daemon.init

index 922b8b6f4a2ec01a4672338c92e0e35fb224d571..1fc066054536b7bf8b02b035775c440506fdd8c3 100644 (file)
@@ -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 <thess@kitschensync.net>
+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
index b2ae4580e902115695bd54a81f2ff4f112510737..f580a31d8c2a6feeb2e8b7df6edeeb3e48876bf0 100644 (file)
@@ -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
-}
-