aboutsummaryrefslogtreecommitdiffstats
path: root/community/oath-toolkit/APKBUILD
blob: 4972284109ba2d04509fcac70a9df03d3a3400e3 (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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# Contributor: Leo <thinkabit.ukim@gmail.com>
# Contributor: Jann - Ove Risvik <jann.ove@dev.usaklig.com>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=oath-toolkit
pkgver=2.6.7
pkgrel=0
pkgdesc="OATH Toolkit One-time password components"
url="http://www.nongnu.org/oath-toolkit/index.html"
arch="all"
license="GPL-3.0-or-later"
depends="perl cvs diffutils"
makedepends="linux-pam-dev libxml2-dev xmlsec-dev autoconf automake libtool
	gtk-doc"
subpackages="$pkgname-dev $pkgname-doc $pkgname-liboath $pkgname-libpskc
	$pkgname-oathtool $pkgname-pam_oath"
source="https://download.savannah.gnu.org/releases/oath-toolkit/oath-toolkit-$pkgver.tar.gz"

prepare() {
	default_prepare
	autoreconf --force --install
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var
	make
}

package() {
	make DESTDIR="$pkgdir" install
}

liboath() {
	depends=""
	pkgdesc="A shared and static C library for OATH handling."
	license="LGPL-2.1-or-later"
	mkdir -p "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/liboath.so* "$subpkgdir"/usr/lib
}

libpskc() {
	depends=""
	pkgdesc="Library for Portable Symmetric Key Container"
	license="LGPL-2.1-or-later"
	mkdir -p "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/libpskc.so* "$subpkgdir"/usr/lib
}

oathtool() {
	depends="oath-toolkit-liboath"
	pkgdesc="A command line tool for generating and validating OTPs."
	license="GPL-3.0-or-later"
	mkdir -p "$subpkgdir"/usr/bin
	mv "$pkgdir"/usr/bin/oathtool "$subpkgdir"/usr/bin
}

pam_oath() {
	depends="oath-toolkit-liboath"
	license="GPL-3.0-or-later"
	pkgdesc="A PAM module for pluggable login authentication for OATH."
	mkdir -p "$subpkgdir"/lib/security
	mv "$pkgdir"/usr/lib/security/pam_oath.so "$subpkgdir"/lib/security
}

sha512sums="
50edff75c8366887d69cf4740c4cc3bdfc3e43cbd4910ff40f735bca489f0953d7e5a21130f12782ac7a1f2fb00f0db313aff139085f23daba78a69bc7b2eb12  oath-toolkit-2.6.7.tar.gz
"