annotate sys-auth/otpw/otpw-1.5.ebuild @ 471:4eda6e8ffca1

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