summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docker/Dockerfile6
-rwxr-xr-xpackages/openvpn-otp/build-openvpn-otp.sh12
2 files changed, 16 insertions, 2 deletions
diff --git a/docker/Dockerfile b/docker/Dockerfile
index 86d54eaa..f8ad185d 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -463,6 +463,12 @@ RUN apt-get update && apt-get install -y \
dh-virtualenv \
python3-venv
+# Packages needed for openvpn-otp
+RUN apt-get update && apt-get install -y \
+ debhelper \
+ libssl-dev \
+ openvpn
+
# Creating image for embedded systems needs this utilities to prepare a image file
RUN apt-get update && apt-get install -y \
parted udev zip
diff --git a/packages/openvpn-otp/build-openvpn-otp.sh b/packages/openvpn-otp/build-openvpn-otp.sh
index 76bc3a7f..6cd8ca97 100755
--- a/packages/openvpn-otp/build-openvpn-otp.sh
+++ b/packages/openvpn-otp/build-openvpn-otp.sh
@@ -9,9 +9,17 @@ if [ ! -d ${SRC} ]; then
exit 1
fi
+for pkt in debhelper libssl-dev openvpn
+do
+ dpkg -s $pkt 2>&1 >/dev/null
+ if [ $? -ne 0 ]; then
+ echo "Package $pkt not installed - required"
+ exit 1
+ fi
+done
+
# Build instructions as per https://github.com/evgeny-gridasov/openvpn-otp/blob/master/README.md
cd ${SRC}
-apt-get -y install debhelper libssl-dev openvpn
./autogen.sh
./configure --prefix=/usr
make
@@ -24,7 +32,7 @@ fpm --input-type dir --output-type deb --name openvpn-otp \
--maintainer "VyOS Package Maintainers <maintainers@vyos.net>" \
--description "OpenVPN OTP Authentication support." \
--depends openvpn --architecture $(dpkg --print-architecture) \
- --version $(git describe --always) --deb-compression gz usr
+ --version $(git describe --tags --always) --deb-compression gz usr
cp *.deb ${CWD}