1# $Id: radvd.spec,v 1.24 2009/07/07 04:33:59 psavola Exp $ 2 3%define initdir /etc/rc.d/init.d 4#%(if test -d /etc/init.d/. ; then echo /etc/init.d ; else echo /etc/rc.d/init.d ; fi) 5 6%define RADVD_UID 75 7 8Summary: A Router Advertisement daemon 9Name: radvd 10Version: 1.3 11Release: 1 12# The code includes the advertising clause, so it's GPL-incompatible 13License: BSD with advertising 14Group: System Environment/Daemons 15URL: http://www.litech.org/radvd/ 16Source: http://www.litech.org/radvd/dist/%{name}-%{version}.tar.gz 17Requires(postun): chkconfig, /usr/sbin/userdel, initscripts 18Requires(preun): chkconfig, initscripts 19Requires(post): chkconfig 20Requires(pre): /usr/sbin/useradd 21BuildRequires: flex, byacc 22BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) 23 24%description 25radvd is the router advertisement daemon for IPv6. It listens to router 26solicitations and sends router advertisements as described in "Neighbor 27Discovery for IP Version 6 (IPv6)" (RFC 2461). With these advertisements 28hosts can automatically configure their addresses and some other 29parameters. They also can choose a default router based on these 30advertisements. 31 32Install radvd if you are setting up IPv6 network and/or Mobile IPv6 33services. 34 35%prep 36%setup -q 37 38%build 39%configure --with-pidfile=/var/run/radvd/radvd.pid 40make 41# make %{?_smp_mflags} 42# Parallel builds still fail because seds that transform y.tab.x into 43# scanner/gram.x are not executed before compile of scanner/gram.x 44# 45 46%install 47[ $RPM_BUILD_ROOT != "/" ] && rm -rf $RPM_BUILD_ROOT 48 49make DESTDIR=$RPM_BUILD_ROOT install 50 51mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig 52mkdir -p $RPM_BUILD_ROOT%{initdir} 53mkdir -p $RPM_BUILD_ROOT/var/run/radvd 54 55install -m 644 redhat/radvd.conf.empty $RPM_BUILD_ROOT%{_sysconfdir}/radvd.conf 56install -m 755 redhat/radvd.init $RPM_BUILD_ROOT%{initdir}/radvd 57install -m 644 redhat/radvd.sysconfig $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/radvd 58 59%clean 60[ $RPM_BUILD_ROOT != "/" ] && rm -rf $RPM_BUILD_ROOT 61 62%postun 63if [ "$1" -ge "1" ]; then 64 /sbin/service radvd condrestart >/dev/null 2>&1 65fi 66if [ $1 = 0 ]; then 67 /usr/sbin/userdel radvd > /dev/null 2>&1 || : 68fi 69 70%post 71/sbin/chkconfig --add radvd 72 73%preun 74if [ $1 = 0 ]; then 75 /sbin/service radvd stop >/dev/null 2>&1 76 /sbin/chkconfig --del radvd 77fi 78 79%pre 80 81/usr/sbin/useradd -c "radvd user" -r -M -s /sbin/nologin -u %{RADVD_UID} -d / radvd 2>/dev/null || : 82 83%files 84%defattr(-,root,root,-) 85%doc COPYRIGHT README CHANGES INTRO.html TODO 86%config(noreplace) %{_sysconfdir}/radvd.conf 87%config(noreplace) /etc/sysconfig/radvd 88%{initdir}/radvd 89%dir %attr(-,radvd,radvd) /var/run/radvd/ 90%doc radvd.conf.example 91%{_mandir}/*/* 92%{_sbindir}/radvd 93%{_sbindir}/radvdump 94 95%changelog 96* Tue Jul 7 2009 Pekka Savola <pekkas@netcore.fi> 1.3-1 97- 1.3; some improvements to the init script 98 99* Tue Oct 28 2008 Pekka Savola <pekkas@netcore.fi> 1.2-1 100- 1.2; remove -D_GNU_SOURCE 101 102* Mon Feb 4 2008 Pekka Savola <pekkas@netcore.fi> 1.1-1 103- 1.1 104 105* Wed Nov 1 2006 Pekka Savola <pekkas@netcore.fi> 1.0-1 106- 1.0; add BuildRequires 107 108* Fri Jan 13 2006 Pekka Savola <pekkas@netcore.fi> 0.9.1-1 109- 0.9.1 110 111* Tue Oct 18 2005 Pekka Savola <pekkas@netcore.fi> 0.9-1 112- 0.9 (also minor spec file cleanup in %%configure). 113 114* Fri Jul 8 2005 Pekka Savola <pekkas@netcore.fi> 0.8-1 115- 0.8. 116- Ship the example config file as %%doc (Red Hat's #159005) 117 118* Mon Feb 21 2005 Pekka Savola <pekkas@netcore.fi> 0.7.3-1 119- 0.7.3. 120 121* Mon Oct 28 2002 Pekka Savola <pekkas@netcore.fi> 122- 0.7.2. 123 124* Tue May 7 2002 Pekka Savola <pekkas@netcore.fi> 125- remove '-g %%{RADVD_GID}' when creating the user, which may be problematic 126 if the user didn't exist before. 127 128* Wed Jan 14 2002 Pekka Savola <pekkas@netcore.fi> 129- 0.7.1. 130 131* Tue Jan 8 2002 Pekka Savola <pekkas@netcore.fi> 132- Change 'reload' to signal HUP to radvd instead or restarting. 133 134* Fri Dec 28 2001 Pekka Savola <pekkas@netcore.fi> 135- License unfortunately is BSD *with* advertising clause, so to be pedantic, 136 change License: to 'BSD-style'. 137 138* Wed Nov 14 2001 Pekka Savola <pekkas@netcore.fi> 139- spec file cleanups 140- update to 0.7.0. 141 142* Wed Jun 20 2001 Pekka Savola <pekkas@netcore.fi> 143- use /sbin/service. 144- update to 0.6.2pl4. 145 146* Sat Apr 28 2001 Pekka Savola <pekkas@netcore.fi> 147- update to 0.6.2pl3. 148 149* Wed Apr 11 2001 Pekka Savola <pekkas@netcore.fi> 150- update to 0.6.2pl2. 151 152* Wed Apr 4 2001 Pekka Savola <pekkas@netcore.fi> 153- update to 0.62pl1. Bye bye patches! 154- Require: initscripts (should really be with a version providing IPv6) 155- clean up the init script, make condrestart work properly 156- Use a static /etc/rc.d/init.d; init.d/radvd required it anyway. 157 158* Sun Apr 1 2001 Pekka Savola <pekkas@netcore.fi> 159- add patch to chroot (doesn't work well yet, as /proc is used directly) 160- clean up droproot patch, drop the rights earlier; require user-writable 161pidfile directory 162- set up the pidfile directory at compile time. 163 164* Sat Mar 31 2001 Pekka Savola <pekkas@netcore.fi> 165- add select/kill signals patch from Nathan Lutchansky <lutchann@litech.org>. 166- add address syntax checked fix from Marko Myllynen <myllynen@lut.fi>. 167- add patch to check the pid file before fork. 168- add support for OPTIONS sourced from /etc/sysconfig/radvd, provide a nice 169default one. 170- add/delete radvd user, change the pidfile to /var/run/radvd/radvd.pid. 171- fix initscript NETWORKING_IPV6 check. 172 173* Sun Mar 18 2001 Pekka Savola <pekkas@netcore.fi> 174- add droproot patch, change to nobody by default (should use radvd:radvd or 175the like, really). 176 177* Mon Mar 5 2001 Tim Powers <timp@redhat.com> 178- applied patch supplied by Pekka Savola in #30508 179- made changes to initscript as per Pekka's suggestions 180 181* Thu Feb 15 2001 Tim Powers <timp@redhat.com> 182- needed -D_GNU_SOURCE to build properly 183 184* Tue Feb 6 2001 Tim Powers <timp@redhat.com> 185- use %%configure and %%makeinstall, just glob the manpages, cleans 186 things up 187- fixed initscript so that it can be internationalized in the future 188 189* Fri Feb 2 2001 Pekka Savola <pekkas@netcore.fi> 190- Create a single package(source) for glibc21 and glibc22 (automatic 191Requires can handle this just fine). 192- use %%{_mandir} and friends 193- add more flesh to %doc 194- streamline %config file %attrs 195- streamline init.d file a bit: 196 * add a default chkconfig: (default to disable for security etc. reasons; 197 also, the default config isn't generic enough..) 198 * add reload/condrestart 199 * minor tweaks 200 * missing: localization support (initscripts-5.60) 201- use %%initdir macro 202 203* Thu Feb 1 2001 Lars Fenneberg <lf@elemental.net> 204- updated to new release 0.6.2 205 206* Thu Feb 1 2001 Marko Myllynen <myllynen@lut.fi> 207- initial version, radvd version 0.6.1 208