Line 0
Link Here
|
|
|
1 |
# Copyright 1999-2022 Gentoo Authors |
2 |
# Distributed under the terms of the GNU General Public License v2 |
3 |
|
4 |
EAPI=8 |
5 |
|
6 |
inherit toolchain-funcs |
7 |
|
8 |
DESCRIPTION="Bind sockets to privileged ports without root" |
9 |
HOMEPAGE="https://www.chiark.greenend.org.uk/ucgi/~ian/git/authbind.git/" |
10 |
SRC_URI="mirror://debian/pool/main/${PN:0:1}/${PN}/${PN}_${PV}.tar.gz" |
11 |
S="${WORKDIR}/${PN}" |
12 |
|
13 |
LICENSE="GPL-2+" |
14 |
SLOT="0" |
15 |
KEYWORDS="~amd64" |
16 |
|
17 |
BDEPEND="virtual/awk" |
18 |
|
19 |
PATCHES=( |
20 |
"${FILESDIR}/${PN}-2.1.2-respect-flags.patch" |
21 |
"${FILESDIR}/${PN}-2.1.2-no-use-ld.patch" |
22 |
) |
23 |
|
24 |
src_configure() { |
25 |
tc-export CC |
26 |
|
27 |
sed -i \ |
28 |
-e "s|^prefix=.*|prefix=/usr|" \ |
29 |
-e "s|^lib_dir=.*|lib_dir=\$(prefix)/$(get_libdir)|" \ |
30 |
-e "s|^libexec_dir=.*|libexec_dir=\$(prefix)/libexec/authbind|" \ |
31 |
-e "s|^SHARED_LDFLAGS=.*|SHARED_LDFLAGS=${LDFLAGS}|" \ |
32 |
Makefile || die "sed failed" |
33 |
|
34 |
sed -i \ |
35 |
-e 's|/usr/lib|/usr/libexec|' \ |
36 |
authbind-helper.8 || die "sed failed" |
37 |
} |
38 |
|
39 |
src_install() { |
40 |
dobin authbind |
41 |
doman authbind.1 authbind-helper.8 |
42 |
|
43 |
local major=$(awk -F= '/MAJOR=/ { print $2 }' Makefile || die) |
44 |
ln -s libauthbind.so.* libauthbind.so.${major} || die |
45 |
dolib.so libauthbind.so* |
46 |
|
47 |
exeinto /usr/libexec/authbind |
48 |
exeopts -m4755 |
49 |
doexe helper |
50 |
|
51 |
keepdir /etc/authbind/by{addr,port,uid} |
52 |
|
53 |
dodoc debian/changelog |
54 |
} |