summaryrefslogblamecommitdiffstats
path: root/core/modules/consolekit/module.build
blob: 0626aae4555b7d0ae422b083f3f00c89895ffd9c (plain) (tree)
1
2
3
4
5
6
7
8
9
10









                                                 
                                          
















                                                                                                                                                                                                                           
#!/bin/bash

fetch_source() {
	pinfo "Extracting from running system..."
}

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

	list_packet_files >> "${COPYLIST}"
	tarcopy "$(cat "${COPYLIST}" | sort -u)" "${MODULE_BUILD_DIR}"
	# Systemd/dbus
	mkdir -p "$MODULE_BUILD_DIR/usr/share/dbus-1/system-services" "$MODULE_BUILD_DIR/etc/systemd/system"
	local DAEMON=$(find "$MODULE_BUILD_DIR" -name console-kit-daemon -executable | head -n 1)
	DAEMON="${DAEMON#$MODULE_BUILD_DIR}"
	[ -z "$DAEMON" ] && perror "Could not find console-kit-daemon binary"
	sed "s,%DAEMON%,/$DAEMON,g" "${MODULE_DIR}/templates/consolekit.systemd.service" > "$MODULE_BUILD_DIR/etc/systemd/system/console-kit-daemon.service" || perror "Could not generate systemd service"
	sed "s,%DAEMON%,/$DAEMON,g" "${MODULE_DIR}/templates/consolekit.dbus.service" > "$MODULE_BUILD_DIR/usr/share/dbus-1/system-services/org.freedesktop.ConsoleKit.service" || perror "Could not generate dbus service"
}

post_copy() {
	mkdir -p "${TARGET_BUILD_DIR}/usr/lib/ConsoleKit/run-seat.d"
	mkdir -p "${TARGET_BUILD_DIR}/etc/ConsoleKit/run-seat.d"
	mkdir -p "${TARGET_BUILD_DIR}/etc/ConsoleKit/run-session.d"
	mkdir -p "${TARGET_BUILD_DIR}/var/log/ConsoleKit"
}