summaryrefslogtreecommitdiffstats
path: root/core/modules/etherwake/module.build
blob: 55424e5689607174412d140a20f4cd65c52f3bd7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/bash

fetch_source() {
	autoclone
}

build() {
	local SRCDIR="${MODULE_WORK_DIR}/src/jawol"
	pinfo "Building jawol"
	cde "$SRCDIR"
	make || perror "make failed"
	mkdir -p "$MODULE_BUILD_DIR/opt/openslx/sbin"
	cp jawol "$MODULE_BUILD_DIR/opt/openslx/sbin" || perror "cp failed"

	cde "$MODULE_BUILD_DIR"

	mkdir -p "${MODULE_BUILD_DIR}/etc/udev/rules.d"
	sed "s,%ETHTOOL%,$(which ethtool)," "${MODULE_DIR}/templates/99-enable-wol-disable-pause.rules" \
		> "${MODULE_BUILD_DIR}/etc/udev/rules.d/99-enable-wol-disable-pause.rules" \
		|| perror "Cannot write udev rule to enable WOL"
}

post_copy() {
	:
}