Fri, 03 Aug 2012 16:45:20 +0200
Ignore underlying platform provided curses(3), prefering ncurses(3).
michael@108 | 1 | ## |
michael@108 | 2 | ## nmap.spec -- OpenPKG RPM Package Specification |
michael@108 | 3 | ## Copyright (c) 2000-2008 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@108 | 34 | Version: 4.76 |
michael@109 | 35 | Release: 20090106 |
michael@108 | 36 | |
michael@108 | 37 | # list of sources |
michael@108 | 38 | Source0: http://nmap.org/dist/nmap-%{version}.tgz |
michael@108 | 39 | |
michael@108 | 40 | # build information |
michael@108 | 41 | Prefix: %{l_prefix} |
michael@108 | 42 | BuildRoot: %{l_buildroot} |
michael@108 | 43 | BuildPreReq: OpenPKG, openpkg >= 20050615, make, gcc, gcc::with_cxx = yes, bison, flex |
michael@108 | 44 | PreReq: OpenPKG, openpkg >= 20050615 |
michael@108 | 45 | BuildPreReq: libpcap, openssl, getopt, pcre |
michael@108 | 46 | PreReq: libpcap, openssl, getopt, pcre |
michael@108 | 47 | AutoReq: no |
michael@108 | 48 | AutoReqProv: no |
michael@108 | 49 | |
michael@108 | 50 | %description |
michael@108 | 51 | Nmap is a utility for network exploration or security auditing. |
michael@108 | 52 | It supports ping scanning (determine which hosts are up), many |
michael@108 | 53 | port scanning techniques (determine what services the hosts are |
michael@108 | 54 | offering), and TCP/IP fingerprinting (remote host operating |
michael@108 | 55 | system identification). Nmap also offers flexible target and |
michael@108 | 56 | port specification, decoy/stealth scanning, sunRPC scanning, and |
michael@108 | 57 | more. Most UNIX and Windows platforms are supported in both GUI |
michael@108 | 58 | and command-line modes. Several popular handheld devices are also |
michael@108 | 59 | supported, including the Sharp Zaurus and the iPAQ. |
michael@108 | 60 | |
michael@108 | 61 | %track |
michael@108 | 62 | prog nmap = { |
michael@108 | 63 | version = %{version} |
michael@108 | 64 | url = http://nmap.org/dist/ |
michael@108 | 65 | regex = nmap-(\d+\.\d+)\.tgz |
michael@108 | 66 | } |
michael@108 | 67 | |
michael@108 | 68 | %prep |
michael@108 | 69 | %setup -q |
michael@108 | 70 | %{l_shtool} subst \ |
michael@108 | 71 | -e 's;/usr/local/;%{l_prefix}/;g' \ |
michael@108 | 72 | configure */configure |
michael@108 | 73 | %{l_shtool} subst \ |
michael@108 | 74 | -e 's;\(socklen_t int\);\1 size_t;g' \ |
michael@108 | 75 | aclocal.m4 \ |
michael@108 | 76 | configure |
michael@109 | 77 | %{l_shtool} subst \ |
michael@109 | 78 | -e 's;\(md5_block_data_order\);nmap_\1;g' \ |
michael@109 | 79 | nbase/md32_common.h \ |
michael@109 | 80 | nbase/nbase_md5.c |
michael@108 | 81 | |
michael@108 | 82 | %build |
michael@108 | 83 | cppflags="%{l_cppflags}" |
michael@108 | 84 | case "%{l_platform -t}" in |
michael@108 | 85 | *-sunos5.6 ) cppflags="$cppflags -D_XPG4_2" ;; |
michael@108 | 86 | esac |
michael@108 | 87 | ( echo "ac_cv_prog_CXXPROG=\"%{l_cxx}\"" |
michael@108 | 88 | ) >config.cache |
michael@108 | 89 | CC="%{l_cc}" \ |
michael@108 | 90 | CXX="%{l_cxx}" \ |
michael@108 | 91 | CFLAGS="%{l_cflags -O} $cppflags" \ |
michael@108 | 92 | CXXFLAGS="%{l_cxxflags -O} $cppflags" \ |
michael@108 | 93 | CPPFLAGS="$cppflags" \ |
michael@108 | 94 | LDFLAGS="%{l_ldflags}" \ |
michael@108 | 95 | ./configure \ |
michael@108 | 96 | --cache-file=./config.cache \ |
michael@108 | 97 | --prefix=%{l_prefix} \ |
michael@108 | 98 | --mandir=%{l_prefix}/man \ |
michael@108 | 99 | --with-libpcap=%{l_prefix} \ |
michael@108 | 100 | --with-libpcre=%{l_prefix} \ |
michael@108 | 101 | --with-openssl=%{l_prefix} \ |
michael@108 | 102 | --without-nmapfe \ |
michael@108 | 103 | --without-zenmap |
michael@108 | 104 | %{l_make} %{l_mflags} |
michael@108 | 105 | |
michael@108 | 106 | %install |
michael@108 | 107 | rm -rf $RPM_BUILD_ROOT |
michael@108 | 108 | %{l_make} %{l_mflags} install \ |
michael@108 | 109 | prefix=$RPM_BUILD_ROOT%{l_prefix} \ |
michael@108 | 110 | exec_prefix=$RPM_BUILD_ROOT%{l_prefix} \ |
michael@108 | 111 | mandir=$RPM_BUILD_ROOT%{l_prefix}/man |
michael@108 | 112 | rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/icons |
michael@108 | 113 | rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/gnome |
michael@108 | 114 | strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true |
michael@108 | 115 | %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} |
michael@108 | 116 | |
michael@108 | 117 | %files -f files |
michael@108 | 118 | |
michael@108 | 119 | %clean |
michael@108 | 120 | rm -rf $RPM_BUILD_ROOT |
michael@108 | 121 |