Contents of /trunk/core/dhcpcd/dhcpcd-10.0.2-r1.smage2
Parent Directory | Revision Log
Revision 33507 -
(show annotations)
(download)
Wed Jul 26 09:06:05 2023 UTC (9 months, 2 weeks ago) by niro
File size: 1897 byte(s)
Wed Jul 26 09:06:05 2023 UTC (9 months, 2 weeks ago) by niro
File size: 1897 byte(s)
-ver bump to 10.0.2-r1
1 | # $Id$ |
2 | |
3 | PNAME="dhcpcd" |
4 | PVER="10.0.2" |
5 | PBUILD="r1" |
6 | |
7 | PCAT="net-misc" |
8 | |
9 | DESCRIPTION="dhcpcd is an implementation of the DHCP client specified in RFC2131." |
10 | HOMEPAGE="http://roy.marples.name/projects/dhcpcd/" |
11 | |
12 | DEPEND=">= virtual/glibc |
13 | >= sys-fs/libudev-253" |
14 | PROVIDE="virtual/dhcp" |
15 | |
16 | SRCFILE="${PNAME}-${PVER}.tar.xz" |
17 | SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" |
18 | |
19 | sminclude mtools systemd |
20 | |
21 | SRC_URI=( |
22 | https://github.com/NetworkConfiguration/${PNAME}/releases/download/v${PVER}/${SRCFILE} |
23 | mirror://${PNAME}/${SRCFILE} |
24 | mirror://${PNAME}/${PNAME}.service |
25 | ) |
26 | |
27 | UP2DATE="updatecmd https://github.com/NetworkConfiguration/${PNAME}/releases | highesttarball xz" |
28 | |
29 | pkg_setup() |
30 | { |
31 | preinstall |
32 | } |
33 | |
34 | src_prepare() |
35 | { |
36 | munpack ${SRCFILE} || die |
37 | cd ${SRCDIR} |
38 | |
39 | # disable zeroconf support |
40 | # we don't want get an automatic ip, only if really requested |
41 | cat >> dhcpcd.conf << EOF |
42 | |
43 | # disabled zeroconf support - we don't want to get an APIPA-address automatically |
44 | noipv4ll |
45 | EOF |
46 | |
47 | # fix /var/run -> /run |
48 | sed -i 's:/var/run:/run:g' \ |
49 | hooks/50-yp.conf \ |
50 | hooks/dhcpcd-run-hooks.in \ |
51 | || die |
52 | } |
53 | |
54 | src_compile() |
55 | { |
56 | cd ${SRCDIR} |
57 | |
58 | mconfigure \ |
59 | --libexecdir=/usr/lib/dhcpcd \ |
60 | --localstatedir=/var \ |
61 | --rundir=/run \ |
62 | --dbdir=/var/lib/dhcpcd \ |
63 | --with-hook=ntp.conf \ |
64 | --with-hook=yp.conf \ |
65 | --with-hook=dhcpcd-compat \ |
66 | --enable-privsep \ |
67 | --privsepuser=dhcpcd \ |
68 | || die |
69 | |
70 | mmake || die |
71 | } |
72 | |
73 | src_install() |
74 | { |
75 | cd ${SRCDIR} |
76 | mmake DESTDIR=${BINDIR} install || die |
77 | |
78 | # systemd service |
79 | minstalldir $(mget-systemd-unit-dir) || die |
80 | minstallfile -s ${PNAME}.service $(mget-systemd-unit-dir)/ || die |
81 | |
82 | # create dhcpcd status dir |
83 | mkeepdir /var/run/dhcpcd || die |
84 | mkeepdir /var/lib/dhcpcd || die |
85 | |
86 | # create an empty ntp.conf to shutup warnings |
87 | memptyfile /etc/ntp.conf || die |
88 | |
89 | minstalldocs ChangeLog || die |
90 | } |
91 | |
92 | preinstall() |
93 | { |
94 | # adds dhcdcd user |
95 | mgroupadd dhcpcd |
96 | museradd -o "-g dhcpcd -d /var/lib/dhcpcd -s /sbin/nologin" dhcpcd |
97 | } |