]> git.ipfire.org Git - people/ms/ipfire-3.x.git/blame - radvd/radvd.nm
Merge remote-tracking branch 'stevee/ppp-update'
[people/ms/ipfire-3.x.git] / radvd / radvd.nm
CommitLineData
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 6name = radvd
fec5f028
MT
7version = 1.9.1
8release = 1
802ea3af
MT
9
10groups = System/Daemons
11url = http://www.litech.org/radvd/
12license = BSD with advertising
13summary = A Router Advertisement daemon.
14
15description
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
22end
23
24source_dl = http://www.litech.org/radvd/dist/
25
26build
27 requires
5f60ad38 28 bison
802ea3af
MT
29 flex
30 flex-devel
5f60ad38 31 libdaemon-devel
fddc3ac8 32 shadow-utils
802ea3af
MT
33 end
34
35 configure_options += \
802ea3af
MT
36 --with-pidfile=/run/radvd/radvd.pid
37
38 prepare_cmds
fddc3ac8
MT
39 %{create_user}
40
802ea3af
MT
41 sed -e "s/-lfl/-lfl_pic/g" -i Makefile.*
42 end
fddc3ac8
MT
43
44 install_cmds
45 mkdir -pv -m 750 %{BUILDROOT}/run/radvd
46 chown -v radvd.radvd %{BUILDROOT}/run/radvd
47 end
48end
49
50create_user
51 getent group radvd >/dev/null || groupadd -r radvd
52
53 # The radvd user also needs to be in the wheel group to get access to
54 # /proc.
55 getent passwd radvd >/dev/null || \
56 useradd -r -g radvd -G wheel -d / -s /sbin/nologin \
57 -c "User for the Router Advertisement daemon." radvd
802ea3af
MT
58end
59
60packages
61 package %{name}
180993fa
MT
62 requires
63 network
64 end
fddeee6c
SS
65
66 script prein
fddc3ac8 67 %{create_user}
fddeee6c
SS
68 end
69
70 # Just search for new unit files that were just installed.
71 script postin
72 /bin/systemctl daemon-reload >/dev/null 2>&1 || :
73 end
74
75 # Disable the service that is to be removed and stop it if it is still running.
76 script preun
77 /bin/systemctl --no-reload disable radvd.service >/dev/null 2>&1 || :
78 /bin/systemctl stop radvd.service >/dev/null 2>&1 || :
79 end
80
81 # Just tell systemd that unitfiles have been removed.
82 script postun
83 /bin/systemctl daemon-reload >/dev/null 2>&1 || :
84 end
85
86 # Try to restart the service if it is running.
87 script postup
88 /bin/systemctl daemon-reload >/dev/null 2>&1 || :
89 /bin/systemctl try-restart radvd.service >/dev/null 2>&1 || :
90 end
802ea3af 91 end
1f9bc2f0
MT
92
93 package %{name}-debuginfo
94 template DEBUGINFO
95 end
802ea3af 96end