vrrpd.spec 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. ##
  2. ## vrrpd.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2003 Cable & Wireless Deutschland GmbH
  4. ## Copyright (c) 2000-2003 The OpenPKG Project <http://www.openpkg.org/>
  5. ## Copyright (c) 2000-2003 Ralf S. Engelschall <rse@engelschall.com>
  6. ##
  7. ## Permission to use, copy, modify, and distribute this software for
  8. ## any purpose with or without fee is hereby granted, provided that
  9. ## the above copyright notice and this permission notice appear in all
  10. ## copies.
  11. ##
  12. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  13. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  14. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  15. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  16. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  17. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  18. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  19. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  20. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  21. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  22. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  23. ## SUCH DAMAGE.
  24. ##
  25. # FIXME: rse: unfortunately currently available for FreeBSD 4 only
  26. # package information
  27. Name: vrrpd
  28. Summary: Virtual Router Redundancy Protocol (VRRP) Daemon
  29. URL: http://www.bsdshell.net/hut_vrrpimpl.html
  30. Vendor: The HUT Project
  31. Packager: The OpenPKG Project
  32. Distribution: OpenPKG [JUNK]
  33. Group: Networking
  34. License: BSD
  35. Version: 0.8.7
  36. Release: 20030628
  37. # package options
  38. %option with_fsl yes
  39. # list of sources
  40. Source0: http://www.bsdshell.net/download/freevrrpd-%{version}.tar.gz
  41. Source1: vrrpd.conf
  42. Source2: rc.vrrpd
  43. Source3: fsl.vrrpd
  44. # build information
  45. Prefix: %{l_prefix}
  46. BuildRoot: %{l_buildroot}
  47. BuildPreReq: OpenPKG, openpkg >= 20030415
  48. PreReq: OpenPKG, openpkg >= 20030415
  49. %if "%{with_fsl}" == "yes"
  50. BuildPreReq: fsl
  51. PreReq: fsl
  52. %endif
  53. AutoReq: no
  54. AutoReqProv: no
  55. %description
  56. Vrrpd is a Virtual Router Redundancy Protocol (VRRP) implementation.
  57. This permits you to create backups of your strategic servers with a
  58. redundant IP system.
  59. %prep
  60. %setup -q -n freevrrpd-%{version}
  61. %build
  62. %{l_shtool} subst \
  63. -e 's;"freevrrpd";"vrrpd";' \
  64. vrrp_main.c
  65. %{l_shtool} subst \
  66. -e 's;/usr/local/etc/freevrrpd.conf;%{l_prefix}/etc/vrrpd/vrrpd.conf;' \
  67. vrrp_define.h
  68. %{l_shtool} subst \
  69. -e "s;^\\(LDADD=.*\\);\\1 %{l_fsl_ldflags} %{l_fsl_libs};" \
  70. Makefile
  71. case "%{l_target}" in
  72. *-freebsd* ) ;;
  73. * ) echo "Sorry, this package currently supports FreeBSD 4 only" |\
  74. %{l_rpmtool} msg -t error; exit 1
  75. esac
  76. /usr/bin/make CC=/usr/bin/cc
  77. %install
  78. rm -rf $RPM_BUILD_ROOT
  79. %{l_shtool} mkdir -f -p -m 755 \
  80. $RPM_BUILD_ROOT%{l_prefix}/sbin \
  81. $RPM_BUILD_ROOT%{l_prefix}/man/man8 \
  82. $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d \
  83. $RPM_BUILD_ROOT%{l_prefix}/etc/vrrpd \
  84. $RPM_BUILD_ROOT%{l_prefix}/var/vrrpd
  85. %{l_shtool} install -c -s -m 755 \
  86. freevrrpd $RPM_BUILD_ROOT%{l_prefix}/sbin/vrrpd
  87. %{l_shtool} install -c -m 644 \
  88. freevrrpd.8 $RPM_BUILD_ROOT%{l_prefix}/man/man8/vrrpd.8
  89. %{l_shtool} install -c -m 644 \
  90. -e 's;@l_prefix@;%{l_prefix};' \
  91. %{SOURCE vrrpd.conf} $RPM_BUILD_ROOT%{l_prefix}/etc/vrrpd/
  92. %{l_shtool} install -c -m 755 \
  93. -e 's;@l_prefix@;%{l_prefix};' \
  94. -e 's;@l_susr@;%{l_susr};g' \
  95. -e 's;@l_rusr@;%{l_rusr};g' \
  96. -e 's;@l_rgrp@;%{l_rgrp};g' \
  97. %{SOURCE rc.vrrpd} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  98. # OSSP fake syslog library
  99. %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/etc/fsl
  100. %{l_shtool} install -c -m 644 \
  101. -e 's;@l_prefix@;%{l_prefix};g' \
  102. %{SOURCE fsl.%{name}} \
  103. $RPM_BUILD_ROOT%{l_prefix}/etc/fsl/
  104. # determine installation files
  105. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  106. %{l_files_std} \
  107. '%not %dir %{l_prefix}/etc/fsl' \
  108. '%config %{l_prefix}/etc/fsl/fsl.%{name}' \
  109. '%config %{l_prefix}/etc/vrrpd/vrrpd.conf'
  110. %files -f files
  111. %clean
  112. rm -rf $RPM_BUILD_ROOT