Fri, 07 Sep 2012 19:08:07 +0200
Correct build configuration in Solaris subdir, correct english grammar,
remove irrelevant strip notice, introduce custom CFLAG logic, facilitate
use of Solaris Studio compiler with needed build configuration
adjustments, conditionally build 64 bit position independent code,
and accommodate tun(7) in newer Solaris releases by renaming driver
and module from conflicting 'tun' to 'vtun'. These changes include
some nonstandard 'I give up' logic causing out of tree builds by
manipulating the PATH, for example.
michael@108 | 1 | ## |
michael@108 | 2 | ## nmap.spec -- OpenPKG RPM Package Specification |
michael@518 | 3 | ## Copyright (c) 2000-2012 OpenPKG Foundation e.V. <http://openpkg.net/> |
michael@108 | 4 | ## |
michael@108 | 5 | ## Permission to use, copy, modify, and distribute this software for |
michael@108 | 6 | ## any purpose with or without fee is hereby granted, provided that |
michael@108 | 7 | ## the above copyright notice and this permission notice appear in all |
michael@108 | 8 | ## copies. |
michael@108 | 9 | ## |
michael@108 | 10 | ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED |
michael@108 | 11 | ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
michael@108 | 12 | ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
michael@108 | 13 | ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR |
michael@108 | 14 | ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
michael@108 | 15 | ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
michael@108 | 16 | ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF |
michael@108 | 17 | ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
michael@108 | 18 | ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
michael@108 | 19 | ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT |
michael@108 | 20 | ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
michael@108 | 21 | ## SUCH DAMAGE. |
michael@108 | 22 | ## |
michael@108 | 23 | |
michael@108 | 24 | # package information |
michael@108 | 25 | Name: nmap |
michael@108 | 26 | Summary: Network Mapping Tool |
michael@108 | 27 | URL: http://nmap.org/ |
michael@108 | 28 | Vendor: Fyodor |
michael@108 | 29 | Packager: OpenPKG Foundation e.V. |
michael@108 | 30 | Distribution: OpenPKG Community |
michael@108 | 31 | Class: BASE |
michael@108 | 32 | Group: Mapping |
michael@108 | 33 | License: GPL |
michael@518 | 34 | Version: 6.01 |
michael@518 | 35 | Release: 20120800 |
michael@108 | 36 | |
michael@108 | 37 | # list of sources |
michael@518 | 38 | Source0: http://nmap.org/dist/nmap-%{version}.tar.bz2 |
michael@518 | 39 | Patch0: nmap.patch |
michael@108 | 40 | |
michael@108 | 41 | # build information |
michael@518 | 42 | BuildPreReq: OpenPKG, openpkg >= 20100101, make, gcc, gcc::with_cxx = yes, bison, flex |
michael@518 | 43 | PreReq: OpenPKG, openpkg >= 20100101 |
michael@518 | 44 | BuildPreReq: python, libpcap, openssl, getopt, pcre |
michael@518 | 45 | PreReq: python, libpcap, openssl, getopt, pcre |
michael@108 | 46 | |
michael@108 | 47 | %description |
michael@108 | 48 | Nmap is a utility for network exploration or security auditing. |
michael@108 | 49 | It supports ping scanning (determine which hosts are up), many |
michael@108 | 50 | port scanning techniques (determine what services the hosts are |
michael@108 | 51 | offering), and TCP/IP fingerprinting (remote host operating |
michael@108 | 52 | system identification). Nmap also offers flexible target and |
michael@108 | 53 | port specification, decoy/stealth scanning, sunRPC scanning, and |
michael@108 | 54 | more. Most UNIX and Windows platforms are supported in both GUI |
michael@108 | 55 | and command-line modes. Several popular handheld devices are also |
michael@108 | 56 | supported, including the Sharp Zaurus and the iPAQ. |
michael@108 | 57 | |
michael@108 | 58 | %track |
michael@108 | 59 | prog nmap = { |
michael@108 | 60 | version = %{version} |
michael@108 | 61 | url = http://nmap.org/dist/ |
michael@518 | 62 | regex = nmap-(\d+\.\d+)\.(?:tgz|tar\.bz2) |
michael@108 | 63 | } |
michael@108 | 64 | |
michael@108 | 65 | %prep |
michael@108 | 66 | %setup -q |
michael@518 | 67 | %patch -p0 |
michael@108 | 68 | %{l_shtool} subst \ |
michael@108 | 69 | -e 's;/usr/local/;%{l_prefix}/;g' \ |
michael@108 | 70 | configure */configure |
michael@108 | 71 | %{l_shtool} subst \ |
michael@108 | 72 | -e 's;\(socklen_t int\);\1 size_t;g' \ |
michael@108 | 73 | aclocal.m4 \ |
michael@108 | 74 | configure |
michael@108 | 75 | |
michael@108 | 76 | %build |
michael@108 | 77 | cppflags="%{l_cppflags}" |
michael@108 | 78 | case "%{l_platform -t}" in |
michael@108 | 79 | *-sunos5.6 ) cppflags="$cppflags -D_XPG4_2" ;; |
michael@108 | 80 | esac |
michael@108 | 81 | ( echo "ac_cv_prog_CXXPROG=\"%{l_cxx}\"" |
michael@108 | 82 | ) >config.cache |
michael@108 | 83 | CC="%{l_cc}" \ |
michael@108 | 84 | CXX="%{l_cxx}" \ |
michael@108 | 85 | CFLAGS="%{l_cflags -O} $cppflags" \ |
michael@108 | 86 | CXXFLAGS="%{l_cxxflags -O} $cppflags" \ |
michael@108 | 87 | CPPFLAGS="$cppflags" \ |
michael@108 | 88 | LDFLAGS="%{l_ldflags}" \ |
michael@108 | 89 | ./configure \ |
michael@108 | 90 | --cache-file=./config.cache \ |
michael@108 | 91 | --prefix=%{l_prefix} \ |
michael@108 | 92 | --mandir=%{l_prefix}/man \ |
michael@108 | 93 | --with-libpcap=%{l_prefix} \ |
michael@108 | 94 | --with-libpcre=%{l_prefix} \ |
michael@108 | 95 | --with-openssl=%{l_prefix} \ |
michael@108 | 96 | --without-nmapfe \ |
michael@108 | 97 | --without-zenmap |
michael@518 | 98 | %{l_make} %{l_mflags -O} |
michael@108 | 99 | |
michael@108 | 100 | %install |
michael@108 | 101 | %{l_make} %{l_mflags} install \ |
michael@108 | 102 | prefix=$RPM_BUILD_ROOT%{l_prefix} \ |
michael@108 | 103 | exec_prefix=$RPM_BUILD_ROOT%{l_prefix} \ |
michael@108 | 104 | mandir=$RPM_BUILD_ROOT%{l_prefix}/man |
michael@108 | 105 | rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/icons |
michael@108 | 106 | rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/gnome |
michael@518 | 107 | rm -rf $RPM_BUILD_ROOT%{l_prefix}/man/*/man1 |
michael@108 | 108 | strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true |
michael@108 | 109 | %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} |
michael@108 | 110 | |
michael@108 | 111 | %files -f files |
michael@108 | 112 | |
michael@108 | 113 | %clean |
michael@108 | 114 |