dot

packages and services management
Log | Files | Refs | README

commit 369eeba00c1787457554181a2c74e37dbfc6c493
parent e5a3b45ecd2c1c3e23bf315e16464168133b1e1d
Author: Josuah Demangeon <mail@josuah.net>
Date:   Sun, 25 Feb 2018 18:43:30 +0100

more portable pack structure

Diffstat:
M.profile | 14+++++++-------
Mbin/pack | 17++++++++---------
Mpack/libmusl/build | 4++--
Mpack/libtox/build | 12++++++------
Mpack/mpop/build | 6+++---
Mpack/msmtp/build | 4++--
Mpack/opentracker/build | 4++--
Mpack/opus-tools/build | 16++++++++--------
8 files changed, 38 insertions(+), 39 deletions(-)

diff --git a/.profile b/.profile @@ -15,14 +15,14 @@ export LC_MESSAGES="en_US.UTF-8" export LC_NUMERIC="en_US.UTF-8" export LC_TIME="en_US.UTF-8" -export SYSROOT="$HOME/.local" -export PLAN9="$SYSROOT/src/plan9" -export PATH="$HOME/etc/bin:$SYSROOT/bin:$PATH:$PLAN9/bin" +export PACKROOT="$HOME/.local" +export PLAN9="$PACKROOT/src/plan9" +export PATH="$HOME/etc/bin:$PACKROOT/bin:$PATH:$PLAN9/bin" export MANPATH="$HOME/etc/man:/usr/share/man:/usr/local/man" -export MANPATH="$SYSROOT/share/man:$MANPATH:$PLAN9/man" -export C_INCLUDE_PATH="$SYSROOT/include" -export LIBRARY_PATH="$SYSROOT/lib:/usr/local/lib/inotify" -export LD_LIBRARY_PATH="$SYSROOT/lib:/usr/local/lib/inotify" +export MANPATH="$PACKROOT/share/man:$MANPATH:$PLAN9/man" +export C_INCLUDE_PATH="$PACKROOT/include" +export LIBRARY_PATH="$PACKROOT/lib:/usr/local/lib/inotify" +export LD_LIBRARY_PATH="$PACKROOT/lib:/usr/local/lib/inotify" export ABDUCO_CMD="dvtm-status" export ABDUCO_SOCKET_DIR="$HOME/run" diff --git a/bin/pack b/bin/pack @@ -1,11 +1,10 @@ #!/bin/sh -e -export SYSROOT="${SYSROOT:-$HOME/.local}" -export PKG="$HOME/etc/pack/$2" -export SRC="$HOME/src/$2" -export OPT="$HOME/opt/$2" -export CFLAGS="-I'$SYSROOT/include'" -export LDFLAGS="-L'$SYSROOT/lib'" +export PKG="$PACK/pack/$2" +export SRC="$PACKROOT/src/$2" +export OPT="$PACKROOT/opt/$2" +export CFLAGS="-I'$PACKROOT/include'" +export LDFLAGS="-L'$PACKROOT/lib'" case "$1" in (tar) @@ -50,12 +49,12 @@ case "$1" in [ -d "$OPT" ] || "$0" build "$2" || rm -r "$OPT" cd "$OPT" && exec find * -type d \ - -exec mkdir -p "$SYSROOT/{}" \; -o \ - -exec ln -sf "$OPT/{}" "$SYSROOT/{}" \; + -exec mkdir -p "$PACKROOT/{}" \; -o \ + -exec ln -sf "$OPT/{}" "$PACKROOT/{}" \; ;; (del) rm -rf "$OPT" - find -L "$SYSROOT" -name opt -prune -o -name src -prune -o \ + find -L "$PACKROOT" -name opt -prune -o -name src -prune -o \ -type l -exec rm {} + ;; (*) diff --git a/pack/libmusl/build b/pack/libmusl/build @@ -1,7 +1,7 @@ #!/bin/sh -ex -export LDFLAGS="$LDFLAGS -Wl,-rpath-link=$SYSROOT$OPT/lib" -export CC="$CC -L$SYSROOT/lib -isystem $SYSROOT/include" +export LDFLAGS="$LDFLAGS -Wl,-rpath-link=$PACKROOT$OPT/lib" +export CC="$CC -L$PACKROOT/lib -isystem $PACKROOT/include" [ -n "$CROSS_COMPILE" ] && CONFFLAGS="$CONFFLAGS --host=$CROSS_COMPILE" diff --git a/pack/libtox/build b/pack/libtox/build @@ -1,13 +1,13 @@ #!/bin/sh -ex -export OPUS_CFLAGS="-I$SYSROOT/include/opus" -export OPUS_LIBS="-L$SYSROOT/lib" -export VPX_CFLAGS="-I$SYSROOT/include" -export VPX_LIBS="-L$SYSROOT/lib" -export CFLAGS="-I$SYSROOT/include/opus" +export OPUS_CFLAGS="-I$PACKROOT/include/opus" +export OPUS_LIBS="-L$PACKROOT/lib" +export VPX_CFLAGS="-I$PACKROOT/include" +export VPX_LIBS="-L$PACKROOT/lib" +export CFLAGS="-I$PACKROOT/include/opus" ./configure \ --prefix="$OPT" \ - --with-dependency-search="$SYSROOT" + --with-dependency-search="$PACKROOT" make install diff --git a/pack/mpop/build b/pack/mpop/build @@ -1,7 +1,7 @@ #!/bin/sh -ex -export libssl_CFLAGS="-I$SYSROOT/include" -export libssl_LIBS="-L$SYSROOT/lib -lssa -lcrypto" +export libssl_CFLAGS="-I$PACKROOT/include" +export libssl_LIBS="-L$PACKROOT/lib -lssa -lcrypto" ./configure \ --prefix="$OPT" \ @@ -9,6 +9,6 @@ export libssl_LIBS="-L$SYSROOT/lib -lssa -lcrypto" make \ CFLAGS="$libssl_CFLAGS" \ - LDFLAGS="-L$SYSROOT/lib -lssl -lcrypto" \ + LDFLAGS="-L$PACKROOT/lib -lssl -lcrypto" \ make PREFIX="$OPT" install diff --git a/pack/msmtp/build b/pack/msmtp/build @@ -1,7 +1,7 @@ #!/bin/sh -ex -export libssl_CFLAGS="-I$SYSROOT/include" -export libssl_LIBS="-L$SYSROOT/lib -lssl -lcrypto" +export libssl_CFLAGS="-I$PACKROOT/include" +export libssl_LIBS="-L$PACKROOT/lib -lssl -lcrypto" ./configure \ diff --git a/pack/opentracker/build b/pack/opentracker/build @@ -1,7 +1,7 @@ #!/bin/sh -ex make \ - LIBOWFAT_HEADERS="$SYSROOT/include" \ - LIBOWFAT_LIBRARY="$SYSROOT/lib" + LIBOWFAT_HEADERS="$PACKROOT/include" \ + LIBOWFAT_LIBRARY="$PACKROOT/lib" make PREFIX="$OPT" install diff --git a/pack/opus-tools/build b/pack/opus-tools/build @@ -1,17 +1,17 @@ #!/bin/sh -ex -export OGG_LIBS="-L'$SYSROOT/lib' -logg" -export OGG_CFLAGS="-I'$SYSROOT/include'" +export OGG_LIBS="-L'$PACKROOT/lib' -logg" +export OGG_CFLAGS="-I'$PACKROOT/include'" -export OPUS_LIBS="-L'$SYSROOT/lib' -lopus" -export OPUS_CFLAGS="-I'$SYSROOT/include/opus'" +export OPUS_LIBS="-L'$PACKROOT/lib' -lopus" +export OPUS_CFLAGS="-I'$PACKROOT/include/opus'" -export FLAC_LIBS="-L'$SYSROOT/lib' -lFLAC" -export FLAC_CFLAGS="-I'$SYSROOT/include'" +export FLAC_LIBS="-L'$PACKROOT/lib' -lFLAC" +export FLAC_CFLAGS="-I'$PACKROOT/include'" ./configure \ - --with-ogg="$SYSROOT" \ - --with-opus="$SYSROOT" \ + --with-ogg="$PACKROOT" \ + --with-opus="$PACKROOT" \ --prefix="$OPT" case $(uname) in (*BSD) make="gmake" ;; (*) make='make' ;; esac