# HG changeset patch # User Dirk Olmes # Date 1529406655 -7200 # Node ID e320ad3655b76e255d01c77c02794f6953120096 # Parent e679db0e8bfaf8aedab76320c34d74237b61b42d add ebuild for otpw diff -r e679db0e8bfa -r e320ad3655b7 sys-auth/otpw/Manifest --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sys-auth/otpw/Manifest Tue Jun 19 13:10:55 2018 +0200 @@ -0,0 +1,2 @@ +DIST otpw-1.5.tar.gz 45725 BLAKE2B 9066c80909134d92ed6a067c8eb99897c63b288aaf50f6db0a86a6c59fd31c3cd13c78643ebfca724ac1a07a3b22caa43d84c057872d76df61502b59a68bd886 SHA512 bf547359ef28acac8e41eb4a83f1a4e28d6855bfb62cff75ff90169df71144e41f7ac3846bdfae8db6eec2ab1bf51c0c4e9b8016cbc3f99fc76697c59119c504 +EBUILD otpw-1.5.ebuild 1270 BLAKE2B 8949a31ecf45c2a93b491d15dea878f4b56fca4e89e0d57adf3c9959b5de1db84a0f9ce16b66ff8e6c054a66a91e917bba731420a3b649e174bb0238f37181b2 SHA512 406e87f84c1b677d2e13143da0a0a004505443c4f69f2904591c2b8819b9f744efc00cd63dbbde2c744e2a92de2494ca3858ff3f0943a85f2461f37f14bf77c7 diff -r e679db0e8bfa -r e320ad3655b7 sys-auth/otpw/otpw-1.5.ebuild --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sys-auth/otpw/otpw-1.5.ebuild Tue Jun 19 13:10:55 2018 +0200 @@ -0,0 +1,45 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +inherit eutils pam + +DESCRIPTION="Generator and PAM module for one-time password lists with a user-defined static password prefix." +HOMEPAGE="http://www.cl.cam.ac.uk/~mgk25/otpw.html" +SRC_URI="http://www.cl.cam.ac.uk/~mgk25/download/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="pam" + +RDEPEND="pam? ( sys-libs/pam )" + +DEPEND="${RDEPEND}" + +pkg_setup() { + if [ ! -c /dev/urandom ]; then + die "/dev/urandom is missing or faulty, fix this and try again!" + fi +} + +src_compile() { + sed -i "s/CC\s*=.*/CC = $(tc-getCC)/" "${S}"/Makefile + #sed -i "s/CFLAGS\s*=.*/CFLAGS = -fPIC ${CFLAGS} \$(DFLAGS)/" "${S}"/Makefile # TODO: -fPIC should become obsolete in the next version + emake otpw-gen || die "emake otpw-gen failed" + emake demologin || die "emake demologin failed" + if use pam; then + emake pam_otpw.so || die "emake pam_otpw.so failed" + fi +} + +src_install() { + mv "${S}"/demologin "${S}"/otpw-demologin + dobin otpw-gen || "installing otpw-gen failed" + dobin otpw-demologin || "installing otpw-demologin failed" + if use pam; then + dopammod pam_otpw.so || "installing pam_otpw.so failed" + fi + doman otpw-gen.1 + doman pam_otpw.8 +}