diff options
author | Jonathan Bauer | 2013-02-18 15:02:05 +0100 |
---|---|---|
committer | Jonathan Bauer | 2013-02-18 15:02:05 +0100 |
commit | ae70cf5ba13c3f3e5020c90931017f5294da3788 (patch) | |
tree | e7fad8c77cac3ed247cff1ee36e4ab17da5ab1b8 /remote/tools/policykit/policykit.build | |
parent | policykit fixes (diff) | |
download | tm-scripts-ae70cf5ba13c3f3e5020c90931017f5294da3788.tar.gz tm-scripts-ae70cf5ba13c3f3e5020c90931017f5294da3788.tar.xz tm-scripts-ae70cf5ba13c3f3e5020c90931017f5294da3788.zip |
fix
Diffstat (limited to 'remote/tools/policykit/policykit.build')
-rw-r--r-- | remote/tools/policykit/policykit.build | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/remote/tools/policykit/policykit.build b/remote/tools/policykit/policykit.build new file mode 100644 index 00000000..ef08710e --- /dev/null +++ b/remote/tools/policykit/policykit.build @@ -0,0 +1,59 @@ +#tool/distro specific functions for fetching, building and installing dependencies + +fetch_source () { + if [ ! -e .fetched_source ]; then + [ ! -d src ] && mkdir src + wget $URL + tar xfz $VERSION.tar.gz -C src/ + rm $VERSION.tar.gz + touch .fetched_source + fi +} + +install_dependencies() { + apt-get install -y $DEPS +} + +build () { + BUILDDIR=$TOOL_DIR/$TOOL/build + + if [ ! -e .built ]; then + cd src/$VERSION + + [ ! -d ${TOOL_DIR}/systemd/build ] && echo "[$TOOL] systemd build directory not found Build it first. Exiting." && exit 1 + + export LIBSYSTEMD_LOGIN_LIBS="-L${TOOL_DIR}/systemd/build/usr/lib/" + export LIBSYSTEMD_LOGIN_CFLAGS="-I${TOOL_DIR}/systemd/build/usr/include -I${TOOL_DIR}/systemd/build/usr/include/systemd -lsystemd-login -lsystemd-daemon" + ./configure --enable-libsystemd-login=yes --with-systemdsystemunitdir=/etc/systemd/system -prefix="/" --datarootdir="/usr/share" + + make + [ ! -d $BUILDDIR ] && mkdir -p $BUILDDIR + DESTDIR=$BUILDDIR make install + + COPYLIST="list_dpkg_output" + [ -e $COPYLIST ] && rm $COPYLIST + + if [ ! -z ${REQUIRED_PACKAGES} ] + then + for PACKAGE in ${REQUIRED_PACKAGES} + do + for FILE in $(dpkg -L ${PACKAGE} | grep -v share/doc | grep -v share/man) + do + [ ! -d $FILE ] && echo $FILE >> $COPYLIST + done + done + fi + + # prepare target dir & copy there + [ ! -d $BUILDDIR ] && mkdir -p $BUILDDIR + tar -cpv $(cat $COPYLIST|sort -u) | tar -xpv -C $BUILDDIR + + cd - + touch .built + + fi +} + +post_copy() { + : +} |