dot

packages and services management
Log | Files | Refs | README

commit ef1e93abec3e9685e0a339402c671824940afffc
parent 908f9e65604ccb1b88ea78c6eeea56724bb7ff66
Author: Josuah Demangeon <mail@josuah.net>
Date:   Sun, 29 Jul 2018 13:19:53 +0200

do not use DEST in recipes but directly /opt

Diffstat:
Dbin/.s6-rc-ctl.swp | 0
Mbin/pack | 37+++++++++++++++++++++----------------
Mpack/acme-client/build | 4++--
Mpack/execline/build | 6+++---
Mpack/farbfeld/config.mk | 12++++++++----
Mpack/git/build | 6+++---
Mpack/irssi/build | 4++--
Mpack/libgit2/build | 2+-
Mpack/libtox/build | 4++--
Mpack/links2/build | 4++--
Mpack/mpop/build | 4++--
Mpack/msmtp/build | 4++--
Mpack/netpgp/build | 4++--
Mpack/ngircd/build | 2+-
Mpack/ratox/config.mk | 20++++++++++----------
Mpack/reflex/build | 2+-
Mpack/s6-dns/build | 6+++---
Mpack/s6-networking/build | 14+++++++-------
Mpack/s6-portable-utils/build | 8++++----
Mpack/s6-rc/build | 12++++++------
Mpack/s6/build | 10+++++-----
Mpack/stagit-gopher/config.mk | 4++--
Mpack/stagit/config.mk | 4++--
Mpack/tinyldap/build | 4++--
Dpack/tinyldap/version | 1-
Mpack/transmission/build | 16++++++++--------
26 files changed, 101 insertions(+), 93 deletions(-)

