summaryrefslogtreecommitdiff
path: root/packages/net-misc/dhcpcd/dhcpcd-8.1.1.exheres-0
blob: 432581b47948b2f2e8b26d89c409f6855cd09efb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# Copyright 2007 Bryan Ƙstergaard <kloeri@exherbo.org>
# Copyright 2010-2015 Wulf C. Krueger <philantrop@exherbo.org>
# Distributed under the terms of the GNU General Public License v2

require s6-rc-service
require systemd-service
require openrc-service

SUMMARY="RFC2131 compliant DHCP client"
DESCRIPTION="
dhcpcd is an RFC2131 compliant DHCP client. It is fully featured and yet lightweight:
the binary is 60k as reported by size(1) on Linux i386. It has support for duplicate
address detection, IPv4LL, carrier detection, and a merged resolv.conf and ntp.conf
for which other DHCP clients require third party tools.
"
BASE_URI="https://roy.marples.name"
HOMEPAGE="${BASE_URI}/projects/${PN}"
DOWNLOADS="${BASE_URI}/downloads/${PN}/${PNV}.tar.xz"

LICENCES="BSD-2"
SLOT="0"
PLATFORMS="~amd64 ~arm ~armv7 ~armv8 ~x86"
MYOPTIONS="
    ( providers: eudev systemd ) [[ number-selected = exactly-one ]]
"

DEPENDENCIES="
    build+run:
        providers:eudev? ( sys-apps/eudev )
        providers:systemd? ( sys-apps/systemd )
"

DEFAULT_SRC_PREPARE_PATCHES=(
    "${FILES}"/a7dccb87f6bcd7e59b29e96d0d554448e8462d25.patch
)
DEFAULT_SRC_CONFIGURE_PARAMS=(
    --dbdir=/var/lib/dhcpcd
    --libexecdir=/usr/$(exhost --target)/lib/dhcpcd
    --rundir=/run
    --enable-arp
    --enable-arping
    --enable-auth
    --enable-dhcp6
    --enable-inet
    --enable-inet6
    --enable-ipv4
    --enable-ipv6
    --disable-embedded
    --with-hooks="yp ntp"
    --with-udev
)

src_install() {
    default

    install_s6-rc_files
    install_systemd_files

    install_openrc_files

    edo sed \
        -e "s:/usr/bin:/usr/$(exhost --target)/bin:" \
        -i "${IMAGE}"/"${SYSTEMDSYSTEMUNITDIR}"/${PN}.service

    keepdir /var/lib/dhcpcd
}