]>
Commit | Line | Data |
---|---|---|
3d0728d4 SS |
1 | ############################################################################### |
2 | # IPFire.org - An Open Source Firewall Solution # | |
3 | # Copyright (C) - IPFire Development Team <info@ipfire.org> # | |
4 | ############################################################################### | |
5 | ||
6 | name = dhcpcd | |
7 | version = 9.4.1 | |
76e876d2 | 8 | release = 2 |
3d0728d4 SS |
9 | |
10 | groups = Network/Base | |
11 | url = https://roy.marples.name/projects/dhcpcd/ | |
12 | license = BSD | |
13 | summary = A DHCP and DHCPv6 client. | |
14 | ||
15 | description | |
16 | dhcpcd is a DHCP and DHCPv6 client. It is currently the most feature-rich | |
17 | open source DHCP client. | |
18 | end | |
19 | ||
20 | source_dl = https://roy.marples.name/downloads/dhcpcd/ | |
21 | sources = %{thisapp}.tar.xz | |
22 | ||
23 | build | |
24 | configure_options += \ | |
25 | --dbdir=%{sharedstatedir}/dhcpcd | |
26 | ||
27 | prepare_cmds | |
28 | %{create_user} | |
29 | end | |
30 | ||
31 | test | |
32 | make test | |
33 | end | |
34 | ||
35 | install_cmds | |
36 | # Assign db directory to the correct user and group. | |
37 | chown dhcpcd:dhcpcd %{BUILDROOT}%{sharedstatedir}/dhcpcd | |
76e876d2 SS |
38 | |
39 | # Fix permission of /sbin/dhcpcd | |
40 | chmod 755 %{BUILDROOT}%{sbindir}/dhcpcd | |
3d0728d4 SS |
41 | end |
42 | end | |
43 | ||
44 | create_user | |
45 | getent group dhcpcd >/dev/null || groupadd -r dhcpcd | |
46 | getent passwd dhcpcd >/dev/null || useradd -r -g dhcpcd \ | |
47 | -d /var/lib/dhcpcd -s /sbin/nologin -c "DHCP client user" dhcpcd | |
48 | end | |
49 | ||
50 | packages | |
51 | package %{name} | |
52 | prerequires | |
53 | shadow-utils | |
54 | systemd-units | |
55 | end | |
56 | ||
57 | configfiles | |
58 | %{sysconfdir}/dhcpcd.conf | |
59 | end | |
60 | ||
61 | datafiles | |
62 | %{sharedstatedir}/dhcpcd | |
63 | end | |
64 | ||
65 | script prein | |
66 | %{create_user} | |
67 | end | |
68 | ||
69 | script postin | |
70 | systemctl daemon-reload >/dev/null 2>&1 || : | |
71 | end | |
72 | ||
73 | script postun | |
74 | systemctl daemon-reload >/dev/null 2>&1 || : | |
75 | end | |
76 | ||
77 | script postup | |
78 | systemctl daemon-reload >/dev/null 2>&1 || : | |
79 | end | |
80 | end | |
81 | ||
82 | package %{name}-debuginfo | |
83 | template DEBUGINFO | |
84 | end | |
85 | end |