diff --git a/bin/.s6-rc-ctl.swp b/bin/.s6-rc-ctl.swp Binary files differ. diff --git a/bin/pack b/bin/pack @@ -1,36 +1,39 @@ #!/bin/sh -e # source-based package manager that fetches compile and install -# /src/<package>/<version> - source files of <package> at a given +# /src/<package>-<version> - source files of <package> at a given # <version>. # -# /opt/<package>/<version> - files installed by <package> at a given +# /opt/<package>-<version> - files installed by <package> at a given # <version>. +# +# /opt/<package> - symlink to the current version export PACK=/etc/pack/$2 export DEST=/local -export PREFIX=/opt/$2 +export VERSION=$(test -f "$PACK/version" && tail -n 1 "$PACK/version") +export PREFIX=/opt/$2/$VERSION case $1 in -(tar) test -d "/src/$2" && exit 0 - mkdir -p "/src/$2" - IFS="" read -r url <$PACK/tar +(tar) test -d "/src/$2/$VERSION" && exit 0 + mkdir -p "/src/$2/$VERSION" + url=$(awk -v v="$VERSION" 'gsub("%s", v) || 1' "$PACK/tar") wget -O - "$url" | case $url in (*.tgz|*.tar.gz) gzip -d - ;; (*.tbz|*.tar.bz2) bzip2 -d - ;; (*.txz|*.tar.xz) xz -d - ;; (*.tlz|*.tar.lz) lzip -d - ;; esac | tar -xf - -C "/src/$2" || exec rm -rf "/src/$2" - mv "/src/$2"/*/* "/src/$2" - rmdir "/src/$2"/* 2>/dev/null || true + mv "/src/$2/$VERSION"/*/* "/src/$2/$VERSION" + rmdir "/src/$2/$VERSION"/* 2>/dev/null || true ;; (git) test -d "/src/$2" && exit 0 IFS="" read -r url <$PACK/git - git clone "$url" "/src/$2" + git clone "$url" "/src/$2/git" ;; -(cvs) test -d "/src/$2" && exit 0 - mkdir -p "/src/$2" - cd "/src/$2" +(cvs) test -d "/src/$2/cvs" && exit 0 + mkdir -p "/src/$2/cvs" + cd "/src/$2/cvs" read -r url path <$PACK/cvs cvs -qd "$url" checkout -P "$path" ;; @@ -41,16 +44,18 @@ case $1 in ;; (build) test -d "/src/$2" || "$0" get "$2" printf '\033[1m[ building %s ]\033[m\n' "$2" - cd "/src/$2" + cd "/src/$2/$VERSION" mkdir -p "$PREFIX" - exec "$PACK/build" + "$PACK/build" + ln -sf "$VERSION" "$VERSION/cur" + mv -f "$VERSION/cur" cur ;; (add) test -f "$PACK/dep" && cat "$PACK/dep" | xargs -n 1 "$0" add test -d "$PREFIX" || "$0" build "$2" || { rm -rf "$PREFIX"; exit 1; } printf '\033[1m[ installing %s ]\033[m\n' "$2" - cd "$PREFIX" + cd "/opt/$2/cur" find -L . -type d -exec sh -c 'mkdir -p "$DEST/$0"' {} \; - find -L . -type f -exec sh -c 'ln -sf "$PREFIX/$0" "$DEST/$0" {} \; + find -L . -type f -exec sh -c 'ln -sf "/opt/$2/cur/$0" "$DEST/$0"' {} \; ;; (del) printf '\033[1m[ deleting %s ]\033[m\n' "$2" cd "$PREFIX" diff --git a/pack/acme-client/build b/pack/acme-client/build @@ -1,7 +1,7 @@ #!/bin/sh -ex -export CFLAGS=-I"'/opt/libressl/current/include'" -export LDFLAGS=-L"'/opt/libressl/current/lib'" +export CFLAGS=-I"'/opt/libressl/cur/include'" +export LDFLAGS=-L"'/opt/libressl/cur/lib'" export PATH=$PACK:$PATH gmake MAN1DIR="$PREFIX/share/man/man1" PREFIX="$PREFIX" install diff --git a/pack/execline/build b/pack/execline/build @@ -2,8 +2,8 @@ ./configure \ --prefix="$PREFIX" \ - --with-sysdeps=/opt/libskarnet/current/lib/skalibs/sysdeps \ - --with-include=/opt/libskarnet/current/include \ - --with-lib=/opt/libskarnet/current/lib/skalibs + --with-sysdeps=/opt/libskarnet/cur/lib/skalibs/sysdeps \ + --with-include=/opt/libskarnet/cur/include \ + --with-lib=/opt/libskarnet/cur/lib/skalibs gmake install diff --git a/pack/farbfeld/config.mk b/pack/farbfeld/config.mk @@ -9,10 +9,14 @@ MANPREFIX = ${PREFIX}/share/man # flags CPPFLAGS = -D_DEFAULT_SOURCE -CFLAGS = -std=c99 -pedantic -Wall -Wextra -Os -I'$(DEST)/include' -LDFLAGS = -s -PNG-LDFLAGS = -lpng -L'$(DEST)/lib' -JPG-LDFLAGS = -ljpeg -L'$(DEST)/lib' +CFLAGS = -std=c99 -pedantic -Wall -Wextra -Os \ + -I/opt/libpng/cur/include \ + -I/opt/libjpeg/cur/include +LDFLAGS = -s -static \ + -L/opt/libjpeg/cur/lib \ + -L/opt/libpng/cur/lib +PNG-LDFLAGS = -lpng +JPG-LDFLAGS = -ljpeg # compiler and linker CC = cc diff --git a/pack/git/build b/pack/git/build @@ -1,11 +1,11 @@ #!/bin/sh -ex -export CFLAGS="-I'/opt/libz/current/include'" -export LDFLAGS="-L'/opt/libz/current/lib'" +export CFLAGS="-I'/opt/libz/cur/include'" +export LDFLAGS="-L'/opt/libz/cur/lib'" ./configure --prefix="$PREFIX" \ --without-tcltk \ --without-iconv \ - --with-zlib=/opt/libz/currentlibz/current + --with-zlib=/opt/libz/cur/current gmake install diff --git a/pack/irssi/build b/pack/irssi/build @@ -1,7 +1,7 @@ #!/bin/sh -ex -export OPENSSL_CFLAGS='-I/opt/libressl/current/include' -export OPENSSL_LIBS='-L/opt/libressl/current/lib -lssl' +export OPENSSL_CFLAGS='-I/opt/libressl/cur/include' +export OPENSSL_LIBS='-L/opt/libressl/cur/lib -lssl' cp -R "$PACK"/* . ./configure \ diff --git a/pack/libgit2/build b/pack/libgit2/build @@ -9,7 +9,7 @@ rm -fR "$SOURCE/src/win32/" cd src cc -c -fPIC \ - -I./ -I"/opt/libressl/current/include" -I../include/ -I../deps/http-parser/ \ + -I./ -I"/opt/libressl/cur/include" -I../include/ -I../deps/http-parser/ \ ./*.c ./*/*.c ./*/*/*.c ../deps/http-parser/*.c cc -shared -o libgit2.so *.o ar -rcs libgit2.a *.o diff --git a/pack/libtox/build b/pack/libtox/build @@ -1,7 +1,7 @@ #!/bin/sh -ex ./configure --prefix="$PREFIX" \ - --with-libsodium-libs=/opt/libsodium/current/lib \ - --with-libsodium-headers=/opt/libsodium/current/include + --with-libsodium-libs=/opt/libsodium/cur/lib \ + --with-libsodium-headers=/opt/libsodium/cur/include make install diff --git a/pack/links2/build b/pack/links2/build @@ -1,8 +1,8 @@ #!/bin/sh -ex make \ - CFLAGS="-I'/opt/libressl/current/include'" \ - LDFLAGS="-L'/opt/libressl/lib/include'" + CFLAGS="-I'/opt/libressl/cur/include'" \ + LDFLAGS="-L'/opt/libressl/cur/lib'" mkdir -p "$PREFIX/bin" "$PREFIX/share/man/man1" cp links "$PREFIX/bin" cp links.1 "$PREFIX/share/man/man1" diff --git a/pack/mpop/build b/pack/mpop/build @@ -1,7 +1,7 @@ #!/bin/sh -ex -export libssl_CFLAGS="-I'/opt/libressl/current/include'" -export libssl_LIBS="-static -L'/opt/libressl/current/lib' -lssl -lcrypto" +export libssl_CFLAGS="-I'/opt/libressl/cur/include'" +export libssl_LIBS="-static -L'/opt/libressl/cur/lib' -lssl -lcrypto" ./configure --prefix="$PREFIX" diff --git a/pack/msmtp/build b/pack/msmtp/build @@ -1,7 +1,7 @@ #!/bin/sh -ex -export libssl_CFLAGS="-I'/opt/libressl/current/include'" -export libssl_LIBS="-L'/opt/libressl/current/lib' -lssl -lcrypto" +export libssl_CFLAGS="-I'/opt/libressl/cur/include'" +export libssl_LIBS="-L'/opt/libressl/cur/lib' -lssl -lcrypto" ./configure --prefix="$PREFIX" --with-tls=openssl diff --git a/pack/netpgp/build b/pack/netpgp/build @@ -1,7 +1,7 @@ #!/bin/sh -ex -export CFLAGS="-I/opt/libressl/current/include" -export LDFLAGS="-L/opt/libressl/current/lib" +export CFLAGS="-I/opt/libressl/cur/include" +export LDFLAGS="-L/opt/libressl/cur/lib" ./configure --prefix="$PREFIX" \ --with-openssl="/opt/libressl/current/lib" diff --git a/pack/ngircd/build b/pack/ngircd/build @@ -1,3 +1,3 @@ #!/bin/sh -ex -./configure --sbindir="$PREFIX/bin" --with-openssl=/opt/libressl/current +./configure --sbindir="$PREFIX/bin" --with-openssl=/opt/libressl/cur diff --git a/pack/ratox/config.mk b/pack/ratox/config.mk @@ -11,17 +11,17 @@ CPPFLAGS = \ -DVERSION=\"${VERSION}\" \ -D_NSIG=NSIG -CFLAGS = \ - -I/usr/local/include \ - -I$(DEST)/opt/libtox/include \ - -I$(DEST)/opt/libvpx/include \ - -I$(DEST)/opt/libopus/include \ +CFLAGS = \ + -I/usr/local/include \ + -I/opt/libtox/cur/include \ + -I/opt/libvpx/cur/include \ + -I/opt/libopus/cur/include \ -Wall -Wunused $(CPPFLAGS) -LDFLAGS = \ - -L/usr/local/lib \ - -L$(DEST)/opt/libtox/lib \ - -L$(DEST)/opt/libvpx/lib \ - -L$(DEST)/opt/libopus/lib +LDFLAGS = \ + -L/usr/local/lib \ + -L/opt/libtox/cur/lib \ + -L/opt/libvpx/cur/lib \ + -L/opt/libopus/cur/lib LDLIBS = -ltoxcore -ltoxav -ltoxencryptsave -lopus -lvpx -lm -lpthread diff --git a/pack/reflex/build b/pack/reflex/build @@ -2,4 +2,4 @@ ./configure --prefix="$PREFIX" make install -mv "$DEST/bin/reflex" "$DEST/bin/flex" +mv "$PREFIX/bin/reflex" "$PREFIX/bin/flex" diff --git a/pack/s6-dns/build b/pack/s6-dns/build @@ -2,8 +2,8 @@ ./configure \ --prefix=$PREFIX/ \ - --with-sysdeps=/opt/libskarnet/lib/skalibs/sysdeps \ - --with-include=/opt/libskarnet/include \ - --with-lib=/opt/libskarnet/lib/skalibs + --with-sysdeps=/opt/libskarnet/cur/lib/skalibs/sysdeps \ + --with-include=/opt/libskarnet/cur/include \ + --with-lib=/opt/libskarnet/cur/lib/skalibs gmake install diff --git a/pack/s6-networking/build b/pack/s6-networking/build @@ -2,13 +2,13 @@ ./configure \ --prefix=$PREFIX/ \ - --with-sysdeps=/opt/libskarnet/lib/skalibs/sysdeps \ - --with-include=/opt/libskarnet/include \ - --with-lib=/opt/libskarnet/lib/skalibs \ - --with-lib=/opt/libskarnet/lib/execline \ - --with-lib=/opt/libskarnet/lib/s6 \ - --with-lib=/opt/libskarnet/lib/s6-dns \ + --with-sysdeps=/opt/libskarnet/cur/lib/skalibs/sysdeps \ + --with-include=/opt/libskarnet/cur/include \ + --with-lib=/opt/libskarnet/cur/lib/skalibs \ + --with-lib=/opt/libskarnet/cur/lib/execline \ + --with-lib=/opt/libskarnet/cur/lib/s6 \ + --with-lib=/opt/libskarnet/cur/lib/s6-dns \ --enable-ssl=bearssl \ - --with-ssl-path=/opt/libbearssl + --with-ssl-path=/opt/libbearssl/cur gmake install diff --git a/pack/s6-portable-utils/build b/pack/s6-portable-utils/build @@ -1,9 +1,9 @@ #!/bin/sh -ex ./configure \ - --prefix=$PREFIX/ \ - --with-sysdeps=/opt/libskarnet/lib/skalibs/sysdeps \ - --with-include=/opt/libskarnet/include \ - --with-lib=/opt/libskarnet/lib/skalibs + --prefix="$PREFIX" \ + --with-sysdeps=/opt/libskarnet/cur/lib/skalibs/sysdeps \ + --with-include=/opt/libskarnet/cur/include \ + --with-lib=/opt/libskarnet/cur/lib/skalibs gmake install diff --git a/pack/s6-rc/build b/pack/s6-rc/build @@ -1,11 +1,11 @@ #!/bin/sh -ex ./configure \ - --prefix=$PREFIX/ \ - --with-sysdeps=/opt/libskarnet/lib/skalibs/sysdeps \ - --with-include=/opt/libskarnet/include \ - --with-lib=/opt/libskarnet/lib/skalibs \ - --with-lib=/opt/execline/lib/execline \ - --with-lib=/opt/s6/lib/s6 + --prefix="$PREFIX" \ + --with-sysdeps=/opt/libskarnet/cur/lib/skalibs/sysdeps \ + --with-include=/opt/libskarnet/cur/include \ + --with-lib=/opt/libskarnet/cur/lib/skalibs \ + --with-lib=/opt/execline/cur/lib/execline \ + --with-lib=/opt/s6/cur/lib/s6 gmake install diff --git a/pack/s6/build b/pack/s6/build @@ -1,10 +1,10 @@ #!/bin/sh -ex ./configure \ - --prefix=$PREFIX/ \ - --with-sysdeps=/opt/libskarnet/lib/skalibs/sysdeps \ - --with-include=/opt/libskarnet/include \ - --with-lib=/opt/libskarnet/lib/skalibs \ - --with-lib=/opt/execline/lib/execline + --prefix="$PREFIX" \ + --with-sysdeps=/opt/libskarnet/cur/lib/skalibs/sysdeps \ + --with-include=/opt/libskarnet/cur/include \ + --with-lib=/opt/libskarnet/cur/lib/skalibs \ + --with-lib=/opt/execline/cur/lib/execline gmake install diff --git a/pack/stagit-gopher/config.mk b/pack/stagit-gopher/config.mk @@ -7,8 +7,8 @@ MANPREFIX = ${PREFIX}/share/man # compiler and linker #CC = cc -GITINC = $(DEST)/include -GITLIB = $(DEST)/lib +GITINC = /opt/libgit2/cur/include +GITLIB = /opt/libgit2/cur/lib # includes and libs INCS = -I${GITINC} diff --git a/pack/stagit/config.mk b/pack/stagit/config.mk @@ -7,8 +7,8 @@ MANPREFIX = ${PREFIX}/share/man # compiler and linker #CC = cc -GITINC = $(DEST)/include -GITLIB = $(DEST)/lib +GITINC = /opt/libgit2/cur/include +GITLIB = /opt/libgit2/cur/lib # includes and libs INCS = -I${GITINC} diff --git a/pack/tinyldap/build b/pack/tinyldap/build @@ -1,11 +1,11 @@ #!/bin/sh -ex rm -rf tinyldap -make DIET='sh -cx "cc -I/opt/libowfat/include/ -L/opt/libowfat/lib/ \$$@"' +make DIET='sh -cx "cc -I/opt/libowfat/cur/include/ -L/opt/libowfat/lib/ \$$@"' mkdir -p "$PREFIX/bin/" cp addindex bindrequest dumpidx ldapclient ldapclient_str parse tinyldap \ tinyldap_debug tinyldap_standalone \ "$PREFIX/bin/" -#cc -L/opt/libowfat/lib/ -L./ -I/opt/libowfat/include/ -I./ -pipe "$PACK/checkpassword.c" -lowfat +#cc -L/opt/libowfat/cur/lib/ -L./ -I/opt/libowfat/cur/include/ -I./ -pipe "$PACK/checkpassword.c" -lowfat diff --git a/pack/tinyldap/version b/pack/tinyldap/version @@ -1 +0,0 @@ - diff --git a/pack/transmission/build b/pack/transmission/build @@ -3,20 +3,20 @@ export PKG_CONFIG=$(which true) export LIBCURL_LIBS=-lcurl -export LIBCURL_CFLAGS="-I/opt/libcurl/include" -export LIBCURL_LDFLAGS="-L/opt/libcurl/lib" +export LIBCURL_CFLAGS="-I/opt/libcurl/cur/include" +export LIBCURL_LDFLAGS="-L/opt/libcurl/cur/lib" export LIBEVENT_LIBS=-levent -export LIBEVENT_CFLAGS="-I/opt/libevent/include" -export LIBEVENT_LDFLAGS="-L/opt/libevent/lib" +export LIBEVENT_CFLAGS="-I/opt/libevent/cur/include" +export LIBEVENT_LDFLAGS="-L/opt/libevent/cur/lib" export ZLIB_LIBS=-lz -export ZLIB_CFLAGS="-I/opt/libz/include" -export ZLIB_LDFLAGS="-L/opt/libz/lib" +export ZLIB_CFLAGS="-I/opt/libz/cur/include" +export ZLIB_LDFLAGS="-L/opt/libz/cur/lib" export OPENSSL_LIBS='-lssl -lcrypto' -export OPENSSL_CFLAGS="-I/opt/libressl/include" -export OPENSSL_LDFLAGS="-L/opt/libressl/lib" +export OPENSSL_CFLAGS="-I/opt/libressl/cur/include" +export OPENSSL_LDFLAGS="-L/opt/libressl/cur/lib" ./configure --prefix="$PREFIX" \ --with-crypto=openssl \