honeyd.spec 4.4 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. # FIXME: Test routing
  26. # package information
  27. Name: honeyd
  28. Summary: Creates a Virtual Host on Network
  29. URL: http://www.citi.umich.edu/u/provos/honeyd/
  30. Vendor: Niels Provos
  31. Packager: The OpenPKG Project
  32. Distribution: OpenPKG [JUNK]
  33. Group: Language
  34. License: BSD License
  35. Version: 0.5
  36. Release: 20030220
  37. # list of sources
  38. Source0: http://www.citi.umich.edu/u/provos/honeyd/honeyd-%{version}.tar.gz
  39. Source1: rc.honeyd
  40. Source2: honeyd.conf
  41. Patch0: honeyd.patch
  42. # build information
  43. Prefix: %{l_prefix}
  44. BuildRoot: %{l_buildroot}
  45. BuildPreReq: OpenPKG, openpkg >= 20030211, libdnet, libpcap, libevent
  46. PreReq: OpenPKG, openpkg >= 20030211
  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. %patch -p0
  62. %build
  63. CC="%{l_cc}" \
  64. CFLAGS="%{l_cflags -O}" \
  65. ./configure \
  66. --prefix=%{l_prefix} \
  67. --with-libdnet=%{l_prefix} \
  68. --with-libpcap=%{l_prefix} \
  69. --with-libevent=%{l_prefix} \
  70. --includedir=%{l_prefix}
  71. %{l_make} %{l_mflags -O}
  72. %install
  73. rm -rf $RPM_BUILD_ROOT
  74. # create filesystem hierachy
  75. %{l_shtool} mkdir -f -p -m 755 \
  76. $RPM_BUILD_ROOT%{l_prefix}/etc/honeyd \
  77. $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d \
  78. $RPM_BUILD_ROOT%{l_prefix}/sbin \
  79. $RPM_BUILD_ROOT%{l_prefix}/man/man8 \
  80. $RPM_BUILD_ROOT%{l_prefix}/share/honeyd/scripts
  81. # install files
  82. %{l_shtool} install -c -s -m 755 \
  83. honeyd $RPM_BUILD_ROOT%{l_prefix}/sbin
  84. %{l_shtool} install -c -m 644 \
  85. honeyd.8 $RPM_BUILD_ROOT%{l_prefix}/man/man8/
  86. %{l_shtool} install -c -m 644 \
  87. nmap.assoc $RPM_BUILD_ROOT%{l_prefix}/share/honeyd
  88. %{l_shtool} install -c -m 644 \
  89. nmap.prints $RPM_BUILD_ROOT%{l_prefix}/share/honeyd
  90. %{l_shtool} install -c -m 644 \
  91. xprobe2.conf $RPM_BUILD_ROOT%{l_prefix}/share/honeyd
  92. %{l_shtool} install -c -m 644 \
  93. scripts/router-telnet.pl $RPM_BUILD_ROOT%{l_prefix}/share/honeyd/scripts
  94. %{l_shtool} install -c -m 644 \
  95. scripts/test.sh $RPM_BUILD_ROOT%{l_prefix}/share/honeyd/scripts
  96. %{l_shtool} install -c -m 644 \
  97. scripts/web.sh $RPM_BUILD_ROOT%{l_prefix}/share/honeyd/scripts
  98. %{l_shtool} install -c -m 755 \
  99. %{SOURCE honeyd.conf} $RPM_BUILD_ROOT%{l_prefix}/etc/honeyd/
  100. %{l_shtool} install -c -m 755 \
  101. -e 's;@l_prefix@;%{l_prefix};g' \
  102. -e 's;@l_susr@;%{l_susr};g' \
  103. %{SOURCE rc.honeyd} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  104. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  105. %files -f files
  106. %clean
  107. rm -rf $RPM_BUILD_ROOT