Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

synocli-net: add etherwake #4643

Merged
merged 2 commits into from
May 25, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions cross/etherwake/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
PKG_NAME = etherwake
PKG_VERS = 1.09
PKG_EXT = tar.gz
PKG_DIST_NAME = $(PKG_NAME)_$(PKG_VERS).orig.$(PKG_EXT)
PKG_DIST_SITE = https://ftp.debian.org/debian/pool/main/e/etherwake/
PKG_DIR = $(PKG_NAME)-$(PKG_VERS).orig

DEPENDS =

# homepage is not reachable anymore
HOMEPAGE = www.scyld.com/wakeonlan.html
COMMENT = Generate and transmit a Wake-On-LAN (WOL) Magic Packet
LICENSE = GPL

CONFIGURE_TARGET = nop

include ../../mk/spksrc.cross-cc.mk
1 change: 1 addition & 0 deletions cross/etherwake/PLIST
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bin:bin/etherwake
3 changes: 3 additions & 0 deletions cross/etherwake/digests
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
etherwake_1.09.orig.tar.gz SHA1 2e52d00dcd22d59740bad4cfb17a6b63cd76a2a2
etherwake_1.09.orig.tar.gz SHA256 54241c7689579dc86e29e6afbc6d60e69f97135091a1395c8a10f6d5a2daec1d
etherwake_1.09.orig.tar.gz MD5 628e8b2a28d47f262e4c26c989402a59
31 changes: 31 additions & 0 deletions cross/etherwake/patches/001-create-Makefile.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
--- /dev/null 2021-05-22 18:25:05.160869264 +0000
+++ Makefile 2021-05-22 18:11:27.006079500 +0000
@@ -0,0 +1,28 @@
+# Makefile by github user @erichschroeter
+# https://gist.github.com/erichschroeter/9884006
+
+.PHONY: clean uninstall
+
+prefix ?= /usr
+exec_prefix ?= $(prefix)
+bindir ?= $(exec_prefix)/bin
+
+ETHERWAKE_src = ether-wake.c
+ETHERWAKE_bin = ether-wake
+ETHERWAKE_tgt = $(DESTDIR)$(bindir)/etherwake
+
+all: $(ETHERWAKE_bin)
+
+$(ETHERWAKE_bin): $(ETHERWAKE_src)
+
+$(ETHERWAKE_tgt): $(ETHERWAKE_bin)
+ install -d $(DESTDIR)$(bindir)
+ install -m 0755 $^ $@
+
+clean:
+ rm $(ETHERWAKE_bin)
+
+install: $(ETHERWAKE_tgt)
+
+uninstall:
+ rm $(ETHERWAKE_tgt)
46 changes: 46 additions & 0 deletions cross/etherwake/patches/002-rename-binary.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
Rename ether-wake to etherwake
--- ether-wake.c.orig 2005-07-10 18:44:25.000000000 +0000
+++ ether-wake.c 2021-05-22 19:13:54.638754525 +0000
@@ -3,10 +3,10 @@
static char version_msg[] =
"ether-wake.c: v1.09 11/12/2003 Donald Becker, http://www.scyld.com/";
static char brief_usage_msg[] =
-"usage: ether-wake [-i <ifname>] [-p aa:bb:cc:dd[:ee:ff]] 00:11:22:33:44:55\n"
+"usage: etherwake [-i <ifname>] [-p aa:bb:cc:dd[:ee:ff]] 00:11:22:33:44:55\n"
" Use '-u' to see the complete set of options.\n";
static char usage_msg[] =
-"usage: ether-wake [-i <ifname>] [-p aa:bb:cc:dd[:ee:ff]] 00:11:22:33:44:55\n"
+"usage: etherwake [-i <ifname>] [-p aa:bb:cc:dd[:ee:ff]] 00:11:22:33:44:55\n"
"\n"
" This program generates and transmits a Wake-On-LAN (WOL)\n"
" \"Magic Packet\", used for restarting machines that have been\n"
@@ -159,9 +159,9 @@
#endif
if (s < 0) {
if (errno == EPERM)
- fprintf(stderr, "ether-wake: This program must be run as root.\n");
+ fprintf(stderr, "etherwake: This program must be run as root.\n");
else
- perror("ether-wake: socket");
+ perror("etherwake: socket");
perm_failure++;
}
/* Don't revert if debugging allows a normal user to get the raw socket. */
@@ -295,7 +295,7 @@
hostid, ether_ntoa(eaddr));
} else {
(void)fprintf(stderr,
- "ether-wake: The Magic Packet host address must be "
+ "etherwake: The Magic Packet host address must be "
"specified as\n"
" - a station address, 00:11:22:33:44:55, or\n"
" - a hostname with a known 'ethers' entry.\n");
@@ -383,7 +383,7 @@

/*
* Local variables:
- * compile-command: "gcc -O -Wall -o ether-wake ether-wake.c"
+ * compile-command: "gcc -O -Wall -o etherwake ether-wake.c"
* c-indent-level: 4
* c-basic-offset: 4
* c-indent-level: 4
18 changes: 18 additions & 0 deletions diyspk/etherwake/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
SPK_NAME = etherwake
SPK_VERS = 1.09
SPK_REV = 1

DEPENDS = cross/$(SPK_NAME)

MAINTAINER = SynoCommunity
DESCRIPTION = Generate and transmit a Wake-On-LAN (WOL) Magic Packet
DISPLAY_NAME = etherwake
STARTABLE = no

# homepage is not reachable anymore
HOMEPAGE = www.scyld.com/wakeonlan.html
LICENSE = GPL

SPK_COMMANDS = bin/etherwake

include ../../mk/spksrc.spk.mk
Empty file added diyspk/etherwake/PLIST
Empty file.
8 changes: 5 additions & 3 deletions spk/synocli-net/Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
SPK_NAME = synocli-net
SPK_VERS = 1.5
SPK_VERS = 1.6
SPK_REV = 9
SPK_ICON = src/synocli-net.png

DEPENDS = cross/screen cross/tmux cross/nmap cross/links cross/socat
DEPENDS += cross/rsync cross/autossh cross/arp-scan
DEPENDS += cross/mtr
DEPENDS += cross/etherwake

OPTIONAL_DEPENDS = cross/sshfs cross/fritzctl cross/ser2net

Expand All @@ -25,10 +26,10 @@ OPTIONAL_DESC := $(OPTIONAL_DESC)", sshfs, ser2net"
endif

MAINTAINER = ymartin59
DESCRIPTION = "SynoCli Network Tools provides a set of small command-line utilities: screen, tmux, socat, nmap, arp-scan, mtr \(My traceroute\), links, sshfs, rsync, autossh$(OPTIONAL_DESC).<br/>Credits to Sebastian Schmidt \(publicarray\) for icons."
DESCRIPTION = "SynoCli Network Tools provides a set of small command-line utilities: screen, tmux, socat, nmap, arp-scan, mtr \(My traceroute\), links, sshfs, rsync, autossh, etherwake$(OPTIONAL_DESC). Credits to Sebastian Schmidt \(publicarray\) for icons."
DISPLAY_NAME = SynoCli Network Tools
STARTABLE = no
CHANGELOG = "1. Update tmux to version 3.1c without utf-8 wrapper.<br/>2. Add mtr (My traceroute)."
CHANGELOG = "1. Update tmux to version 3.1c without utf-8 wrapper.<br/>2. Add mtr (My traceroute).<br/>3. Add etherwake."

HOMEPAGE = https://github.com/SynoCommunity/spksrc/wiki/FAQ-SynoCliNet
LICENSE = Each tool is licensed under it\'s respective license.
Expand All @@ -49,5 +50,6 @@ SPK_COMMANDS += libexec/sftp-server libexec/ssh-keysign libexec/ssh-pkcs11-helpe
SPK_COMMANDS += sbin/sshd
SPK_COMMANDS += sbin/ser2net
SPK_COMMANDS += sbin/mtr sbin/mtr-packet
SPK_COMMANDS += bin/etherwake

include ../../mk/spksrc.spk.mk