Modernize packaging, patch buildconf, use parallel make, and correct URL.

Fri, 10 Aug 2012 14:44:09 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Fri, 10 Aug 2012 14:44:09 +0200
changeset 518
0a1da67e02de
parent 517
11b64eba18d7
child 519
eb13d07d5435

Modernize packaging, patch buildconf, use parallel make, and correct URL.

nmap/nmap.patch file | annotate | diff | comparison | revisions
nmap/nmap.spec file | annotate | diff | comparison | revisions
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/nmap/nmap.patch	Fri Aug 10 14:44:09 2012 +0200
     1.3 @@ -0,0 +1,10 @@
     1.4 +Index: ndiff/setup.py
     1.5 +--- ndiff/setup.py.orig	2009-06-24 23:35:54 +0200
     1.6 ++++ ndiff/setup.py	2009-10-18 10:27:48 +0200
     1.7 +@@ -29,5 +29,5 @@
     1.8 +                 + "Installing your distribution's python-dev package may solve this problem.")
     1.9 + 
    1.10 + distutils.core.setup(name = u"ndiff", scripts = [u"ndiff"],
    1.11 +-    data_files = [(u"share/man/man1", [u"docs/ndiff.1"])],
    1.12 ++    data_files = [(u"man/man1", [u"docs/ndiff.1"])],
    1.13 +     cmdclass = {"install_egg_info": null_command, "install": checked_install})
     2.1 --- a/nmap/nmap.spec	Fri Aug 10 14:40:55 2012 +0200
     2.2 +++ b/nmap/nmap.spec	Fri Aug 10 14:44:09 2012 +0200
     2.3 @@ -1,6 +1,6 @@
     2.4  ##
     2.5  ##  nmap.spec -- OpenPKG RPM Package Specification
     2.6 -##  Copyright (c) 2000-2008 OpenPKG Foundation e.V. <http://openpkg.net/>
     2.7 +##  Copyright (c) 2000-2012 OpenPKG Foundation e.V. <http://openpkg.net/>
     2.8  ##
     2.9  ##  Permission to use, copy, modify, and distribute this software for
    2.10  ##  any purpose with or without fee is hereby granted, provided that
    2.11 @@ -31,21 +31,18 @@
    2.12  Class:        BASE
    2.13  Group:        Mapping
    2.14  License:      GPL
    2.15 -Version:      4.76
    2.16 -Release:      20090106
    2.17 +Version:      6.01
    2.18 +Release:      20120800
    2.19  
    2.20  #   list of sources
    2.21 -Source0:      http://nmap.org/dist/nmap-%{version}.tgz
    2.22 +Source0:      http://nmap.org/dist/nmap-%{version}.tar.bz2
    2.23 +Patch0:       nmap.patch
    2.24  
    2.25  #   build information
    2.26 -Prefix:       %{l_prefix}
    2.27 -BuildRoot:    %{l_buildroot}
    2.28 -BuildPreReq:  OpenPKG, openpkg >= 20050615, make, gcc, gcc::with_cxx = yes, bison, flex
    2.29 -PreReq:       OpenPKG, openpkg >= 20050615
    2.30 -BuildPreReq:  libpcap, openssl, getopt, pcre
    2.31 -PreReq:       libpcap, openssl, getopt, pcre
    2.32 -AutoReq:      no
    2.33 -AutoReqProv:  no
    2.34 +BuildPreReq:  OpenPKG, openpkg >= 20100101, make, gcc, gcc::with_cxx = yes, bison, flex
    2.35 +PreReq:       OpenPKG, openpkg >= 20100101
    2.36 +BuildPreReq:  python, libpcap, openssl, getopt, pcre
    2.37 +PreReq:       python, libpcap, openssl, getopt, pcre
    2.38  
    2.39  %description
    2.40      Nmap is a utility for network exploration or security auditing.
    2.41 @@ -62,11 +59,12 @@
    2.42      prog nmap = {
    2.43          version   = %{version}
    2.44          url       = http://nmap.org/dist/
    2.45 -        regex     = nmap-(\d+\.\d+)\.tgz
    2.46 +        regex     = nmap-(\d+\.\d+)\.(?:tgz|tar\.bz2)
    2.47      }
    2.48  
    2.49  %prep
    2.50      %setup -q
    2.51 +    %patch -p0
    2.52      %{l_shtool} subst \
    2.53          -e 's;/usr/local/;%{l_prefix}/;g' \
    2.54          configure */configure
    2.55 @@ -74,10 +72,6 @@
    2.56          -e 's;\(socklen_t int\);\1 size_t;g' \
    2.57          aclocal.m4 \
    2.58          configure
    2.59 -    %{l_shtool} subst \
    2.60 -        -e 's;\(md5_block_data_order\);nmap_\1;g' \
    2.61 -        nbase/md32_common.h \
    2.62 -        nbase/nbase_md5.c
    2.63  
    2.64  %build
    2.65      cppflags="%{l_cppflags}"
    2.66 @@ -101,21 +95,20 @@
    2.67          --with-openssl=%{l_prefix} \
    2.68          --without-nmapfe \
    2.69          --without-zenmap
    2.70 -    %{l_make} %{l_mflags}
    2.71 +    %{l_make} %{l_mflags -O}
    2.72  
    2.73  %install
    2.74 -    rm -rf $RPM_BUILD_ROOT
    2.75      %{l_make} %{l_mflags} install \
    2.76          prefix=$RPM_BUILD_ROOT%{l_prefix} \
    2.77          exec_prefix=$RPM_BUILD_ROOT%{l_prefix} \
    2.78          mandir=$RPM_BUILD_ROOT%{l_prefix}/man
    2.79      rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/icons
    2.80      rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/gnome
    2.81 +    rm -rf $RPM_BUILD_ROOT%{l_prefix}/man/*/man1
    2.82      strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
    2.83      %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
    2.84  
    2.85  %files -f files
    2.86  
    2.87  %clean
    2.88 -    rm -rf $RPM_BUILD_ROOT
    2.89  

mercurial