p0f.spec 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. ##
  2. ## p0f.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2004 The OpenPKG Project <http://www.openpkg.org/>
  4. ## Copyright (c) 2000-2004 Ralf S. Engelschall <rse@engelschall.com>
  5. ## Copyright (c) 2000-2004 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. # package information
  26. Name: p0f
  27. Summary: Passive OS Fingerprinting Tool
  28. URL: http://lcamtuf.coredump.cx/p0f.shtml
  29. Vendor: Michal Zalewski
  30. Packager: The OpenPKG Project
  31. Distribution: OpenPKG
  32. Class: PLUS
  33. Group: Network
  34. License: LGPL
  35. Version: 2.0.5
  36. Release: 20041011
  37. # list of sources
  38. Source0: http://lcamtuf.coredump.cx/p0f/p0f-%{version}.tgz
  39. Patch0: p0f.patch
  40. # build information
  41. Prefix: %{l_prefix}
  42. BuildRoot: %{l_buildroot}
  43. BuildPreReq: OpenPKG, openpkg >= 20040130, libpcap, gcc, make
  44. PreReq: OpenPKG, openpkg >= 20040130, libpcap
  45. AutoReq: no
  46. AutoReqProv: no
  47. %description
  48. P0f is a versatile passive OS fingerprinting tool. P0f can identify
  49. the system on machines that connect to your box, machines you
  50. connect to, and even machines that merely go through or near your
  51. box. P0f will also detect what the remote system is hooked up to (be
  52. it Ethernet, DSL, OC3, or avian carriers), how far it is located,
  53. what's its uptime, etc.
  54. %track
  55. prog p0f = {
  56. version = %{version}
  57. url = http://lcamtuf.coredump.cx/p0f/
  58. regex = p0f-(__VER__)\.tgz
  59. }
  60. %prep
  61. %setup -q -n p0f
  62. %patch -p0
  63. %build
  64. %{l_shtool} subst \
  65. -e 's;"p0f.fp";"%{l_prefix}/share/p0f/p0f.fp";g' \
  66. config.h
  67. platform=`uname -s`
  68. libs="-lpcap"
  69. case "%{l_platform -t}" in
  70. *-sunos5* ) libs="$libs -lsocket -lnsl" ;;
  71. esac
  72. %{l_make} %{l_mflags -O} -f mk/$platform \
  73. CC="%{l_cc}" \
  74. CFLAGS="%{l_cflags -O} %{l_cppflags}" \
  75. LIBS="%{l_ldflags} $libs"
  76. %install
  77. rm -rf $RPM_BUILD_ROOT
  78. %{l_shtool} mkdir -f -p -m 755 \
  79. $RPM_BUILD_ROOT%{l_prefix}/sbin \
  80. $RPM_BUILD_ROOT%{l_prefix}/share/p0f \
  81. $RPM_BUILD_ROOT%{l_prefix}/man/cat8
  82. %{l_shtool} install -c -s -m 755 \
  83. p0f $RPM_BUILD_ROOT%{l_prefix}/sbin/
  84. %{l_shtool} install -c -m 755 \
  85. p0frep $RPM_BUILD_ROOT%{l_prefix}/sbin/
  86. %{l_shtool} install -c -m 644 \
  87. p0f.fp $RPM_BUILD_ROOT%{l_prefix}/share/p0f/
  88. %{l_shtool} install -c -m 644 \
  89. doc/README $RPM_BUILD_ROOT%{l_prefix}/man/cat8/p0f.8
  90. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  91. %files -f files
  92. %clean
  93. rm -rf $RPM_BUILD_ROOT