nmap/nmap.spec

changeset 108
79a5b329670a
child 109
7fdb96a64ea9
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/nmap/nmap.spec	Sat Feb 21 16:39:55 2009 +0100
     1.3 @@ -0,0 +1,117 @@
     1.4 +##
     1.5 +##  nmap.spec -- OpenPKG RPM Package Specification
     1.6 +##  Copyright (c) 2000-2008 OpenPKG Foundation e.V. <http://openpkg.net/>
     1.7 +##
     1.8 +##  Permission to use, copy, modify, and distribute this software for
     1.9 +##  any purpose with or without fee is hereby granted, provided that
    1.10 +##  the above copyright notice and this permission notice appear in all
    1.11 +##  copies.
    1.12 +##
    1.13 +##  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
    1.14 +##  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
    1.15 +##  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
    1.16 +##  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
    1.17 +##  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    1.18 +##  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
    1.19 +##  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
    1.20 +##  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
    1.21 +##  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
    1.22 +##  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
    1.23 +##  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    1.24 +##  SUCH DAMAGE.
    1.25 +##
    1.26 +
    1.27 +#   package information
    1.28 +Name:         nmap
    1.29 +Summary:      Network Mapping Tool
    1.30 +URL:          http://nmap.org/
    1.31 +Vendor:       Fyodor
    1.32 +Packager:     OpenPKG Foundation e.V.
    1.33 +Distribution: OpenPKG Community
    1.34 +Class:        BASE
    1.35 +Group:        Mapping
    1.36 +License:      GPL
    1.37 +Version:      4.76
    1.38 +Release:      20080912
    1.39 +
    1.40 +#   list of sources
    1.41 +Source0:      http://nmap.org/dist/nmap-%{version}.tgz
    1.42 +
    1.43 +#   build information
    1.44 +Prefix:       %{l_prefix}
    1.45 +BuildRoot:    %{l_buildroot}
    1.46 +BuildPreReq:  OpenPKG, openpkg >= 20050615, make, gcc, gcc::with_cxx = yes, bison, flex
    1.47 +PreReq:       OpenPKG, openpkg >= 20050615
    1.48 +BuildPreReq:  libpcap, openssl, getopt, pcre
    1.49 +PreReq:       libpcap, openssl, getopt, pcre
    1.50 +AutoReq:      no
    1.51 +AutoReqProv:  no
    1.52 +
    1.53 +%description
    1.54 +    Nmap is a utility for network exploration or security auditing.
    1.55 +    It supports ping scanning (determine which hosts are up), many
    1.56 +    port scanning techniques (determine what services the hosts are
    1.57 +    offering), and TCP/IP fingerprinting (remote host operating
    1.58 +    system identification). Nmap also offers flexible target and
    1.59 +    port specification, decoy/stealth scanning, sunRPC scanning, and
    1.60 +    more. Most UNIX and Windows platforms are supported in both GUI
    1.61 +    and command-line modes. Several popular handheld devices are also
    1.62 +    supported, including the Sharp Zaurus and the iPAQ.
    1.63 +
    1.64 +%track
    1.65 +    prog nmap = {
    1.66 +        version   = %{version}
    1.67 +        url       = http://nmap.org/dist/
    1.68 +        regex     = nmap-(\d+\.\d+)\.tgz
    1.69 +    }
    1.70 +
    1.71 +%prep
    1.72 +    %setup -q
    1.73 +    %{l_shtool} subst \
    1.74 +        -e 's;/usr/local/;%{l_prefix}/;g' \
    1.75 +        configure */configure
    1.76 +    %{l_shtool} subst \
    1.77 +        -e 's;\(socklen_t int\);\1 size_t;g' \
    1.78 +        aclocal.m4 \
    1.79 +        configure
    1.80 +
    1.81 +%build
    1.82 +    cppflags="%{l_cppflags}"
    1.83 +    case "%{l_platform -t}" in
    1.84 +        *-sunos5.6 ) cppflags="$cppflags -D_XPG4_2" ;;
    1.85 +    esac
    1.86 +    ( echo "ac_cv_prog_CXXPROG=\"%{l_cxx}\""
    1.87 +    ) >config.cache
    1.88 +    CC="%{l_cc}" \
    1.89 +    CXX="%{l_cxx}" \
    1.90 +    CFLAGS="%{l_cflags -O} $cppflags" \
    1.91 +    CXXFLAGS="%{l_cxxflags -O} $cppflags" \
    1.92 +    CPPFLAGS="$cppflags" \
    1.93 +    LDFLAGS="%{l_ldflags}" \
    1.94 +    ./configure \
    1.95 +        --cache-file=./config.cache \
    1.96 +        --prefix=%{l_prefix} \
    1.97 +        --mandir=%{l_prefix}/man \
    1.98 +        --with-libpcap=%{l_prefix} \
    1.99 +        --with-libpcre=%{l_prefix} \
   1.100 +        --with-openssl=%{l_prefix} \
   1.101 +        --without-nmapfe \
   1.102 +        --without-zenmap
   1.103 +    %{l_make} %{l_mflags}
   1.104 +
   1.105 +%install
   1.106 +    rm -rf $RPM_BUILD_ROOT
   1.107 +    %{l_make} %{l_mflags} install \
   1.108 +        prefix=$RPM_BUILD_ROOT%{l_prefix} \
   1.109 +        exec_prefix=$RPM_BUILD_ROOT%{l_prefix} \
   1.110 +        mandir=$RPM_BUILD_ROOT%{l_prefix}/man
   1.111 +    rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/icons
   1.112 +    rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/gnome
   1.113 +    strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
   1.114 +    %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
   1.115 +
   1.116 +%files -f files
   1.117 +
   1.118 +%clean
   1.119 +    rm -rf $RPM_BUILD_ROOT
   1.120 +

mercurial