honeyd.spec 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. ##
  2. ## honeyd.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. # package information
  26. Name: honeyd
  27. Summary: Creates a Virtual Host on Network
  28. URL: http://www.citi.umich.edu/u/provos/honeyd/
  29. Vendor: Niels Provos
  30. Packager: The OpenPKG Project
  31. Distribution: OpenPKG [EVAL]
  32. Group: Language
  33. License: BSD License
  34. Version: 0.5
  35. Release: 20030222
  36. # list of sources
  37. Source0: http://www.citi.umich.edu/u/provos/honeyd/honeyd-%{version}.tar.gz
  38. Source1: rc.honeyd
  39. Source2: honeyd.conf
  40. Patch0: honeyd.patch
  41. Patch1: http://www.citi.umich.edu/u/provos/honeyd/patches/%{version}/001-ipfrag.patch
  42. # build information
  43. Prefix: %{l_prefix}
  44. BuildRoot: %{l_buildroot}
  45. BuildPreReq: OpenPKG, openpkg >= 20030211, fsl, libdnet, libpcap, libevent
  46. PreReq: OpenPKG, openpkg >= 20030211, fsl
  47. AutoReq: no
  48. AutoReqProv: no
  49. %description
  50. Honeyd is a small daemon that creates virtual hosts on a network.
  51. The hosts can be configured to run arbitrary services, and their
  52. TCP personality can be adapted so that they appear to be running
  53. certain versions of operating systems. Honeyd enables a single host
  54. to claim multiple addresses on a LAN for network simulation. It is
  55. possible to ping the virtual machines, or to traceroute them. Any
  56. type of service on the virtual machine can be simulated according to
  57. a simple configuration file. Instead of simulating a service, it is
  58. also possible to proxy it to another machine.
  59. %prep
  60. %setup -q
  61. %patch0 -p0
  62. %patch1 -p0
  63. %build
  64. %{l_shtool} subst \
  65. -e 's;/var/run/honeyd.pid;%{l_prefix}/var/honeyd/honeyd.pid;' \
  66. honeyd.h
  67. CC="%{l_cc}" \
  68. CFLAGS="%{l_cflags -O}"
  69. ./configure \
  70. --prefix=%{l_prefix} \
  71. --with-libdnet=%{l_prefix} \
  72. --with-libpcap=%{l_prefix} \
  73. --with-libevent=%{l_prefix}
  74. %{l_shtool} subst \
  75. -e "s;^\\(honeyd_LDADD.*\\)$;\\1 `%{l_prefix}/bin/fsl-config --all --ldflags --libs`;" \
  76. Makefile
  77. %{l_make} %{l_mflags}
  78. %install
  79. rm -rf $RPM_BUILD_ROOT
  80. %{l_shtool} mkdir -f -p -m 755 \
  81. $RPM_BUILD_ROOT%{l_prefix}/etc/honeyd \
  82. $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d \
  83. $RPM_BUILD_ROOT%{l_prefix}/etc/fsl \
  84. $RPM_BUILD_ROOT%{l_prefix}/sbin \
  85. $RPM_BUILD_ROOT%{l_prefix}/man/man8 \
  86. $RPM_BUILD_ROOT%{l_prefix}/lib/honeyd \
  87. $RPM_BUILD_ROOT%{l_prefix}/libexec/honeyd \
  88. $RPM_BUILD_ROOT%{l_prefix}/share/honeyd \
  89. $RPM_BUILD_ROOT%{l_prefix}/var/honeyd
  90. # install files
  91. %{l_shtool} install -c -s -m 755 \
  92. honeyd $RPM_BUILD_ROOT%{l_prefix}/sbin/
  93. %{l_shtool} install -c -m 755 \
  94. libhoneyd.so $RPM_BUILD_ROOT%{l_prefix}/lib/honeyd/
  95. %{l_shtool} install -c -m 644 \
  96. honeyd.8 $RPM_BUILD_ROOT%{l_prefix}/man/man8/
  97. %{l_shtool} install -c -m 644 \
  98. -e 's;@l_prefix@;%{l_prefix};g' \
  99. %{SOURCE honeyd.conf} \
  100. $RPM_BUILD_ROOT%{l_prefix}/etc/honeyd/
  101. %{l_shtool} install -c -m 644 \
  102. nmap.assoc nmap.prints xprobe2.conf \
  103. $RPM_BUILD_ROOT%{l_prefix}/share/honeyd/
  104. %{l_shtool} install -c -m 755 \
  105. -e 's;@l_prefix@;%{l_prefix};g' \
  106. %{SOURCE honeyd.service} \
  107. $RPM_BUILD_ROOT%{l_prefix}/libexec/honeyd/
  108. %{l_shtool} install -c -m 755 \
  109. -e 's;@l_prefix@;%{l_prefix};g' \
  110. -e 's;@l_susr@;%{l_susr};g' \
  111. %{SOURCE rc.honeyd} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  112. %{l_shtool} install -c -m 644 \
  113. -e 's;@l_prefix@;%{l_prefix};g' \
  114. %{SOURCE fsl.honeyd} $RPM_BUILD_ROOT%{l_prefix}/etc/fsl/
  115. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  116. %files -f files
  117. %clean
  118. rm -rf $RPM_BUILD_ROOT