whois/whois.spec

Mon, 28 Jan 2013 17:37:18 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Mon, 28 Jan 2013 17:37:18 +0100
changeset 758
a2c6460cfb16
parent 662
22841d168ea4
permissions
-rw-r--r--

Correct socket error reporting improvement with IPv6 portable code,
after helpful recommendation by Saúl Ibarra Corretgé on OSips devlist.

     1 ##
     2 ##  whois.spec -- OpenPKG RPM Package Specification
     3 ##  Copyright (c) 2000-2011 OpenPKG Foundation e.V. <http://openpkg.net/>
     4 ##
     5 ##  Permission to use, copy, modify, and distribute this software for
     6 ##  any purpose with or without fee is hereby granted, provided that
     7 ##  the above copyright notice and this permission notice appear in all
     8 ##  copies.
     9 ##
    10 ##  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
    11 ##  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
    12 ##  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
    13 ##  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
    14 ##  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    15 ##  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
    16 ##  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
    17 ##  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
    18 ##  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
    19 ##  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
    20 ##  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    21 ##  SUCH DAMAGE.
    22 ##
    24 #   package information
    25 Name:         whois
    26 Summary:      WHOIS Client
    27 URL:          http://www.linux.it/~md/software/
    28 Vendor:       Marco d'Itri
    29 Packager:     OpenPKG Foundation e.V.
    30 Distribution: OpenPKG Community
    31 Class:        BASE
    32 Group:        WHOIS
    33 License:      GPL
    34 Version:      5.0.14
    35 Release:      20120800
    37 #   list of sources
    38 Source0:      http://ftp.debian.org/debian/pool/main/w/whois/whois_%{version}.tar.gz
    40 #   build information
    41 BuildPreReq:  OpenPKG, openpkg >= 20100101, make, perl
    42 PreReq:       OpenPKG, openpkg >= 20100101
    44 %description
    45     A client for querying the WHOIS databases of over 60 top-level domains.
    47 %track
    48     prog whois = {
    49         version   = %{version}
    50         url       = http://ftp.debian.org/debian/pool/main/w/whois/
    51         regex     = whois_(__VER__)\.tar\.gz
    52     }
    54 %prep
    55     %setup -q
    56     %{l_shtool} subst \
    57         -e 's;^OPTS[ 	]*:*=.*$;OPTS=;' \
    58         -e 's;^\(install:.*\)install-pos;\1;' \
    59         -e 's;^\(all:.*\)pos;\1;' \
    60         Makefile
    62 %build
    63     %{l_shtool} subst -e "s;perl;%{l_prefix}/bin/perl;" Makefile
    65     ldflags=""
    66     case "%{l_platform -t}" in
    67         *-sunos* )
    68             ldflags="-lnsl -lsocket"
    69             ;;
    70         *-freebsd* )
    71             %{l_shtool} subst \
    72                 -e "s;# define HAVE_GETOPT_LONG;/* # define HAVE_GETOPT_LONG */;" \
    73                 -e "s;# define ENABLE_NLS;/* # define ENABLE_NLS */;" \
    74                 -e "s;# define LOCALEDIR "/usr/local/share/locale";/* # define LOCALEDIR "/usr/local/share/locale"*/;" \
    75                 config.h
    76             ;;
    77     esac
    79     %{l_make} %{l_mflags -O} \
    80         CC="%{l_cc}" \
    81         CFLAGS="%{l_cflags -O}" \
    82         LDFLAGS="$ldflags"
    84 %install
    85     %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/bin
    86     %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/man/man1
    87     %{l_shtool} install -s -c -m 755 whois $RPM_BUILD_ROOT%{l_prefix}/bin/
    88     %{l_shtool} install -c -m 644 whois.1 $RPM_BUILD_ROOT%{l_prefix}/man/man1/
    89     %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
    91 %files -f files
    93 %clean

mercurial