arpd.spec 4.0 KB

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