summaryrefslogtreecommitdiffstats
path: root/remote/modules/cups/module.build
blob: 2b29bb7ded94aeacc556077c38865267eadbf900 (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
#!/bin/bash

fetch_source() {
	:
}

build() {
	local COPYLIST file
	COPYLIST="list_dpkg_output"
	[ -e "$COPYLIST" ] && rm "$COPYLIST"

	list_packet_files >> "$COPYLIST"
	tarcopy "$(cat "$COPYLIST" | sort -u)" "${MODULE_BUILD_DIR}"

	# Move any disabled backends to the backend directory
	mv -n -- "${MODULE_BUILD_DIR}/usr/lib/cups/backend-available/"* "${MODULE_BUILD_DIR}/usr/lib/cups/backend/"
	rm -f -- "${MODULE_BUILD_DIR}/usr/lib/cups/backend-available/"*

	# cups insists on overriding PATH, so we need to fix any scripts
	for file in "${MODULE_BUILD_DIR}"/usr/lib/cups/{filter,backend}/*; do
		head -n 1 "$file" | grep -q '^#!/' && sed -i '/^#!\//a . \/etc\/environment' "$file"
	done
}

post_copy() {
	:
}