summaryrefslogtreecommitdiffstats
path: root/core/modules/systemd-distro/module.build
blob: 5c2dd958413a72457c65378915b865606c360b69 (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
#!/bin/bash
fetch_source () {
	:
}

build () {
	if ! which systemd >/dev/null; then
		pwarning "No systemd binary found in PATH. "
		perror "Make sure the system uses systemd before using this module."
	fi
	COPYLIST="list_dpkg_output"
	[ -e "$COPYLIST" ] && rm "$COPYLIST"
	list_packet_files >> "$COPYLIST"
	tarcopy "$(cat "$COPYLIST" | sort -u)" "$MODULE_BUILD_DIR"
}

post_copy() {
	[ -d "${TARGET_BUILD_DIR}/usr/lib/systemd/system" ] \
		&& ! [ -L "${TARGET_BUILD_DIR}/usr/lib/systemd/system" ] \
		&& perror "/usr/lib/systemd/system must not exist in target build dir"
	ln -nfs "../../../lib/systemd/system" "${TARGET_BUILD_DIR}/usr/lib/systemd/system"
}