From 7a4e8f48ba25698206ff9c8558ef8eb32df4ffe9 Mon Sep 17 00:00:00 2001 From: John Crispin Date: Mon, 8 Oct 2007 22:30:28 +0000 Subject: [PATCH] added etherwake, from #2460 SVN-Revision: 9204 --- net/etherwake/Makefile | 44 +++++++++++++++++++ .../patches/100-no_ether_hostton.patch | 37 ++++++++++++++++ 2 files changed, 81 insertions(+) create mode 100644 net/etherwake/Makefile create mode 100644 net/etherwake/patches/100-no_ether_hostton.patch diff --git a/net/etherwake/Makefile b/net/etherwake/Makefile new file mode 100644 index 000000000..741a0a601 --- /dev/null +++ b/net/etherwake/Makefile @@ -0,0 +1,44 @@ +# +# Copyright (C) 2007 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. + +include $(TOPDIR)/rules.mk + +PKG_NAME:=etherwake +PKG_VERSION:=1.09 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).orig.tar.gz +PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/main/e/etherwake +PKG_MD5SUM:=628e8b2a28d47f262e4c26c989402a59 +PKG_CAT:=zcat + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION).orig + +include $(INCLUDE_DIR)/package.mk + +define Package/etherwake + SECTION:=net + CATEGORY:=Network + TITLE:=A little tool to send magic Wake-on-LAN packets + DESCRIPTION:=\ + You can wake up WOL compliant Computers which have been powered down to \\\ + sleep mode or start WOL compliant Computers with a BIOS feature.\\\ + WOL is an abbreviation for Wake-on-LAN. It is a standard that allows you \\\ + to turn on a computer from another location over a network connection.\\\ + ether-wake also supports WOL passwords. + URL:=http://ftp.debian.org/debian/pool/main/e/etherwake +endef + +define Build/Compile + $(TARGET_CC) $(TARGET_CFLAGS) -D__UCLIBC__ $(PKG_BUILD_DIR)/ether-wake.c -o $(PKG_BUILD_DIR)/etherwake +endef + +define Package/etherwake/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/etherwake $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,etherwake)) diff --git a/net/etherwake/patches/100-no_ether_hostton.patch b/net/etherwake/patches/100-no_ether_hostton.patch new file mode 100644 index 000000000..e33c06b11 --- /dev/null +++ b/net/etherwake/patches/100-no_ether_hostton.patch @@ -0,0 +1,37 @@ +--- etherwake-1.09.orig/ether-wake.c 2005-07-10 20:44:25.000000000 +0200 ++++ etherwake-1.09.orig.no_ether_hostton/ether-wake.c 2007-04-29 19:03:41.000000000 +0200 +@@ -15,7 +15,11 @@ + " an optional password appended.\n" + "\n" + " The single required parameter is the Ethernet MAC (station) address\n" ++#if !defined(__UCLIBC__) + " of the machine to wake or a host ID with known NSS 'ethers' entry.\n" ++#else ++" of the machine to wake.\n" ++#endif + " The MAC address may be found with the 'arp' program while the target\n" + " machine is awake.\n" + "\n" +@@ -289,16 +293,22 @@ + if (debug) + fprintf(stderr, "The target station address is %s.\n", + ether_ntoa(eaddr)); ++#if !defined(__UCLIBC__) + } else if (ether_hostton(hostid, eaddr) == 0) { + if (debug) + fprintf(stderr, "Station address for hostname %s is %s.\n", + hostid, ether_ntoa(eaddr)); ++#endif + } else { + (void)fprintf(stderr, + "ether-wake: The Magic Packet host address must be " + "specified as\n" ++#if !defined(__UCLIBC__) + " - a station address, 00:11:22:33:44:55, or\n" + " - a hostname with a known 'ethers' entry.\n"); ++#else ++ " - a station address, 00:11:22:33:44:55\n"); ++#endif + return -1; + } + return 0; -- 2.30.2