diff options
Diffstat (limited to 'remote/tools/systemd/systemd.build')
| -rw-r--r-- | remote/tools/systemd/systemd.build | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/remote/tools/systemd/systemd.build b/remote/tools/systemd/systemd.build index c5a9a86c..7d9588c0 100644 --- a/remote/tools/systemd/systemd.build +++ b/remote/tools/systemd/systemd.build @@ -1,13 +1,8 @@ #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 + [ ! -e .fetched_source ] && download_untar "$URL" "src/" + touch .fetched_source } install_dependencies() { @@ -20,6 +15,7 @@ install_dependencies() { # apt-get update --force-yes #fi # install libkmod from source + # TODO: Use download_untar local libkmodversion=kmod-12 if [ ! -d $libkmodversion ]; then wget http://www.kernel.org/pub/linux/utils/kernel/kmod/${libkmodversion}.tar.gz @@ -32,24 +28,27 @@ install_dependencies() { cd - fi - apt-get install -y $DEPS &>/dev/null + apt-get install -y $DEPS } build () { if [ ! -e .built ]; then - cd src/$VERSION - ./configure --disable-manpages --enable-split-usr --sysconfdir="/etc" - make -j5 - [ ! -d $TOOL_DIR/$TOOL/build ] && mkdir -p $TOOL_DIR/$TOOL/build - DESTDIR=$TOOL_DIR/$TOOL/build make install + cd "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 -j5 || perror "make failed." + mkdir -p $TOOL_DIR/$TOOL/build + pinfo "calling make install" + DESTDIR=$TOOL_DIR/$TOOL/build make install || perror "make install failed." cd - - touch .built + touch .built fi } post_copy() { # copy static data files - cp -r $TOOL_DIR/$TOOL/data/* $INIT_DIR + cp -r $TOOL_DIR/$TOOL/data/* $INIT_DIR || perror "copying data files failed." # dont clear systemd log at startup sed -i.bak "s/TTYVTDisallocate=yes/TTYVTDisallocate=no/g" $INIT_DIR/usr/lib/systemd/system/getty@.service @@ -61,5 +60,6 @@ post_copy() { fi # add nfs to modules-load list - echo "nfs" > $INIT_DIR/etc/modules-load.d/nfs.conf + echo "nfs" > "$INIT_DIR/etc/modules-load.d/nfs.conf" } + |
