forked from kylemanna/docker-openvpn
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
google-authenticator: Manually build Alpine package
* Build the Alpine package directly * Resolves kylemanna#153
- Loading branch information
Showing
2 changed files
with
66 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,11 +5,21 @@ FROM alpine:3.4 | |
|
||
MAINTAINER Kyle Manna <[email protected]> | ||
|
||
RUN echo "http://dl-4.alpinelinux.org/alpine/edge/community/" >> /etc/apk/repositories && \ | ||
echo "http://dl-4.alpinelinux.org/alpine/edge/testing/" >> /etc/apk/repositories && \ | ||
apk add --update openvpn iptables bash easy-rsa openvpn-auth-pam google-authenticator pamtester && \ | ||
RUN echo "http://dl-4.alpinelinux.org/alpine/edge/testing/" >> /etc/apk/repositories && \ | ||
apk add --update openvpn iptables bash easy-rsa openvpn-auth-pam pamtester && \ | ||
ln -s /usr/share/easy-rsa/easyrsa /usr/local/bin && \ | ||
rm -rf /tmp/* /var/tmp/* /var/cache/apk/* | ||
rm -rf /tmp/* /var/tmp/* /var/cache/apk/* /var/cache/distfiles/* | ||
|
||
COPY alpine /tmp/local | ||
RUN adduser -D -G abuild abuild && \ | ||
chown -R abuild:abuild /tmp/local && \ | ||
apk add --update alpine-sdk && \ | ||
su -s /bin/bash -c 'cd /tmp/local/google-authenticator && abuild-keygen -a && abuild -Fr' abuild && \ | ||
cp /home/abuild/.abuild/abuild*.pub /etc/apk/keys/ && \ | ||
apk add /home/abuild/packages/local/x86_64/google-authenticator-20160207-r1.apk && \ | ||
apk del --purge --rdepends alpine-sdk && rm -rf /home/abuild && \ | ||
rm -rf /tmp/* /var/tmp/* /var/cache/apk/* /var/cache/distfiles/* | ||
|
||
|
||
# Needed by scripts | ||
ENV OPENVPN /etc/openvpn | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# Contributor: Fabio Napoleoni <[email protected]> | ||
# Maintainer: | ||
pkgname=google-authenticator | ||
pkgver=20160207 | ||
pkgrel=1 | ||
pkgdesc="Google Authenticator PAM module" | ||
url="https://github.com/google/google-authenticator" | ||
arch="all" | ||
license="ASL 2.0" | ||
depends= | ||
depends_dev= | ||
makedepends="$depends_dev autoconf automake libtool linux-pam-dev m4 openssl-dev" | ||
install= | ||
subpackages="$pkgname-doc" | ||
source="https://github.com/google/google-authenticator/archive/c0404dcdbda9ab9e4f0b8451ecdd44eee8db2425.zip" | ||
|
||
_builddir="$srcdir"/$pkgname-c0404dcdbda9ab9e4f0b8451ecdd44eee8db2425/libpam | ||
|
||
prepare() { | ||
local i | ||
cd "$_builddir" | ||
for i in $source; do | ||
case $i in | ||
*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; | ||
esac | ||
done | ||
} | ||
|
||
build() { | ||
cd "$_builddir" | ||
./bootstrap.sh || return 1 | ||
./configure \ | ||
--build=$CBUILD \ | ||
--host=$CHOST \ | ||
--prefix=/usr \ | ||
--libdir=/lib \ | ||
--sysconfdir=/etc \ | ||
--mandir=/usr/share/man \ | ||
--infodir=/usr/share/info \ | ||
|| return 1 | ||
|
||
make || return 1 | ||
} | ||
|
||
package() { | ||
cd "$_builddir" | ||
make DESTDIR="$pkgdir" install || return 1 | ||
} | ||
|
||
md5sums="33d3cbd0488bcb4f50b34b5670deffae c0404dcdbda9ab9e4f0b8451ecdd44eee8db2425.zip" | ||
sha256sums="e32abe693e54195bdb6aca52783e6e1c239e67296876ac59211a59e4608338b8 c0404dcdbda9ab9e4f0b8451ecdd44eee8db2425.zip" | ||
sha512sums="b44a626e6cc5d8e27685f5d39b5d33f49fc7070331db7b458d3ee40723972821bb8ed5458f27a287dc664d162acf1f8f9a36ca3b1bf767f2bbf27d4f538e9872 c0404dcdbda9ab9e4f0b8451ecdd44eee8db2425.zip" |