mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-20 01:20:35 +08:00
Compare commits
2 Commits
sysmngr_co
...
ssdpd
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
06ea9f7057 | ||
|
|
8e0bcaef5f |
@@ -158,6 +158,10 @@ define Package/libbbfdm/default/install
|
||||
$(CP) $(PKG_BUILD_DIR)/libbbfdm.so $(1)/lib/
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/scripts/* $(1)/usr/share/bbfdm
|
||||
$(LN) /usr/share/bbfdm/bbf.diag $(1)/usr/libexec/rpcd/bbf.diag
|
||||
ifeq ($(CONFIG_PACKAGE_mosquitto-ssl),y)
|
||||
$(INSTALL_DIR) $(1)/etc/uci-defaults
|
||||
$(INSTALL_BIN) ./files/etc/uci-defaults/94-mosquitto-config $(1)/etc/uci-defaults/94-mosquitto-config
|
||||
endif
|
||||
endef
|
||||
|
||||
define Package/libbbfdm/default/prerm
|
||||
|
||||
47
bbf/files/etc/uci-defaults/94-mosquitto-config
Normal file
47
bbf/files/etc/uci-defaults/94-mosquitto-config
Normal file
@@ -0,0 +1,47 @@
|
||||
#!/bin/sh
|
||||
|
||||
config_mosquitto_owrt() {
|
||||
sec=$(uci -q get mosquitto.owrt)
|
||||
if [ -z "${sec}" ]; then
|
||||
sec=$(uci -q add mosquitto owrt)
|
||||
uci -q rename mosquitto."${sec}"="owrt"
|
||||
fi
|
||||
|
||||
uci -q set mosquitto.owrt.use_uci="1"
|
||||
uci -q set mosquitto.owrt.write_pid="0"
|
||||
uci -q commit mosquitto
|
||||
}
|
||||
|
||||
config_mosquitto_general() {
|
||||
sec=$(uci -q get mosquitto.mosquitto)
|
||||
if [ -z "${sec}" ]; then
|
||||
sec=$(uci -q add mosquitto mosquitto)
|
||||
uci -q rename mosquitto."${sec}"="mosquitto"
|
||||
fi
|
||||
|
||||
uci -q set mosquitto.mosquitto.log_dest="syslog"
|
||||
uci -q set mosquitto.mosquitto.include_dir="/etc/mosquitto/conf.d"
|
||||
uci -q set mosquitto.mosquitto.log_facility="5"
|
||||
uci -q set mosquitto.mosquitto.log_timestamp="1"
|
||||
uci -q set mosquitto.mosquitto.log_types="error warning notice"
|
||||
uci -q set mosquitto.mosquitto.per_listener_settings="1"
|
||||
uci -q commit mosquitto
|
||||
}
|
||||
|
||||
config_mosquitto_persistence() {
|
||||
sec=$(uci -q get mosquitto.persistence)
|
||||
if [ -z "${sec}" ]; then
|
||||
sec=$(uci -q add mosquitto persistence)
|
||||
uci -q rename mosquitto."${sec}"="persistence"
|
||||
fi
|
||||
|
||||
uci -q set mosquitto.persistence.persistence="0"
|
||||
uci -q set mosquitto.persistence.location="/var/run"
|
||||
uci -q commit mosquitto
|
||||
}
|
||||
|
||||
if [ -f "/etc/config/mosquitto" ]; then
|
||||
config_mosquitto_owrt
|
||||
config_mosquitto_general
|
||||
config_mosquitto_persistence
|
||||
fi
|
||||
@@ -5,16 +5,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=ssdpd
|
||||
PKG_VERSION:=1.0.0
|
||||
PKG_RELEASE:=1.0.0
|
||||
|
||||
LOCAL_DEV:=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/miniupnp/miniupnp.git
|
||||
PKG_SOURCE_VERSION:=207cf440a22c075cb55fb067a850be4f9c204e6e
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
PKG_VERSION:=1.6.0
|
||||
PKG_SOURCE_URL:=http://miniupnp.free.fr/files/
|
||||
PKG_SOURCE:=mini$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_HASH:=f4c2dea6a472e0a5cc9dca2dc4c1fc36ba5538eacf8d793825293251725546bd
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/mini$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
PKG_LICENSE:=BSD-3-Clause
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
@@ -29,8 +26,6 @@ define Package/ssdpd
|
||||
URL:=https://miniupnp.tuxfamily.org/minissdpd.html
|
||||
endef
|
||||
|
||||
MAKE_PATH:=minissdpd
|
||||
|
||||
TARGET_CFLAGS += \
|
||||
-D_GNU_SOURCE \
|
||||
-Wall -Wextra -Werror
|
||||
@@ -38,12 +33,6 @@ TARGET_CFLAGS += \
|
||||
TARGET_LDFLAGS += \
|
||||
-lpthread -lubox -lubus -lblobmsg_json -lcurl -lmxml
|
||||
|
||||
ifeq ($(LOCAL_DEV),1)
|
||||
define Build/Prepare
|
||||
$(CP) -rf ~/git/sspd/* $(PKG_BUILD_DIR)/
|
||||
endef
|
||||
endif
|
||||
|
||||
define Package/ssdpd/install
|
||||
$(INSTALL_DIR) $(1)/etc/upnp
|
||||
$(INSTALL_DIR) $(1)/etc/upnp/description
|
||||
@@ -52,7 +41,7 @@ define Package/ssdpd/install
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_CONF) ./files/etc/config/ssdpd $(1)/etc/config/ssdpd
|
||||
$(INSTALL_BIN) ./files/etc/init.d/ssdpd $(1)/etc/init.d/ssdpd
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/minissdpd/minissdpd $(1)/usr/sbin/ssdpd
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/minissdpd $(1)/usr/sbin/ssdpd
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,ssdpd))
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
--- a/minissdpd/openssdpsocket.c
|
||||
+++ b/minissdpd/openssdpsocket.c
|
||||
--- a/openssdpsocket.c
|
||||
+++ b/openssdpsocket.c
|
||||
@@ -11,6 +11,7 @@
|
||||
#include <unistd.h>
|
||||
#include <sys/ioctl.h>
|
||||
@@ -8,8 +8,8 @@
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <net/if.h>
|
||||
--- a/minissdpd/ifacewatch.c
|
||||
+++ b/minissdpd/ifacewatch.c
|
||||
--- a/ifacewatch.c
|
||||
+++ b/ifacewatch.c
|
||||
@@ -130,6 +130,7 @@ ProcessInterfaceWatch(int s, int s_ssdp,
|
||||
/* case RTM_DELLINK: */
|
||||
case RTM_DELADDR:
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
--- a/minissdpd/Makefile
|
||||
+++ b/minissdpd/Makefile
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -41,7 +41,7 @@ endif
|
||||
EXECUTABLES = minissdpd testminissdpd testcodelength \
|
||||
showminissdpdnotif
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
--- /dev/null
|
||||
+++ b/minissdpd/ssdpd.c
|
||||
+++ b/ssdpd.c
|
||||
@@ -0,0 +1,626 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2022 iopsys Software Solutions AB
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
--- a/minissdpd/minissdpd.c
|
||||
+++ b/minissdpd/minissdpd.c
|
||||
--- a/minissdpd.c
|
||||
+++ b/minissdpd.c
|
||||
@@ -32,6 +32,8 @@
|
||||
#include <pwd.h>
|
||||
#include <grp.h>
|
||||
|
||||
Reference in New Issue
Block a user