]> pd.if.org Git - zpackage/commitdiff
fixes for zpm-update
authorNathan Wagner <nw@hydaspes.if.org>
Wed, 6 Feb 2019 02:40:41 +0000 (02:40 +0000)
committerNathan Wagner <nw@hydaspes.if.org>
Wed, 6 Feb 2019 02:40:41 +0000 (02:40 +0000)
Makefile
zpm-update

index 5334ad8504f842ac11a05cc09545823fc32e49c4..c135bad4aef0f466087ab844d2699399234e532d 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -206,6 +206,26 @@ install: $(COMPILED) $(MANPAGES)
 scan-prep: clean sqlite/sqlite3.o sqlite/shell.o lib/liblzma.a
        @echo scan-build -v -o report make -j10
 
+# crypto/tls items
+X255OBJ= \
+base.o \
+fe_0.o \
+fe_1.o \
+fe_add.o \
+fe_copy.o \
+fe_cswap.o \
+fe_frombytes.o \
+fe_invert.o \
+fe_mul.o \
+fe_mul121666.o \
+fe_sq.o \
+fe_sub.o \
+fe_tobytes.o \
+scalarmult.o
+
+x25519.o: $(addprefix crypto/ref10/, $(X255OBJ))
+       ld -o $@ -r $+
+
 clean:
        rm -f *.o sqlite/*.o lib/*.o $(LZMAOBJ) liblzma.a \
                libelf.a libzpm.a zpm-addfile soname \
@@ -214,4 +234,6 @@ clean:
                t/ctap/*.o \
                $(ZPKGBIN) \
                db.sql \
-               elf/*.o lib/jsw/*.o
+               elf/*.o lib/jsw/*.o \
+               $(addprefix crypto/ref10/, $(X255OBJ)) \
+               x25519.o
index dbec8b0ecf13f6fd94c219b4b03f68f5e9e5ee7c..39c111a2f17f6e7274bac7f298f09834b8e427ea 100755 (executable)
@@ -132,10 +132,22 @@ while getopts f:d:R:nSCvAObBLUzp opt; do
                *) die "usage ..." ;;
        esac
 done
-shift $(( OPTIND - 1))
+shift $(( OPTIND - 1 ))
+
+if [ -n "$rootdir" ]; then
+       : rootdir=${rootdir%%/}
+       ZPM_ROOT_DIR=$rootdir
+       export ZPM_ROOT_DIR
+fi
+
+if [ -n "$localdb" ]; then
+       ZPMDB=$localdb
+elif [ -z "$ZPMDB" ]; then
+       ZPMDB="$ZPM_ROOT_DIR/var/lib/zpm/local.db"
+fi
 
-ZPMDB=${localdb:-${ZPMDB:-/var/lib/zpm/local.db}}
 export ZPMDB
+
 # create the localdb if needed
 zpm init $ZPMDB
 
@@ -323,12 +335,6 @@ if [ -n "$to_remove" ]; then
        done
 fi
 
-if [ -n "$rootdir" ]; then
-       ZPM_ROOT_DIR=$rootdir
-       export ZPM_ROOT_DIR
-       : rootdir=${rootdir%%/}
-fi
-
 if [ $dryrun -gt 0 ]; then
        runscripts=0 # we don't want to run post scripts on a dry-run
        syncopts="$syncopts -n"