summaryrefslogtreecommitdiffstats
path: root/core/modules/etherwake/module.build
blob: d9648025c615f2888e546e522a14cbce58a613c5 (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
27
28
29
30
#!/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.rules" > "${MODULE_BUILD_DIR}/etc/udev/rules.d/99-enable-wol.rules" \
		|| perror "Cannot write udev rule to enable WOL"

	local COPYLIST="list_dpkg_output"
	rm -f -- "$COPYLIST"
	list_packet_files >> "$COPYLIST"
	tarcopy "$( < "$COPYLIST"  sort -u )" "${MODULE_BUILD_DIR}"
}

post_copy() {
	:
}