radvd-vl.spec 6.4 KB

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