diff options
| author | Christian Rößler | 2013-08-06 18:56:52 +0200 |
|---|---|---|
| committer | Christian Rößler | 2013-08-06 18:56:52 +0200 |
| commit | cbb9f19fdd8db07c3e44d4f156367098720a4a22 (patch) | |
| tree | 37b4c4aaf9564905f753ae2ecf2102ebab2fde47 /remote | |
| parent | [systemd] systemd.conf.scientific: Tiny version number bug (diff) | |
| download | tm-scripts-cbb9f19fdd8db07c3e44d4f156367098720a4a22.tar.gz tm-scripts-cbb9f19fdd8db07c3e44d4f156367098720a4a22.tar.xz tm-scripts-cbb9f19fdd8db07c3e44d4f156367098720a4a22.zip | |
[systemd] systemd.build: Much mor Scientific Linux-fun. Experimental.
Diffstat (limited to 'remote')
| -rw-r--r-- | remote/modules/systemd/systemd.build | 58 |
1 files changed, 52 insertions, 6 deletions
diff --git a/remote/modules/systemd/systemd.build b/remote/modules/systemd/systemd.build index 710c4ea6..358c59a6 100644 --- a/remote/modules/systemd/systemd.build +++ b/remote/modules/systemd/systemd.build @@ -5,7 +5,12 @@ fetch_source () { download_untar "$REQUIRED_LIBKMOD_URL" "src/" # Another nice hack for Scientific Linux - experimental. - [ "$SYS_DISTRIBUTION" == "scientific" ] && download_untar "$REQUIRED_UTILLINUX_URL" "src/" + if [ "$SYS_DISTRIBUTION" == "scientific" ]; then + download_untar "$REQUIRED_UTILLINUX_URL" "src/" || perror "Cannot download util-linux!" + download_untar "$REQUIRED_M4_URL" "src/" || perror "Cannot download m4 version $REQUIRED_AUTOMAKE_VERSION!" + download_untar "$REQUIRED_AUTOCONF_URL" "src/" || perror "Cannot download autoconf version $REQUIRED_AUTOCONF_VERSION!" + download_untar "$REQUIRED_AUTOMAKE_URL" "src/" || perror "Cannot download automake version $REQUIRED_AUTOMAKE_VERSION!" + fi # Patch PATH environment sed -s -i -r 's#"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin(:/sbin:/bin)?"#& ":/opt/openslx/usr/sbin:/opt/openslx/usr/bin:/opt/openslx/sbin:/opt/openslx/bin"#g' src/systemd-*/src/core/main.c @@ -23,10 +28,12 @@ build () { # Scientific Linux specials if [ "$SYS_DISTRIBUTION" == "scientific" ]; then + pinfo "Scientific Linux detected ..." + # Utillinux stuff - penfo "Building util-linux" + pinfo "Building util-linux" cd "${MODULE_DIR}/src/util-linux-$REQUIRED_UTILLINUX_VERSION" - ./configure --prefix=${MODULE_DIR}/build --exec-prefix=${MODULE_DIR}/build --disable-libuuid --disable-libmount \ + ./configure --disable-libuuid --disable-libmount --without-ncurses \ --disable-mount --disable-losetup --disable-cytune --disable-fsck --disable-partx --disable-uuidd \ --disable-mountpoint --disable-fallocate --disable-unshare --disable-nsenter --disable-setpriv \ --disable-eject --disable-agetty --disable-cramfs --disable-bfs --disable-fdformat --disable-hwclock \ @@ -35,8 +42,36 @@ build () { --disable-pg --disable-schedutils --disable-wall --disable-bash-completion \ || perror "./configure util-linux failed." make || perror "util-linux make failed." - make install || perror "util-linux make install failed." + DESTDIR="${MODULE_BUILD_DIR}" make install || perror "util-linux make install failed." + cd - &> /dev/null + + # Let's have some starting fun with m4, as we want systemd, which wants automake 1.13, which wants autoconf, + # which wants m4 ... + pinfo "Building m4 Version $REQUIRED_M4_VERSION." + cd "${MODULE_DIR}/src/m4-$REQUIRED_M4_VERSION" + ./configure || perror "./configure m4 failed." + make || perror "m4 make failed." + DESTDIR="${MODULE_BUILD_DIR}" make install || perror "m4 make install failed." + cd - &> /dev/null + # Let's have some starting fun with autoconf, as we want systemd, which wants automake 1.13, which wants + # autoconf 2.65 or better... + pinfo "Building autoconf Version $REQUIRED_AUTOCONF_VERSION." + cd "${MODULE_DIR}/src/autoconf-$REQUIRED_AUTOCONF_VERSION" + ./configure || perror "./configure autoconf failed." + make || perror "autoconf make failed." + DESTDIR="${MODULE_BUILD_DIR}" make install || perror "autoconf make install failed." + cd - &> /dev/null + + # Now let's have some fun with automake, as config.log/systemd will whine later about SL's automake 1.11: + # AUTOMAKE='${SHELL} /root/tm-scripts/remote/modules/systemd/src/systemd-206/build-aux/missing automake-1.13' + pinfo "Building automake Version $REQUIRED_AUTOMAKE_VERSION." + cd "${MODULE_DIR}/src/automake-$REQUIRED_AUTOMAKE_VERSION" + ./configure || perror "./configure automake failed." + make || perror "automake make failed." + DESTDIR="${MODULE_BUILD_DIR}" make install || perror "automake make install failed." + cd - &> /dev/null +exit # patching configure for Scientific Linux - cave - ugly hack! pinfo "Scientific Linux detected; patching systemd/configure..." cd "${MODULE_DIR}/src/$REQUIRED_VERSION" @@ -44,19 +79,30 @@ build () { mv configure configure.orig mv configure.patched configure chmod +x configure - fi + # For later compiling systemd + pinfo "-------------${MODULE_BUILD_DIR}--------------" + CPPFLAGS="-I${MODULE_BUILD_DIR}/usr/include/" + LDFLAGS="$LDFLAGS -L${MODULE_BUILD_DIR}/usr/lib/ -ldl" + # LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${MODULE_BUILD_DIR}/usr/lib/" + cd - &> /dev/null + fi #build systemd pinfo "Building systemd" cd "${MODULE_DIR}/src/$REQUIRED_VERSION" pinfo "calling configure" - ./configure --disable-manpages --enable-split-usr --sysconfdir="/etc" --enable-gtk-doc-html=no --disable-nls --disable-microhttpd --disable-bootchart --disable-quotacheck --disable-hostnamed --disable-timedated --disable-localed --disable-coredump --disable-keymap --without-python --enable-blkid --enable-acl --enable-pam|| perror "configure failed." +pinfo "-------$LDFLAGS------------$CPPFLAGS-----------------$LD_LIBRARY_PATH---------------------------------------------------" + ./configure --disable-manpages --enable-split-usr --sysconfdir="/etc" --enable-gtk-doc-html=no --disable-nls \ + --disable-microhttpd --disable-bootchart --disable-quotacheck --disable-hostnamed --disable-timedated \ + --disable-localed --disable-coredump --disable-keymap --without-python --enable-blkid --enable-acl --enable-pam \ + || 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 + # Delete unneeded services pinfo "Deleting unneeded services" local SERVICE= |
