comparison sys-auth/otpw/otpw-1.5.ebuild @ 458:e320ad3655b7

add ebuild for otpw
author Dirk Olmes <dirk@xanthippe.ping.de>
date Tue, 19 Jun 2018 13:10:55 +0200
parents
children
comparison
equal deleted inserted replaced
457:e679db0e8bfa 458:e320ad3655b7
1 # Copyright 1999-2010 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 inherit eutils pam
6
7 DESCRIPTION="Generator and PAM module for one-time password lists with a user-defined static password prefix."
8 HOMEPAGE="http://www.cl.cam.ac.uk/~mgk25/otpw.html"
9 SRC_URI="http://www.cl.cam.ac.uk/~mgk25/download/${P}.tar.gz"
10
11 LICENSE="GPL-2"
12 SLOT="0"
13 KEYWORDS="~amd64 ~x86"
14 IUSE="pam"
15
16 RDEPEND="pam? ( sys-libs/pam )"
17
18 DEPEND="${RDEPEND}"
19
20 pkg_setup() {
21 if [ ! -c /dev/urandom ]; then
22 die "/dev/urandom is missing or faulty, fix this and try again!"
23 fi
24 }
25
26 src_compile() {
27 sed -i "s/CC\s*=.*/CC = $(tc-getCC)/" "${S}"/Makefile
28 #sed -i "s/CFLAGS\s*=.*/CFLAGS = -fPIC ${CFLAGS} \$(DFLAGS)/" "${S}"/Makefile # TODO: -fPIC should become obsolete in the next version
29 emake otpw-gen || die "emake otpw-gen failed"
30 emake demologin || die "emake demologin failed"
31 if use pam; then
32 emake pam_otpw.so || die "emake pam_otpw.so failed"
33 fi
34 }
35
36 src_install() {
37 mv "${S}"/demologin "${S}"/otpw-demologin
38 dobin otpw-gen || "installing otpw-gen failed"
39 dobin otpw-demologin || "installing otpw-demologin failed"
40 if use pam; then
41 dopammod pam_otpw.so || "installing pam_otpw.so failed"
42 fi
43 doman otpw-gen.1
44 doman pam_otpw.8
45 }