summaryrefslogtreecommitdiff
path: root/community/google-authenticator/APKBUILD
blob: e10bcf17e37c87dfb9f12b02278504a7e78e17b4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# Contributor: Fabio Napoleoni <f.napoleoni@gmail.com>
# Maintainer: Fabio Napoleoni <f.napoleoni@gmail.com>
pkgname=google-authenticator
pkgver=1.02
pkgrel=1
pkgdesc="Google Authenticator PAM module"
url="https://github.com/google/google-authenticator"
arch="all"
license="ASL-2.0"
makedepends="autoconf automake libtool linux-pam-dev m4 libressl-dev"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/google/google-authenticator/archive/$pkgver.tar.gz"
builddir="$srcdir/$pkgname-$pkgver/libpam"

prepare() {
	cd "$builddir"
	default_prepare
	./bootstrap.sh
}

build() {
	cd "$builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--libdir=/lib \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info
	make
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install
	mkdir -p "$pkgdir/etc/pam.d"
	echo -e "auth\trequired\tpam_google_authenticator.so" \
		> "$pkgdir/etc/pam.d/google-authenticator"
}

sha512sums="8bf81beaf705f0b12f0ed947960dbbc8155add6d83878b651dc1d6658d520dfbbdbe8085b1f244bcfa06d0dd4dfb4cd2177c0a27df4aab5fd1bc4308eef3f7b0  google-authenticator-1.02.tar.gz"