arpd.spec 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  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: 20030415
  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. # build information
  45. Prefix: %{l_prefix}
  46. BuildRoot: %{l_buildroot}
  47. BuildPreReq: OpenPKG, openpkg >= 20030415, gcc, libdnet, libpcap, libevent
  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. Arpd is an Address Resolution Protocol (ARP) daemon which replies to
  57. any ARP request for an IP address matching the specified destination
  58. network with the hardware MAC address of the own interface, but only
  59. after determining if another host already claims it. Any IP address
  60. claimed by arpd is eventually forgotten after a period of inactivity
  61. or after a hard timeout, and is relinquished if the real owner shows
  62. up. This enables a single host to claim all unassigned addresses on
  63. a LAN for network monitoring or simulation.
  64. %prep
  65. %setup -q -n arpd
  66. %{l_shtool} subst \
  67. -e 's;LIBS=$DNETLIB;LIBS="$LIBS $DNETLIB";' \
  68. -e 's;CFLAGS=$DNETINC;CFLAGS="$CFLAGS $DNETINC";' \
  69. configure
  70. %build
  71. %{l_shtool} subst \
  72. -e 's;/var/run/arpd.pid;%{l_prefix}/var/arpd/arpd.pid;' \
  73. arpd.c arpd.8
  74. CC="%{l_cc}" \
  75. CFLAGS="%{l_cflags -O}" \
  76. CPPFLAGS="%{l_cppflags}" \
  77. LDFLAGS="%{l_ldflags} %{l_fsl_ldflags}" \
  78. LIBS="%{l_fsl_libs}" \
  79. ./configure \
  80. --prefix=%{l_prefix} \
  81. --with-libdnet=%{l_prefix} \
  82. --with-libpcap=%{l_prefix} \
  83. --with-libevent=%{l_prefix}
  84. %{l_make} %{l_mflags}
  85. %install
  86. rm -rf $RPM_BUILD_ROOT
  87. %{l_shtool} mkdir -f -p -m 755 \
  88. $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d \
  89. $RPM_BUILD_ROOT%{l_prefix}/etc/fsl \
  90. $RPM_BUILD_ROOT%{l_prefix}/sbin \
  91. $RPM_BUILD_ROOT%{l_prefix}/man/man8 \
  92. $RPM_BUILD_ROOT%{l_prefix}/var/arpd
  93. %{l_shtool} install -c -s -m 755 \
  94. arpd $RPM_BUILD_ROOT%{l_prefix}/sbin/
  95. %{l_shtool} install -c -m 644 \
  96. arpd.8 $RPM_BUILD_ROOT%{l_prefix}/man/man8/
  97. %{l_shtool} install -c -m 755 \
  98. -e 's;@l_prefix@;%{l_prefix};g' \
  99. -e 's;@l_susr@;%{l_susr};g' \
  100. %{SOURCE rc.arpd} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  101. %{l_shtool} install -c -m 644 \
  102. -e 's;@l_prefix@;%{l_prefix};g' \
  103. %{SOURCE fsl.arpd} $RPM_BUILD_ROOT%{l_prefix}/etc/fsl/
  104. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  105. %{l_files_std} \
  106. '%not %dir %{l_prefix}/etc/fsl'
  107. %files -f files
  108. %clean
  109. rm -rf $RPM_BUILD_ROOT