]>
Commit | Line | Data |
---|---|---|
dc588ad3 | 1 | ############################################################################### |
802ea3af MT |
2 | # IPFire.org - An Open Source Firewall Solution # |
3 | # Copyright (C) - IPFire Development Team <info@ipfire.org> # | |
dc588ad3 BS |
4 | ############################################################################### |
5 | ||
802ea3af | 6 | name = radvd |
180993fa MT |
7 | version = 1.8.5 |
8 | release = 1 | |
802ea3af MT |
9 | |
10 | groups = System/Daemons | |
11 | url = http://www.litech.org/radvd/ | |
12 | license = BSD with advertising | |
13 | summary = A Router Advertisement daemon. | |
14 | ||
15 | description | |
16 | radvd is the router advertisement daemon for IPv6. It listens to | |
17 | router solicitations and sends router advertisements as described | |
18 | in Neighbor Discovery for IP Version 6. With these | |
19 | advertisements hosts can automatically configure their addresses and | |
20 | some other parameters. They also can choose a default router based | |
dc588ad3 | 21 | on these advertisements. |
802ea3af MT |
22 | end |
23 | ||
24 | source_dl = http://www.litech.org/radvd/dist/ | |
25 | ||
26 | build | |
27 | requires | |
28 | flex | |
29 | flex-devel | |
30 | bison | |
fddc3ac8 | 31 | shadow-utils |
802ea3af MT |
32 | end |
33 | ||
34 | configure_options += \ | |
802ea3af MT |
35 | --with-pidfile=/run/radvd/radvd.pid |
36 | ||
37 | prepare_cmds | |
fddc3ac8 MT |
38 | %{create_user} |
39 | ||
802ea3af MT |
40 | sed -e "s/-lfl/-lfl_pic/g" -i Makefile.* |
41 | end | |
fddc3ac8 MT |
42 | |
43 | install_cmds | |
44 | mkdir -pv -m 750 %{BUILDROOT}/run/radvd | |
45 | chown -v radvd.radvd %{BUILDROOT}/run/radvd | |
46 | end | |
47 | end | |
48 | ||
49 | create_user | |
50 | getent group radvd >/dev/null || groupadd -r radvd | |
51 | ||
52 | # The radvd user also needs to be in the wheel group to get access to | |
53 | # /proc. | |
54 | getent passwd radvd >/dev/null || \ | |
55 | useradd -r -g radvd -G wheel -d / -s /sbin/nologin \ | |
56 | -c "User for the Router Advertisement daemon." radvd | |
802ea3af MT |
57 | end |
58 | ||
59 | packages | |
60 | package %{name} | |
180993fa MT |
61 | requires |
62 | network | |
63 | end | |
fddeee6c SS |
64 | |
65 | script prein | |
fddc3ac8 | 66 | %{create_user} |
fddeee6c SS |
67 | end |
68 | ||
69 | # Just search for new unit files that were just installed. | |
70 | script postin | |
71 | /bin/systemctl daemon-reload >/dev/null 2>&1 || : | |
72 | end | |
73 | ||
74 | # Disable the service that is to be removed and stop it if it is still running. | |
75 | script preun | |
76 | /bin/systemctl --no-reload disable radvd.service >/dev/null 2>&1 || : | |
77 | /bin/systemctl stop radvd.service >/dev/null 2>&1 || : | |
78 | end | |
79 | ||
80 | # Just tell systemd that unitfiles have been removed. | |
81 | script postun | |
82 | /bin/systemctl daemon-reload >/dev/null 2>&1 || : | |
83 | end | |
84 | ||
85 | # Try to restart the service if it is running. | |
86 | script postup | |
87 | /bin/systemctl daemon-reload >/dev/null 2>&1 || : | |
88 | /bin/systemctl try-restart radvd.service >/dev/null 2>&1 || : | |
89 | end | |
802ea3af | 90 | end |
1f9bc2f0 MT |
91 | |
92 | package %{name}-debuginfo | |
93 | template DEBUGINFO | |
94 | end | |
802ea3af | 95 | end |