Browse Source

Merge pull request #618 from mhei/avahi

Avahi service file packages
lilik-openwrt-22.03
Ted Hess 10 years ago
parent
commit
44180b6429
7 changed files with 105 additions and 10 deletions
  1. +46
    -1
      libs/avahi/Makefile
  2. +1
    -1
      libs/avahi/files/service-http
  3. +1
    -1
      libs/avahi/files/service-ssh
  4. +23
    -2
      net/openssh/Makefile
  5. +9
    -0
      net/openssh/files/sftp-ssh.service
  6. +24
    -4
      sound/mpd/Makefile
  7. +1
    -1
      sound/mpd/files/mpd.service

+ 46
- 1
libs/avahi/Makefile View File

@ -18,7 +18,7 @@ endif
PKG_NAME:=avahi
PKG_VERSION:=0.6.31
PKG_RELEASE:=7
PKG_RELEASE:=8
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
@ -103,6 +103,7 @@ define Package/avahi-daemon
DEPENDS:=+libavahi +libexpat +librt +libdaemon
endif
TITLE+= (daemon)
MENU:=1
endef
define Package/avahi-daemon/description
@ -113,7 +114,39 @@ endef
define Package/avahi-daemon/conffiles
/etc/avahi/avahi-daemon.conf
endef
define Package/avahi-daemon-service-http
$(call Package/avahi/Default)
SUBMENU:=IP Addresses and Names
DEPENDS:=avahi-daemon
TITLE:=Announce HTTP service
endef
define Package/avahi-daemon-service-http/description
$(call Package/avahi/Default/description)
.
This package contains the service definition for announcing HTTP service.
endef
define Package/avahi-daemon-service-http/conffiles
/etc/avahi/services/http.service
endef
define Package/avahi-daemon-service-ssh
$(call Package/avahi/Default)
SUBMENU:=IP Addresses and Names
DEPENDS:=avahi-daemon
TITLE:=Announce SSH service
endef
define Package/avahi-daemon-service-ssh/description
$(call Package/avahi/Default/description)
.
This package contains the service definition for announcing SSH service.
endef
define Package/avahi-daemon-service-ssh/conffiles
/etc/avahi/services/ssh.service
endef
@ -322,6 +355,16 @@ define Package/avahi-daemon/install
$(INSTALL_BIN) ./files/avahi-daemon.init $(1)/etc/init.d/avahi-daemon
endef
define Package/avahi-daemon-service-http/install
$(INSTALL_DIR) $(1)/etc/avahi/services
$(INSTALL_DATA) ./files/service-http $(1)/etc/avahi/services/http.service
endef
define Package/avahi-daemon-service-ssh/install
$(INSTALL_DIR) $(1)/etc/avahi/services
$(INSTALL_DATA) ./files/service-ssh $(1)/etc/avahi/services/ssh.service
endef
define Package/avahi-dnsconfd/install
$(INSTALL_DIR) $(1)/etc/avahi
$(CP) $(PKG_INSTALL_DIR)/etc/avahi/avahi-dnsconfd.action $(1)/etc/avahi/
@ -336,4 +379,6 @@ $(eval $(call BuildPackage,libavahi-dbus-support))
$(eval $(call BuildPackage,libavahi))
$(eval $(call BuildPackage,avahi-autoipd))
$(eval $(call BuildPackage,avahi-daemon))
$(eval $(call BuildPackage,avahi-daemon-service-http))
$(eval $(call BuildPackage,avahi-daemon-service-ssh))
$(eval $(call BuildPackage,avahi-dnsconfd))

+ 1
- 1
libs/avahi/files/service-http View File

@ -1,7 +1,7 @@
<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
<name replace-wildcards="yes">Web Server on %h</name>
<name replace-wildcards="yes">%h</name>
<service>
<type>_http._tcp</type>
<port>80</port>


+ 1
- 1
libs/avahi/files/service-ssh View File

@ -1,7 +1,7 @@
<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
<name replace-wildcards="yes">Secure Shell on %h</name>
<name replace-wildcards="yes">%h</name>
<service>
<type>_ssh._tcp</type>
<port>22</port>


+ 23
- 2
net/openssh/Makefile View File

