summaryrefslogtreecommitdiffstats
path: root/remote/tools/systemd/build.systemd
blob: af57f8da76b99909362953452dfc2349502c814b (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
#tool/distro specific functions for fetching, building and installing dependencies

fetch_source ()
{
  if [ ! -e .fetched_source ]; then
 		[ ! -d src ] && mkdir src
		wget $URL
    tar xJf $VERSION.tar.xz -C src/
    rm $VERSION.tar.xz
    touch .fetched_source
  fi
}	

install_dependencies()
{
	# quick fix for missing libkmod repo...
	add-apt-repository --force-yes ppa:pitti/systemd
	apt-get update --force-yes
	apt-get install --force-yes $DEPS
}

build ()
{
	if [ ! -e .built ]; then
		cd src/$VERSION
		./configure --disable-manpages
		make
		[ ! -d $TOOL_DIR/$TOOL/build ] && mkdir -p $TOOL_DIR/$TOOL/build
		DESTDIR=$TOOL_DIR/$TOOL/build make install
		cd -
    touch .built
  fi
}