whois/whois.spec

changeset 662
22841d168ea4
child 663
fd4ca8d3da2a
equal deleted inserted replaced
-1:000000000000 0:bb3339b2c070
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 ##
23
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: 20111226
36
37 # list of sources
38 Source0: http://ftp.debian.org/debian/pool/main/w/whois/whois_%{version}.tar.gz
39
40 # build information
41 BuildPreReq: OpenPKG, openpkg >= 20100101, make, perl
42 PreReq: OpenPKG, openpkg >= 20100101
43
44 %description
45 A client for querying the WHOIS databases of over 60 top-level domains.
46
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 }
53
54 %prep
55 %setup -q
56 %{l_shtool} subst \
57 -e 's;^OPTS[ ]*:*=.*$;OPTS=;' \
58 Makefile
59
60 %build
61 %{l_shtool} subst -e "s;perl;%{l_prefix}/bin/perl;" Makefile
62
63 ldflags=""
64 case "%{l_platform -t}" in
65 *-sunos* )
66 ldflags="-lnsl -lsocket"
67 ;;
68 *-freebsd* )
69 %{l_shtool} subst \
70 -e "s;# define HAVE_GETOPT_LONG;/* # define HAVE_GETOPT_LONG */;" \
71 -e "s;# define ENABLE_NLS;/* # define ENABLE_NLS */;" \
72 -e "s;# define LOCALEDIR "/usr/local/share/locale";/* # define LOCALEDIR "/usr/local/share/locale"*/;" \
73 config.h
74 ;;
75 esac
76
77 %{l_make} %{l_mflags} \
78 CC="%{l_cc}" \
79 CFLAGS="%{l_cflags -O}" \
80 LDFLAGS="$ldflags"
81
82 %install
83 %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/bin
84 %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/man/man1
85 %{l_shtool} install -s -c -m 755 whois $RPM_BUILD_ROOT%{l_prefix}/bin/
86 %{l_shtool} install -c -m 644 whois.1 $RPM_BUILD_ROOT%{l_prefix}/man/man1/
87 %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
88
89 %files -f files
90
91 %clean
92

mercurial