commit 035785be4a44d99bbc763e655aa28f09a304f8bb
parent 76789082797b2b86687ee1c477c6645428689942
Author: Josuah Demangeon <mail@josuah.net>
Date: Wed, 15 Aug 2018 19:37:26 +0200
pack: finally succeed at packing openvpn
Diffstat:
11 files changed, 17 insertions(+), 15 deletions(-)
diff --git a/bin/hgrep b/bin/hgrep
@@ -0,0 +1,3 @@
+#!/bin/sh -e
+
+find /usr/include -name '*.[hc]' -exec grep "$@" {} +
diff --git a/pack/bin/pack-add b/pack/bin/pack-add
@@ -2,10 +2,7 @@
# build a program into /opt/<package>/<version> and symlink it into /local
test -f "/etc/pack/$1/dep" && xargs -n 1 pack-add </etc/pack/$1/dep
-test -d "/opt/$1" || pack-build "$1" || {
- rm -rf "/opt/$1"
- exit 1
-}
+test -d "/opt/$1" || pack-build "$1" || { rm -rf "/opt/$1"; exit 1; }
printf '\033[1m[ installing %s ]\033[m\n' "$1"
cd "/opt/$1"
find -L * -type d -exec sh -c 'mkdir -p "/local/$0"' {} \;
diff --git a/pack/bin/pack-cvs b/pack/bin/pack-cvs
@@ -5,4 +5,4 @@ test -d "/src/$1" && exit 0
mkdir -p "/src/$1"
cd "/src/$1"
read -r url path </etc/pack/$1/cvs
-cvs -qd "$url" checkout -P "$path"
+exec cvs -qd "$url" checkout -P "$path"
diff --git a/pack/bin/pack-git b/pack/bin/pack-git
@@ -3,4 +3,4 @@
test -d "/src/$1" && exit 0
IFS="" read -r url </etc/pack/$1/git
-git clone "$url" "/src/$1"
+exec git clone "$url" "/src/$1"
diff --git a/pack/bin/pack-tar b/pack/bin/pack-tar
@@ -9,6 +9,6 @@ wget -O - "$url" | case $url in
(*.tbz|*.tar.bz2) bzip2 -d - ;;
(*.txz|*.tar.xz) xz -d - ;;
(*.tlz|*.tar.lz) lzip -d - ;;
-esac | tar -xf - -C "/src/$1" || exec rm -rf "/src/$1"
+esac | tar -xf - -C "/src/$1" || { rm -rf "/src/$1"; exit 1; }
mv "/src/$1"/*/* "/src/$1"
rmdir "/src/$1"/* 2>/dev/null || true
diff --git a/pack/bin/pack-up b/pack/bin/pack-up
@@ -3,4 +3,4 @@
pack-del "$1"
rm -rf "/src/$1"
-pack-add "$1"
+exec pack-add "$1"
diff --git a/pack/libmbedtls/2.12.0/build b/pack/libmbedtls/2.12.0/build
@@ -0,0 +1,3 @@
+#!/bin/sh -ex
+
+make DESTDIR="$PREFIX" install
diff --git a/pack/libmbedtls/2.12.0/dep b/pack/libmbedtls/2.12.0/dep
@@ -0,0 +1 @@
+gmake/cur
diff --git a/pack/libmbedtls/2.12.0/tar b/pack/libmbedtls/2.12.0/tar
@@ -1 +1 @@
-https://tls.mbed.org/download/start/mbedtls-2.12.0-apache.tgz
+https://tls.mbed.org/download/mbedtls-2.12.0-apache.tgz
diff --git a/pack/openvpn/2.4.6/.build.swp b/pack/openvpn/2.4.6/.build.swp
Binary files differ.
diff --git a/pack/openvpn/2.4.6/build b/pack/openvpn/2.4.6/build
@@ -1,15 +1,13 @@
#!/bin/sh -ex
-export CFLAGS="$CFLAGS -I/opt/libmbedtls/cur/include"
-export LDFLAGS="$LDFLAGS -L/opt/libmbedtls/cur/lib"
-export CFLAGS="$CFLAGS -I/opt/liblz4/cur/include"
-export LDFLAGS="$LDFLAGS -L/opt/liblz4/cur/lib"
+touch .gitignore .gitattributes
./configure --prefix="$PREFIX" \
+ --with-crypto-library=mbedtls \
--enable-iproute2 \
--disable-lzo \
--disable-plugin-auth-pam \
- --with-crypto-library=mbed
-./configure
+ CFLAGS="-I/opt/libmbedtls/cur/include -I/opt/liblz4/cur/include" \
+ LDFLAGS="-L/opt/liblz4/cur/lib -L/opt/libmbedtls/cur/lib -lmbedtls -llz4 -static"
make install