Skip to content

Instantly share code, notes, and snippets.

@rcrowley
Last active August 31, 2015 00:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rcrowley/414e3a1c2279a8b63195 to your computer and use it in GitHub Desktop.
Save rcrowley/414e3a1c2279a8b63195 to your computer and use it in GitHub Desktop.
VERSION="1.9.14"
BUILD="slack2"
set -e -x
OLDESTPWD="$PWD"
cd "$(mktemp -d)"
trap "rm -rf \"$PWD\"" EXIT INT QUIT TERM
curl -LO "https://dl.duosecurity.com/duo_unix-$VERSION.tar.gz"
tar xf "duo_unix-$VERSION.tar.gz"
cd "duo_unix-$VERSION"
./configure --enable-lib64="no" --prefix="/usr" --sysconfdir="/etc" --with-pam="/lib/security"
make
mkdir "rootfs"
make install DESTDIR="$PWD/rootfs"
fakeroot fpm -C "rootfs" \
-a "amd64" \
-m "Richard Crowley <rcrowley@slack-corp.com>" \
-n "duo-unix" -v "$VERSION-$BUILD" \
-p "$OLDESTPWD/duo-unix_${VERSION}-${BUILD}_amd64.deb" \
-s "dir" -t "deb" "lib" "usr"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment