honeyd.spec 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. ##
  2. ## honeyd.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2003 The OpenPKG Project <http://www.openpkg.org/>
  4. ## Copyright (c) 2000-2003 Ralf S. Engelschall <rse@engelschall.com>
  5. ## Copyright (c) 2000-2003 Cable & Wireless <http://www.cw.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: mlelstv: JUNK because not building on Solaris/Linux2.2
  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: Security
  34. License: BSD License
  35. Version: 0.6a
  36. Release: 20030731
  37. # package options
  38. %option with_fsl yes
  39. # list of sources
  40. Source0: http://niels.xtdnet.nl/honeyd/honeyd-%{version}.tar.gz
  41. Source1: rc.honeyd
  42. Source2: honeyd.conf
  43. Source3: honeyd.service
  44. Source4: fsl.honeyd
  45. Patch0: honeyd.patch
  46. # build information
  47. Prefix: %{l_prefix}
  48. BuildRoot: %{l_buildroot}
  49. BuildPreReq: OpenPKG, openpkg >= 20030718
  50. PreReq: OpenPKG, openpkg >= 20030718
  51. BuildPreReq: libdnet, libpcap, libevent
  52. PreReq: libdnet, libpcap, libevent
  53. %if "%{with_fsl}" == "yes"
  54. BuildPreReq: fsl >= 1.2.0
  55. PreReq: fsl >= 1.2.0
  56. %endif
  57. AutoReq: no
  58. AutoReqProv: no
  59. %description
  60. Honeyd is a small daemon that creates virtual hosts on a network.
  61. The hosts can be configured to run arbitrary services, and their
  62. TCP personality can be adapted so that they appear to be running
  63. certain versions of operating systems. Honeyd enables a single host
  64. to claim multiple addresses on a LAN for network simulation. It is
  65. possible to ping the virtual machines, or to traceroute them. Any
  66. type of service on the virtual machine can be simulated according to
  67. a simple configuration file. Instead of simulating a service, it is
  68. also possible to proxy it to another machine.
  69. %prep
  70. %setup -q
  71. %patch -p0
  72. %build
  73. %{l_shtool} subst \
  74. -e 's;/var/run/honeyd.pid;%{l_prefix}/var/honeyd/honeyd.pid;' \
  75. honeyd.h
  76. CC="%{l_cc}" \
  77. CFLAGS="%{l_cflags -O}"
  78. ./configure \
  79. --prefix=%{l_prefix} \
  80. --with-libdnet=%{l_prefix} \
  81. --with-libpcap=%{l_prefix} \
  82. --with-libevent=%{l_prefix}
  83. %{l_shtool} subst \
  84. -e "s;^\\(honeyd_LDADD.*\\)$;\\1 %{l_fsl_ldflags} %{l_fsl_libs};" \
  85. Makefile
  86. %{l_make} %{l_mflags}
  87. %install
  88. rm -rf $RPM_BUILD_ROOT
  89. %{l_shtool} mkdir -f -p -m 755 \
  90. $RPM_BUILD_ROOT%{l_prefix}/etc/honeyd \
  91. $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d \
  92. $RPM_BUILD_ROOT%{l_prefix}/sbin \
  93. $RPM_BUILD_ROOT%{l_prefix}/man/man8 \
  94. $RPM_BUILD_ROOT%{l_prefix}/lib/honeyd \
  95. $RPM_BUILD_ROOT%{l_prefix}/libexec/honeyd \
  96. $RPM_BUILD_ROOT%{l_prefix}/share/honeyd \
  97. $RPM_BUILD_ROOT%{l_prefix}/var/honeyd
  98. # install files
  99. %{l_shtool} install -c -s -m 755 \
  100. honeyd $RPM_BUILD_ROOT%{l_prefix}/sbin/
  101. %{l_shtool} install -c -m 755 \
  102. libhoneyd.so $RPM_BUILD_ROOT%{l_prefix}/lib/honeyd/
  103. %{l_shtool} install -c -m 644 \
  104. honeyd.8 $RPM_BUILD_ROOT%{l_prefix}/man/man8/
  105. %{l_shtool} install -c -m 644 %{l_value -s -a} \
  106. %{SOURCE honeyd.conf} \
  107. $RPM_BUILD_ROOT%{l_prefix}/etc/honeyd/
  108. %{l_shtool} install -c -m 644 \
  109. nmap.assoc nmap.prints xprobe2.conf \
  110. $RPM_BUILD_ROOT%{l_prefix}/share/honeyd/
  111. %{l_shtool} install -c -m 755 %{l_value -s -a} \
  112. %{SOURCE honeyd.service} \
  113. $RPM_BUILD_ROOT%{l_prefix}/libexec/honeyd/
  114. %{l_shtool} install -c -m 755 %{l_value -s -a} \
  115. %{SOURCE rc.honeyd} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  116. # install OSSP fsl configuration
  117. %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/etc/fsl
  118. %{l_shtool} install -c -m 644 %{l_value -s -a} \
  119. %{SOURCE fsl.honeyd} \
  120. $RPM_BUILD_ROOT%{l_prefix}/etc/fsl/
  121. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  122. %{l_files_std} \
  123. '%not %dir %{l_prefix}/etc/fsl' \
  124. '%config %{l_prefix}/etc/fsl/fsl.honeyd'
  125. %files -f files
  126. %clean
  127. rm -rf $RPM_BUILD_ROOT