# Contributor: Fabio Napoleoni # Maintainer: Fabio Napoleoni global pkgname := 'google-authenticator' global pkgver := '1.02' global pkgrel := '1' global pkgdesc := '"Google Authenticator PAM module'" global url := '"https://github.com/google/google-authenticator'" global arch := '"all'" global license := '"ASL-2.0'" global makedepends := '"autoconf automake libtool linux-pam-dev m4 libressl-dev'" global subpackages := ""$pkgname-doc"" global source := ""$pkgname-$pkgver.tar.gz::https://github.com/google/google-authenticator/archive/$pkgver.tar.gz"" global builddir := ""$srcdir/$pkgname-$pkgver/libpam"" proc prepare { cd $builddir default_prepare ./bootstrap.sh } proc build { cd $builddir ./configure \ --build=$CBUILD \ --host=$CHOST \ --prefix=/usr \ --libdir=/lib \ --sysconfdir=/etc \ --mandir=/usr/share/man \ --infodir=/usr/share/info make } proc 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" } global sha512sums := '"8bf81beaf705f0b12f0ed947960dbbc8155add6d83878b651dc1d6658d520dfbbdbe8085b1f244bcfa06d0dd4dfb4cd2177c0a27df4aab5fd1bc4308eef3f7b0 google-authenticator-1.02.tar.gz'" (CommandList children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:pkgname) op: Equal rhs: {(google-authenticator)} spids: [6] ) ] spids: [6] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:pkgver) op:Equal rhs:{(1.02)} spids:[9])] spids: [9] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:pkgrel) op:Equal rhs:{(1)} spids:[12])] spids: [12] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:pkgdesc) op: Equal rhs: {(DQ ("Google Authenticator PAM module"))} spids: [15] ) ] spids: [15] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:url) op: Equal rhs: {(DQ ("https://github.com/google/google-authenticator"))} spids: [20] ) ] spids: [20] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:arch) op:Equal rhs:{(DQ (all))} spids:[25])] spids: [25] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:license) op:Equal rhs:{(DQ (ASL-2.0))} spids:[30])] spids: [30] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:makedepends) op: Equal rhs: {(DQ ("autoconf automake libtool linux-pam-dev m4 libressl-dev"))} spids: [35] ) ] spids: [35] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:subpackages) op: Equal rhs: {(DQ ($ VSub_Name "$pkgname") (-doc))} spids: [40] ) ] spids: [40] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:source) op: Equal rhs: { (DQ ($ VSub_Name "$pkgname") (-) ($ VSub_Name "$pkgver") (".tar.gz::https://github.com/google/google-authenticator/archive/") ($ VSub_Name "$pkgver") (.tar.gz) ) } spids: [46] ) ] spids: [46] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:builddir) op: Equal rhs: { (DQ ($ VSub_Name "$srcdir") (/) ($ VSub_Name "$pkgname") (-) ($ VSub_Name "$pkgver") (/libpam) ) } spids: [56] ) ] spids: [56] ) (FuncDef name: prepare body: (BraceGroup children: [ (C {(cd)} {(DQ ($ VSub_Name "$builddir"))}) (C {(default_prepare)}) (C {(./bootstrap.sh)}) ] spids: [71] ) spids: [67 70] ) (FuncDef name: build body: (BraceGroup children: [ (C {(cd)} {(DQ ($ VSub_Name "$builddir"))}) (C {(./configure)} {(--build) (Lit_Other "=") ($ VSub_Name "$CBUILD")} {(--host) (Lit_Other "=") ($ VSub_Name "$CHOST")} {(--prefix) (Lit_Other "=") (/usr)} {(--libdir) (Lit_Other "=") (/lib)} {(--sysconfdir) (Lit_Other "=") (/etc)} {(--mandir) (Lit_Other "=") (/usr/share/man)} {(--infodir) (Lit_Other "=") (/usr/share/info)} ) (C {(make)}) ] spids: [93] ) spids: [89 92] ) (FuncDef name: package body: (BraceGroup children: [ (C {(cd)} {(DQ ($ VSub_Name "$builddir"))}) (C {(make)} {(Lit_VarLike "DESTDIR=") (DQ ($ VSub_Name "$pkgdir"))} {(install)}) (C {(mkdir)} {(-p)} {(DQ ($ VSub_Name "$pkgdir") (/etc/pam.d))}) (SimpleCommand words: [ {(echo)} {(-e)} { (DQ (auth) (EscapedLiteralPart token:) (required) (EscapedLiteralPart token:) (pam_google_authenticator.so) ) } ] redirects: [ (Redir op_id: Redir_Great fd: -1 arg_word: {(DQ ($ VSub_Name "$pkgdir") (/etc/pam.d/google-authenticator))} spids: [201] ) ] ) ] spids: [157] ) spids: [153 156] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:sha512sums) op: Equal rhs: { (DQ ( "8bf81beaf705f0b12f0ed947960dbbc8155add6d83878b651dc1d6658d520dfbbdbe8085b1f244bcfa06d0dd4dfb4cd2177c0a27df4aab5fd1bc4308eef3f7b0 google-authenticator-1.02.tar.gz" ) ) } spids: [211] ) ] spids: [211] ) ] )