@ -1,5 +1,5 @@
#
# Copyright (C) 2006-2011 OpenWrt.org
# Copyright (C) 2006-2014 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=openssh
PKG_VERSION:=6.7p1
PKG_RELEASE:=2
PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/ \
@ -131,6 +131,21 @@ define Package/openssh-sftp-server/description
OpenSSH SFTP server.
endef
define Package/openssh-sftp-avahi-service
$(call Package/openssh/Default)
TITLE+= (SFTP Avahi service)
DEPENDS:=+openssh-sftp-server +avahi-daemon
endef
define Package/openssh-sftp-avahi-service/description
This package contains the service definition for announcing
SFTP support via mDNS/DNS-SD.
endef
define Package/openssh-sftp-avahi-service/conffiles
/etc/avahi/services/sftp-ssh.service
endef
CONFIGURE_ARGS+= \
$(DISABLE_NLS) \
--sysconfdir=/etc/ssh \
@ -259,6 +274,11 @@ define Package/openssh-sftp-server/install
ln -sf ../lib/sftp-server $(1)/usr/libexec/sftp-server
endef
define Package/openssh-sftp-avahi-service/install
$(INSTALL_DIR) $(1)/etc/avahi/services
$(INSTALL_DATA) ./files/sftp-ssh.service $(1)/etc/avahi/services/
endef
$(eval $(call BuildPackage,openssh-client))
$(eval $(call BuildPackage,openssh-moduli))
$(eval $(call BuildPackage,openssh-client-utils))
@ -267,3 +287,4 @@ $(eval $(call BuildPackage,openssh-server))
$(eval $(call BuildPackage,openssh-server-pam))
$(eval $(call BuildPackage,openssh-sftp-client))
$(eval $(call BuildPackage,openssh-sftp-server))
$(eval $(call BuildPackage,openssh-sftp-avahi-service))

+ 9
- 0
net/openssh/files/sftp-ssh.service View File

@ -0,0 +1,9 @@
<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
<name replace-wildcards="yes">%h</name>
<service>
<type>_sftp-ssh._tcp</type>
<port>22</port>
</service>
</service-group>

+ 24
- 4
sound/mpd/Makefile View File

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=mpd
PKG_VERSION:=0.18.16
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=http://www.musicpd.org/download/mpd/0.18/
@ -63,7 +63,6 @@ $(call Package/mpd/Default/description)
endef
define Package/mpd-full/conffiles
/etc/avahi/services/mpd.service
/etc/mpd.conf
endef
@ -85,6 +84,23 @@ define Package/mpd-mini/conffiles
/etc/mpd.conf
endef
define Package/mpd-avahi-service
$(call Package/mpd/Default)
TITLE+= (Avahi service)
DEPENDS+=+avahi-daemon
endef
define Package/mpd-avahi-service/description
$(call Package/mpd/Default/description)
.
This package contains the service definition for announcing the
Music Player Daemon service via mDNS/DNS-SD.
endef
define Package/mpd-avahi-service/conffiles
/etc/avahi/services/mpd.service
endef
CONFIGURE_ARGS += \
$(call autoconf_bool,CONFIG_IPV6,ipv6) \
--disable-debug \
@ -198,13 +214,17 @@ endef
define Package/mpd-full/install
$(call Package/mpd/install,$1)
$(INSTALL_DIR) $(1)/etc/avahi/services
$(INSTALL_DATA) ./files/mpd.service $(1)/etc/avahi/services/
endef
define Package/mpd-mini/install
$(call Package/mpd/install,$1)
endef
define Package/mpd-avahi-service/install
$(INSTALL_DIR) $(1)/etc/avahi/services
$(INSTALL_DATA) ./files/mpd.service $(1)/etc/avahi/services/
endef
$(eval $(call BuildPackage,mpd-full))
$(eval $(call BuildPackage,mpd-mini))
$(eval $(call BuildPackage,mpd-avahi-service))

+ 1
- 1
sound/mpd/files/mpd.service View File

@ -1,7 +1,7 @@
<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
<name replace-wildcards="yes">Music Player Daemon on %h</name>
<name replace-wildcards="yes">%h</name>
<service>
<type>_mpd._tcp</type>
<port>6600</port>


Loading…
Cancel
Save