aboutsummaryrefslogtreecommitdiffstats
path: root/community/google-authenticator/APKBUILD
blob: f1c02c01c5a946639ac7f02dea214513781556c6 (plain) (blame)
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
43
44
# Contributor: Fabio Napoleoni <f.napoleoni@gmail.com>
# Maintainer: Fabio Napoleoni <f.napoleoni@gmail.com>
pkgname=google-authenticator
pkgver=1.07
pkgrel=0
pkgdesc="Google Authenticator PAM module"
options="checkroot !check" # 1 of 2 tests fail
url="https://github.com/google/google-authenticator-libpam"
arch="all"
license="Apache-2.0"
makedepends="autoconf automake libtool linux-pam-dev m4 openssl-dev"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/google/google-authenticator-libpam/archive/$pkgver.tar.gz"
builddir="$srcdir/$pkgname-libpam-$pkgver"

prepare() {
	default_prepare
	./bootstrap.sh
}

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

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

check() {
	make check
}

sha512sums="3e2bc9bfc3759f9004d08b1557868a33b628290b62aa9051d21072a66e18ca4b09cdef0fc8303943cb36ac5b61fe864a9de9fe0a1d8677ee86403cfd4c89c1fb  google-authenticator-1.07.tar.gz"