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_NAME:=avahi
PKG_VERSION:=0.6.31 PKG_VERSION:=0.6.31
PKG_RELEASE:=7
PKG_RELEASE:=8
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
@ -103,6 +103,7 @@ define Package/avahi-daemon
DEPENDS:=+libavahi +libexpat +librt +libdaemon DEPENDS:=+libavahi +libexpat +librt +libdaemon
endif endif
TITLE+= (daemon) TITLE+= (daemon)
MENU:=1
endef endef
define Package/avahi-daemon/description define Package/avahi-daemon/description
@ -113,7 +114,39 @@ endef
define Package/avahi-daemon/conffiles define Package/avahi-daemon/conffiles
/etc/avahi/avahi-daemon.conf /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 /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 /etc/avahi/services/ssh.service
endef endef
@ -322,6 +355,16 @@ define Package/avahi-daemon/install
$(INSTALL_BIN) ./files/avahi-daemon.init $(1)/etc/init.d/avahi-daemon $(INSTALL_BIN) ./files/avahi-daemon.init $(1)/etc/init.d/avahi-daemon
endef 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 define Package/avahi-dnsconfd/install
$(INSTALL_DIR) $(1)/etc/avahi $(INSTALL_DIR) $(1)/etc/avahi
$(CP) $(PKG_INSTALL_DIR)/etc/avahi/avahi-dnsconfd.action $(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,libavahi))
$(eval $(call BuildPackage,avahi-autoipd)) $(eval $(call BuildPackage,avahi-autoipd))
$(eval $(call BuildPackage,avahi-daemon)) $(eval $(call BuildPackage,avahi-daemon))
$(eval $(call BuildPackage,avahi-daemon-service-http))
$(eval $(call BuildPackage,avahi-daemon-service-ssh))
$(eval $(call BuildPackage,avahi-dnsconfd)) $(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-*--> <?xml version="1.0" standalone='no'?><!--*-nxml-*-->
<!DOCTYPE service-group SYSTEM "avahi-service.dtd"> <!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group> <service-group>
<name replace-wildcards="yes">Web Server on %h</name>
<name replace-wildcards="yes">%h</name>
<service> <service>
<type>_http._tcp</type> <type>_http._tcp</type>
<port>80</port> <port>80</port>


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

@ -1,7 +1,7 @@
<?xml version="1.0" standalone='no'?><!--*-nxml-*--> <?xml version="1.0" standalone='no'?><!--*-nxml-*-->
<!DOCTYPE service-group SYSTEM "avahi-service.dtd"> <!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group> <service-group>
<name replace-wildcards="yes">Secure Shell on %h</name>
<name replace-wildcards="yes">%h</name>
<service> <service>
<type>_ssh._tcp</type> <type>_ssh._tcp</type>
<port>22</port> <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. # This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information. # See /LICENSE for more information.
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=openssh PKG_NAME:=openssh
PKG_VERSION:=6.7p1 PKG_VERSION:=6.7p1
PKG_RELEASE:=2
PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/ \ PKG_SOURCE_URL:=http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/ \
@ -131,6 +131,21 @@ define Package/openssh-sftp-server/description
OpenSSH SFTP server. OpenSSH SFTP server.
endef 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+= \ CONFIGURE_ARGS+= \
$(DISABLE_NLS) \ $(DISABLE_NLS) \
--sysconfdir=/etc/ssh \ --sysconfdir=/etc/ssh \
@ -259,6 +274,11 @@ define Package/openssh-sftp-server/install
ln -sf ../lib/sftp-server $(1)/usr/libexec/sftp-server ln -sf ../lib/sftp-server $(1)/usr/libexec/sftp-server
endef 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-client))
$(eval $(call BuildPackage,openssh-moduli)) $(eval $(call BuildPackage,openssh-moduli))
$(eval $(call BuildPackage,openssh-client-utils)) $(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-server-pam))
$(eval $(call BuildPackage,openssh-sftp-client)) $(eval $(call BuildPackage,openssh-sftp-client))
$(eval $(call BuildPackage,openssh-sftp-server)) $(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_NAME:=mpd
PKG_VERSION:=0.18.16 PKG_VERSION:=0.18.16
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=http://www.musicpd.org/download/mpd/0.18/ PKG_SOURCE_URL:=http://www.musicpd.org/download/mpd/0.18/
@ -63,7 +63,6 @@ $(call Package/mpd/Default/description)
endef endef
define Package/mpd-full/conffiles define Package/mpd-full/conffiles
/etc/avahi/services/mpd.service
/etc/mpd.conf /etc/mpd.conf
endef endef
@ -85,6 +84,23 @@ define Package/mpd-mini/conffiles
/etc/mpd.conf /etc/mpd.conf
endef 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 += \ CONFIGURE_ARGS += \
$(call autoconf_bool,CONFIG_IPV6,ipv6) \ $(call autoconf_bool,CONFIG_IPV6,ipv6) \
--disable-debug \ --disable-debug \
@ -198,13 +214,17 @@ endef
define Package/mpd-full/install define Package/mpd-full/install
$(call Package/mpd/install,$1) $(call Package/mpd/install,$1)
$(INSTALL_DIR) $(1)/etc/avahi/services
$(INSTALL_DATA) ./files/mpd.service $(1)/etc/avahi/services/
endef endef
define Package/mpd-mini/install define Package/mpd-mini/install
$(call Package/mpd/install,$1) $(call Package/mpd/install,$1)
endef 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-full))
$(eval $(call BuildPackage,mpd-mini)) $(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-*--> <?xml version="1.0" standalone='no'?><!--*-nxml-*-->
<!DOCTYPE service-group SYSTEM "avahi-service.dtd"> <!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group> <service-group>
<name replace-wildcards="yes">Music Player Daemon on %h</name>
<name replace-wildcards="yes">%h</name>
<service> <service>
<type>_mpd._tcp</type> <type>_mpd._tcp</type>
<port>6600</port> <port>6600</port>


Loading…
Cancel
Save