aboutsummaryrefslogblamecommitdiffstats
path: root/community/google-authenticator/APKBUILD
blob: af14590ebf7a37f7a49ce31212ef6e1c62557982 (plain) (tree)
1
2
3
4
5
6
7
8
9
                                                      
                                                     
                            
           
        
                                         
                                              
                                                           
          
                    
                                                                    
                          

                                                                                                              
 
           


                       
 
         






                                         

                                         


           



                                                               

 
         


                  
                                                                                                                                                                               
# Contributor: Fabio Napoleoni <f.napoleoni@gmail.com>
# Maintainer: Fabio Napoleoni <f.napoleoni@gmail.com>
pkgname=google-authenticator
pkgver=1.06
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="a278360be1a3c5a03ddb38d40be45dbba16b6f565ee919377a918565bd8c567ce261890dc10d277edea4f469cf1da1d9cf2c9f3ccfeef8c6887d713c785a5440  google-authenticator-1.06.tar.gz"