summaryrefslogtreecommitdiffstats
path: root/remote/modules/systemd/systemd.build
blob: ee74d53af9250f9d00c90c29a38919321d124a08 (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
31
32
33
34
35
36
37
38
39
40
#tool/distro specific functions for fetching, building and installing dependencies

fetch_source () {
	download_untar "$URL" "src/"
	download_untar "$LIBKMOD_URL" "src/"
}	

build () {
	#build libkmod
	cd "${MODULE_DIR}/src/$LIBKMOD_VERSION"
	./configure
	make || perror "make failed."
	make install || perror "make install failed."
	cd - &> /dev/null

	#build systemd
	cd "${MODULE_DIR}/src/$VERSION"
	pinfo "calling configure"
	./configure --disable-manpages --enable-split-usr --sysconfdir="/etc" --enable-gtk-doc-html=no || perror "configure failed."
	pinfo "calling make"
	make || perror "make failed."
	pinfo "calling make install"
	DESTDIR="${MODULE_BUILD_DIR}" make install || perror "make install failed."
	cd - &> /dev/null
}

post_copy() {
	# dont clear systemd log at startup
	sed -i.bak "s/TTYVTDisallocate=yes/TTYVTDisallocate=no/g" "${TARGET_BUILD_DIR}/usr/lib/systemd/system/getty@.service"

	#old agetty version doesn't support --noclear option in getty service
	if [ "x$(dpkg -s util-linux | grep Version: | cut -d' ' -f2)" == "x2.19.1-2ubuntu3" ];
	then
		sed -i.bak "s/ExecStart=-\/sbin\/agetty --noclear %I 38400 linux/ExecStart=-\/sbin\/agetty %I 38400 linux/g" "${TARGET_BUILD_DIR}/usr/lib/systemd/system/getty@.service"
	fi

	# add nfs to modules-load list
	echo "nfs" > "${TARGET_BUILD_DIR}/etc/modules-load.d/nfs.conf"
}