nmap.spec 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. ##
  2. ## nmap.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2006 OpenPKG Foundation e.V. <http://openpkg.net/>
  4. ## Copyright (c) 2000-2006 Ralf S. Engelschall <http://engelschall.com/>
  5. ##
  6. ## Permission to use, copy, modify, and distribute this software for
  7. ## any purpose with or without fee is hereby granted, provided that
  8. ## the above copyright notice and this permission notice appear in all
  9. ## copies.
  10. ##
  11. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  12. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  13. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  14. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  15. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  16. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  17. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  18. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  19. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  20. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  21. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  22. ## SUCH DAMAGE.
  23. ##
  24. # package information
  25. Name: nmap
  26. Summary: Network Mapping Tool
  27. URL: http://www.insecure.org/nmap/
  28. Vendor: Fyodor
  29. Packager: OpenPKG
  30. Distribution: OpenPKG
  31. Class: BASE
  32. Group: Network
  33. License: GPL
  34. Version: 4.11
  35. Release: 20060624
  36. # list of sources
  37. Source0: http://www.insecure.org/nmap/dist/nmap-%{version}.tgz
  38. # build information
  39. Prefix: %{l_prefix}
  40. BuildRoot: %{l_buildroot}
  41. BuildPreReq: OpenPKG, openpkg >= 20050615, make, gcc, bison, flex
  42. PreReq: OpenPKG, openpkg >= 20050615
  43. BuildPreReq: libpcap, openssl, getopt
  44. PreReq: libpcap, openssl, getopt
  45. AutoReq: no
  46. AutoReqProv: no
  47. %description
  48. Nmap is a utility for network exploration or security auditing.
  49. It supports ping scanning (determine which hosts are up), many
  50. port scanning techniques (determine what services the hosts are
  51. offering), and TCP/IP fingerprinting (remote host operating
  52. system identification). Nmap also offers flexible target and
  53. port specification, decoy/stealth scanning, sunRPC scanning, and
  54. more. Most UNIX and Windows platforms are supported in both GUI
  55. and command-line modes. Several popular handheld devices are also
  56. supported, including the Sharp Zaurus and the iPAQ.
  57. %track
  58. prog nmap = {
  59. version = %{version}
  60. url = http://www.insecure.org/nmap/dist/
  61. regex = nmap-(\d+\.\d+)\.tgz
  62. }
  63. %prep
  64. %setup -q
  65. %{l_shtool} subst \
  66. -e 's;/usr/local/;%{l_prefix}/;g' \
  67. configure */configure
  68. %{l_shtool} subst \
  69. -e 's;\(socklen_t int\);\1 size_t;g' \
  70. aclocal.m4 \
  71. configure
  72. %build
  73. cppflags="%{l_cppflags}"
  74. case "%{l_platform -t}" in
  75. *-sunos5.6 ) cppflags="$cppflags -D_XPG4_2" ;;
  76. esac
  77. ( echo "ac_cv_prog_CXXPROG=\"%{l_cxx}\""
  78. ) >config.cache
  79. CC="%{l_cc}" \
  80. CXX="%{l_cxx}" \
  81. CFLAGS="%{l_cflags -O} $cppflags" \
  82. CXXFLAGS="%{l_cxxflags -O} $cppflags" \
  83. CPPFLAGS="$cppflags" \
  84. LDFLAGS="%{l_ldflags}" \
  85. ./configure \
  86. --cache-file=./config.cache \
  87. --prefix=%{l_prefix} \
  88. --with-libpcap=%{l_prefix} \
  89. --with-openssl=%{l_prefix} \
  90. --without-nmapfe
  91. %{l_make} %{l_mflags}
  92. %install
  93. rm -rf $RPM_BUILD_ROOT
  94. %{l_make} %{l_mflags} install prefix=$RPM_BUILD_ROOT%{l_prefix}
  95. rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/gnome
  96. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  97. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  98. %files -f files
  99. %clean
  100. rm -rf $RPM_BUILD_ROOT