arpd.spec 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. ##
  2. ## arpd.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: On FreeBSD arpd is not starting
  26. # FIXME: Log is not written
  27. # FIXME: MSvB: Logging problem is possibly fixed by recent fsl additions
  28. # package information
  29. Name: arpd
  30. Summary: Address Resolution Protocol (ARP) Reply Daemon
  31. URL: http://www.citi.umich.edu/u/provos/honeyd/
  32. Vendor: Niels Provos, Dug Song
  33. Packager: The OpenPKG Project
  34. Distribution: OpenPKG [EVAL]
  35. Group: Network
  36. License: GNU
  37. Version: 0.2
  38. Release: 20030708
  39. # package options
  40. %option with_fsl yes
  41. # list of sources
  42. Source0: http://www.citi.umich.edu/u/provos/honeyd/arpd-%{version}.tar.gz
  43. Source1: rc.arpd
  44. Source2: fsl.arpd
  45. Patch0: arpd.patch
  46. # build information
  47. Prefix: %{l_prefix}
  48. BuildRoot: %{l_buildroot}
  49. BuildPreReq: OpenPKG, openpkg >= 20030415, gcc
  50. PreReq: OpenPKG, openpkg >= 20030415
  51. BuildPreReq: libdnet, libpcap, libevent
  52. PreReq: libdnet, libpcap, libevent
  53. %if "%{with_fsl}" == "yes"
  54. BuildPreReq: fsl
  55. PreReq: fsl
  56. %endif
  57. AutoReq: no
  58. AutoReqProv: no
  59. %description
  60. Arpd is an Address Resolution Protocol (ARP) daemon which replies to
  61. any ARP request for an IP address matching the specified destination
  62. network with the hardware MAC address of the own interface, but only
  63. after determining if another host already claims it. Any IP address
  64. claimed by arpd is eventually forgotten after a period of inactivity
  65. or after a hard timeout, and is relinquished if the real owner shows
  66. up. This enables a single host to claim all unassigned addresses on
  67. a LAN for network monitoring or simulation.
  68. %prep
  69. %setup -q -n arpd
  70. %patch -p0
  71. %{l_shtool} subst \
  72. -e 's;LIBS=$DNETLIB;LIBS="$LIBS $DNETLIB";' \
  73. -e 's;CFLAGS=$DNETINC;CFLAGS="$CFLAGS $DNETINC";' \
  74. configure
  75. %build
  76. %{l_shtool} subst \
  77. -e 's;/var/run/arpd.pid;%{l_prefix}/var/arpd/arpd.pid;' \
  78. arpd.c arpd.8
  79. CC="%{l_cc}" \
  80. CFLAGS="%{l_cflags -O}" \
  81. CPPFLAGS="%{l_cppflags}" \
  82. LDFLAGS="%{l_ldflags} %{l_fsl_ldflags}" \
  83. LIBS="%{l_fsl_libs}" \
  84. ./configure \
  85. --prefix=%{l_prefix} \
  86. --with-libdnet=%{l_prefix} \
  87. --with-libpcap=%{l_prefix} \
  88. --with-libevent=%{l_prefix}
  89. %{l_make} %{l_mflags}
  90. %install
  91. rm -rf $RPM_BUILD_ROOT
  92. %{l_shtool} mkdir -f -p -m 755 \
  93. $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d \
  94. $RPM_BUILD_ROOT%{l_prefix}/sbin \
  95. $RPM_BUILD_ROOT%{l_prefix}/man/man8 \
  96. $RPM_BUILD_ROOT%{l_prefix}/var/arpd
  97. %{l_shtool} install -c -s -m 755 \
  98. arpd $RPM_BUILD_ROOT%{l_prefix}/sbin/
  99. %{l_shtool} install -c -m 644 \
  100. arpd.8 $RPM_BUILD_ROOT%{l_prefix}/man/man8/
  101. %{l_shtool} install -c -m 755 \
  102. -e 's;@l_prefix@;%{l_prefix};g' \
  103. -e 's;@l_susr@;%{l_susr};g' \
  104. -e 's;@l_rusr@;%{l_rusr};g' \
  105. -e 's;@l_rgrp@;%{l_rgrp};g' \
  106. %{SOURCE rc.arpd} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  107. # install OSSP fsl configuration
  108. %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/etc/fsl
  109. %{l_shtool} install -c -m 644 \
  110. -e 's;@l_prefix@;%{l_prefix};g' \
  111. %{SOURCE fsl.arpd} \
  112. $RPM_BUILD_ROOT%{l_prefix}/etc/fsl/
  113. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  114. %{l_files_std} \
  115. '%not %dir %{l_prefix}/etc/fsl' \
  116. '%attr(775,%{l_musr},%{l_rgrp}) %{l_prefix}/var/arpd' \
  117. '%config %{l_prefix}/etc/fsl/fsl.arpd'
  118. %files -f files
  119. %clean
  120. rm -rf $RPM_BUILD_ROOT