Subject: [alpine-aports] [PATCH] testing/oath-toolkit: new aport

From: systmkor <[email-masked]>
Date: Thu, 24 Sep 2015 20:20:57 -0700

OATH Toolkit provides components for building one-time password
authentication systems.
http://www.nongnu.org/oath-toolkit/

ref #1847
---
 testing/oath-toolkit/APKBUILD | 222 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 222 insertions(+)
 create mode 100644 testing/oath-toolkit/APKBUILD

diff --git a/testing/oath-toolkit/APKBUILD b/testing/oath-toolkit/APKBUILD
new file mode 100644
index 0000000..4aa6379
--- /dev/null
+++ b/testing/oath-toolkit/APKBUILD
@@ -0,0 +1,222 @@
+# Contributor:
+# Maintainer:
+pkgname=oath-toolkit
+pkgver=2.6.1
+pkgrel=0
+pkgdesc="The OATH Toolkit provide components for building one-time password authentication systems."
+url="http://www.nongnu.org/oath-toolkit/"
+arch="any"
+license="LGPL2+ GPL3+"
+depends="liboath=$pkgver-r$pkgrel libpskc=$pkgver-r$pkgrel oathtool=$pkgver-r$pkgrel pskctool=$pkgver-r$pkgrel pam-oath=$pkgver-r$pkgrel"
+depends_dev=""
+makedepends="$depends_dev xmlsec-dev linux-pam-dev libxml2-dev"
+install=""
+subpackages="$pkgname-doc $pkgname-dev
+	     liboath liboath-doc:liboath_doc liboath-dev:liboath_dev
+	     libpskc libpskc-doc:libpskc_doc libpskc-dev:libpskc_dev
+	     oathtool oathtool-doc:oathtool_doc
+	     pskctool pskctool-doc:pskctool_doc
+	     pam-oath:pam_oath pam-oath-doc:pam_oath_doc"
+source="http://download.savannah.gnu.org/releases/${pkgname}/${pkgname}-${pkgver}.tar.gz"
+
+_builddir=${srcdir}/${pkgname}-${pkgver}
+prepare() {
+	local i
+	cd "$_builddir"
+	for i in $source; do
+		case $i in
+		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+		esac
+	done
+}
+
+build() {
+	cd "$_builddir"
+	./configure \
+		--build=$CBUILD \
+		--host=$CHOST \
+		--prefix=/usr \
+		--sysconfdir=/etc \
+		--mandir=/usr/share/man \
+		--infodir=/usr/share/info \
+		--localstatedir=/var \
+		|| return 1
+	make || return 1
+}
+
+package() {
+	cd "$_builddir"
+	make DESTDIR="$pkgdir" install || return 1
+
+	install -D -m 644 COPYING "$pkgdir/usr/share/licenses/$pkgname/LICENSE" || return 1
+	# libpskc & liboath use the same LICENSE and libpskc doesn't have a COPYING file in it's subdir
+	install -D -m 644 liboath/COPYING "$pkgdir/usr/share/licenses/liboath/LICENSE" || return 1
+	install -D -m 644 liboath/COPYING "$pkgdir/usr/share/licenses/libpskc/LICENSE" || return 1
+	# oathtool & pskctool use the same LICENSE and pskctool doesn't have a COPYING file in it's subdir
+	install -D -m 644 oathtool/COPYING "$pkgdir/usr/share/licenses/oathtool/LICENSE" || return 1
+	install -D -m 644 oathtool/COPYING "$pkgdir/usr/share/licenses/pskctool/LICENSE" || return 1
+	install -D -m 644 pam_oath/COPYING "$pkgdir/usr/share/licenses/pam-oath/LICENSE" || return 1
+
+	install -D -m 644 README "$pkgdir/usr/share/doc/$pkgname/README" || return 1
+	install -D -m 644 AUTHORS "$pkgdir/usr/share/doc/$pkgname/AUHTORS" || return 1
+	install -D -m 644 pam_oath/README "$pkgdir/usr/share/doc/pam-oath/README" || return 1
+	install -D -m 644 libpskc/README "$pkgdir/usr/share/doc/libpskc/README" || return 1
+	rm -f "$pkgdir"/usr/lib/*.la
+}
+
+doc() {
+	arch="noarch"
+	depends="
+	     liboath-doc=$pkgver-r$pkgrel 
+	     libpskc-doc=$pkgver-r$pkgrel
+	     oathtool-doc=$pkgver-r$pkgrel
+	     pskctool-doc=$pkgver-r$pkgrel
+	     pam-oath-doc=$pkgver-r$pkgrel
+	     "
+	provides="oath-toolkit-doc=$pkgver-r$pkgrel"
+	pkgdesc="oath-toolkit (documentation)"
+	mkdir -p ${subpkgdir}/usr/share/doc || return 1
+	mv ${pkgdir}/usr/share/doc/oath-toolkit ${subpkgdir}/usr/share/doc/ || return 1
+}
+
+dev() {
+	depends="
+	     liboath=$pkgver-r$pkgrel liboath-doc=$pkgver-r$pkgrel liboath-dev=$pkgver-r$pkgrel
+	     libpskc=$pkgver-r$pkgrel libpskc-doc=$pkgver-r$pkgrel libpskc-dev=$pkgver-r$pkgrel
+	     oathtool=$pkgver-r$pkgrel oathtool-doc=$pkgver-r$pkgrel oathtool-dev=$pkgver-r$pkgrel
+	     pskctool=$pkgver-r$pkgrel pskctool-doc=$pkgver-r$pkgrel pskctool-dev=$pkgver-r$pkgrel
+	     pam-oath=$pkgver-r$pkgrel pam-oath-doc=$pkgver-r$pkgrel
+	     "
+	provides="oath-toolkit-dev=$pkgver-r$pkgrel"
+	pkgdesc="The OATH Toolkit provide components for building one-time password authentication systems. (development files)"
+	mkdir -p ${subpkgdir} || return 1
+}
+
+pam_oath() {
+	depends="linux-pam"
+	provides="pam-oath=$pkgver-r$pkgrel"
+	pkgdesc="A PAM module for pluggable login authentication for OATH."
+	mkdir -p ${subpkgdir}/usr/lib/security || return 1
+	mkdir -p ${subpkgdir}/usr/share/licenses || return 1
+	mv ${pkgdir}/usr/lib/security/* ${subpkgdir}/usr/lib/security/ || return 1
+	ls ${pkgdir}/usr/share/licenses 
+	mv ${pkgdir}/usr/share/licenses/pam-oath ${subpkgdir}/usr/share/licenses/ || return 1
+}
+
+pam_oath_doc() {
+	arch="noarch"
+	depends=""
+	provides="pam-oath-doc=$pkgver-r$pkgrel"
+	pkgdesc="pam-oath (documentation)"
+	mkdir -p ${subpkgdir}/usr/share/doc || return 1
+	mv ${pkgdir}/usr/share/doc/pam-oath ${subpkgdir}/usr/share/doc/ || return 1
+}
+
+liboath() {
+	depends=""
+	provides="liboath=$pkgver-r$pkgrel"
+	pkgdesc="A shared and static C library for OATH handling."
+	mkdir -p ${subpkgdir}/usr/lib || return 1
+	mkdir -p ${subpkgdir}/usr/share/licenses || return 1
+	mv ${pkgdir}/usr/lib/liboath.* ${subpkgdir}/usr/lib/ || return 1
+	mv ${pkgdir}/usr/share/licenses/liboath ${subpkgdir}/usr/share/licenses/ || return 1
+}
+
+liboath_doc() {
+	arch="noarch"
+	depends=""
+	provides="liboath-doc=$pkgver-r$pkgrel"
+	pkgdesc="liboath (documentation)"
+	mkdir -p ${subpkgdir}/usr/share/man/man3 || return 1
+	mkdir -p ${subpkgdir}/usr/share/gtk-doc/html || return 1
+	mv ${pkgdir}/usr/share/man/man3/oath* ${subpkgdir}/usr/share/man/man3/ || return 1
+	mv ${pkgdir}/usr/share/gtk-doc/html/liboath ${subpkgdir}/usr/share/gtk-doc/html/ || return 1
+}
+
+liboath_dev() {
+	depends="liboath=$pkgver-r$pkgrel liboath-doc=$pkgver-r$pkgrel"
+	provides="liboath-doc=$pkgver-r$pkgrel"
+	pkgdesc="liboath (documentation)"
+	mkdir -p ${subpkgdir}/usr/include || return 1
+	mkdir -p ${subpkgdir}/usr/lib/pkgconfig || return 1
+	mv ${pkgdir}/usr/include/liboath ${subpkgdir}/usr/include/ || return 1
+	mv ${pkgdir}/usr/lib/pkgconfig/liboath.pc ${subpkgdir}/usr/lib/pkgconfig/ || return 1
+}
+
+oathtool() {
+	depends=""
+	provides="oathtool=$pkgver-r$pkgrel"
+	pkgdesc="A command line tool for generating and validating OTPs."
+	mkdir -p ${subpkgdir}/usr/bin || return 1
+	mkdir -p ${subpkgdir}/usr/share/licenses || return 1
+	mv ${pkgdir}/usr/bin/oathtool ${subpkgdir}/usr/bin/ || return 1
+	mv ${pkgdir}/usr/share/licenses/oathtool ${subpkgdir}/usr/share/licenses/ || return 1
+}
+
+oathtool_doc() {
+	arch="noarch"
+	depends=""
+	provides="oathtool-doc=$pkgver-r$pkgrel"
+	pkgdesc="oathtool (documentation)"
+	mkdir -p ${subpkgdir}/usr/share/man/man1 || return 1
+	mv ${pkgdir}/usr/share/man/man1/oathtool.1 ${subpkgdir}/usr/share/man/man1/ || return 1
+}
+
+libpskc() {
+	depends=""
+	provides="libpskc=$pkgver-r$pkgrel"
+	pkgdesc="A shared and static C library for PSKC handling."
+	mkdir -p ${subpkgdir}/usr/lib || return 1
+	mkdir -p ${subpkgdir}/usr/share/xml || return 1
+	mkdir -p ${subpkgdir}/usr/share/licenses || return 1
+	mv ${pkgdir}/usr/lib/libpskc.* ${subpkgdir}/usr/lib/ || return 1
+	mv ${pkgdir}/usr/share/xml/pskc ${subpkgdir}/usr/share/xml/ || return 1
+	mv ${pkgdir}/usr/share/licenses/libpskc ${subpkgdir}/usr/share/licenses/ || return 1
+}
+
+libpskc_doc() {
+	arch="noarch"
+	depends=""
+	provides="libpskc-doc=$pkgver-r$pkgrel"
+	pkgdesc="libpskc (documentation)"
+	mkdir -p ${subpkgdir}/usr/share/man/man3 || return 1
+	mkdir -p ${subpkgdir}/usr/share/gtk-doc/html || return 1
+	mkdir -p ${subpkgdir}/usr/share/doc || return 1
+	mv ${pkgdir}/usr/share/man/man3/pskc* ${subpkgdir}/usr/share/man/man3/ || return 1
+	mv ${pkgdir}/usr/share/gtk-doc/html/libpskc ${subpkgdir}/usr/share/gtk-doc/html/ || return 1
+	mv ${pkgdir}/usr/share/doc/libpskc ${subpkgdir}/usr/share/doc/ || return 1
+}
+
+libpskc_dev() {
+	depends="libpskc=$pkgver-r$pkgrel libpskc-doc=$pkgver-r$pkgrel"
+	provides="libpskc-dev=$pkgver-r$pkgrel"
+	pkgdesc="libpskc (documentation)"
+	mkdir -p ${subpkgdir}/usr/include || return 1
+	mkdir -p ${subpkgdir}/usr/lib/pkgconfig || return 1
+	mv ${pkgdir}/usr/include/pskc ${subpkgdir}/usr/include/ || return 1
+	mv ${pkgdir}/usr/lib/pkgconfig/libpskc.pc ${subpkgdir}/usr/lib/pkgconfig/ || return 1
+}
+
+pskctool() {
+	depends=""
+	provides="pskctool=$pkgver-r$pkgrel"
+	pkgdesc="A command line tool for manipulating PSKC data."
+	mkdir -p ${subpkgdir}/usr/bin || return 1
+	mkdir -p ${subpkgdir}/usr/share/licenses || return 1
+	mv ${pkgdir}/usr/bin/pskctool ${subpkgdir}/usr/bin/ || return 1
+	mv ${pkgdir}/usr/share/licenses/pskctool ${subpkgdir}/usr/share/licenses/ || return 1
+}
+
+pskctool_doc() {
+	arch="noarch"
+	depends=""
+	provides="pskctool-doc=$pkgver-r$pkgrel"
+	pkgdesc="pskctool (documentation)"
+	mkdir -p ${subpkgdir}/usr/share/man/man1 || return 1
+	mv ${pkgdir}/usr/share/man/man1/pskctool.1 ${subpkgdir}/usr/share/man/man1/ || return 1
+}
+
+
+md5sums="19ee7ed7c2b40c1dc92887f893ed2726  oath-toolkit-2.6.1.tar.gz"
+sha256sums="9c57831907bc26eadcdf90ba1827d0bd962dd1f737362e817a1dd6d6ec036f79  oath-toolkit-2.6.1.tar.gz"
+sha512sums="59feadbc06d11a52bf5879493227c40358fc1f4f17ec3ff92e3a313e47b92f3154396fa3ff38ef163852b32c8bfcef1f59753b614d0138478b8f7e7971f55e62  oath-toolkit-2.6.1.tar.gz"
-- 
2.4.1

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---