|
|
@@ -39,6 +39,7 @@
|
|
|
%define V_curl_easy 1.35
|
|
|
%define V_net_imap_simple 0.93
|
|
|
%define V_net_bgp 0.07
|
|
|
+%define V_net_pcap 0.05
|
|
|
|
|
|
# package information
|
|
|
Name: perl-net
|
|
|
@@ -51,10 +52,11 @@ Class: BASE
|
|
|
Group: Language
|
|
|
License: GPL/Artistic
|
|
|
Version: %{V_perl}
|
|
|
-Release: 20040218
|
|
|
+Release: 20040228
|
|
|
|
|
|
# package options
|
|
|
%option with_curl no
|
|
|
+%option with_pcap no
|
|
|
|
|
|
# list of sources
|
|
|
Source0: http://www.cpan.org/modules/by-module/Net/Net-Daemon-%{V_net_daemon}.tar.gz
|
|
|
@@ -71,6 +73,7 @@ Source10: http://www.cpan.org/modules/by-module/RPC/PlRPC-%{V_plrpc}.tar.gz
|
|
|
Source11: http://curl.haxx.se/libcurl/perl/Curl-easy-%{V_curl_easy}.tar.gz
|
|
|
Source12: http://www.cpan.org/modules/by-module/Net/Net-IMAP-Simple-%{V_net_imap_simple}.tar.gz
|
|
|
Source13: http://www.cpan.org/modules/by-module/Net/Net-BGP-%{V_net_bgp}.tar.gz
|
|
|
+Source14: http://www.cpan.org/authors/id/K/KC/KCARNUT/Net-Pcap-%{V_net_pcap}.tar.gz
|
|
|
Patch0: perl-net.patch
|
|
|
|
|
|
# build information
|
|
|
@@ -82,6 +85,10 @@ PreReq: OpenPKG, openpkg >= 20040130, perl >= %{V_perl}, perl-openpkg >= %
|
|
|
BuildPreReq: curl
|
|
|
PreReq: curl
|
|
|
%endif
|
|
|
+%if "%{with_pcap}" == "yes"
|
|
|
+BuildPreReq: libpcap
|
|
|
+PreReq: libpcap
|
|
|
+%endif
|
|
|
AutoReq: no
|
|
|
AutoReqProv: no
|
|
|
|
|
|
@@ -115,6 +122,9 @@ AutoReqProv: no
|
|
|
%endif
|
|
|
- Net::IMAP::Simple (%{V_net_imap_simple})
|
|
|
- Net::BGP (%{V_net_bgp})
|
|
|
+%if "%{with_pcap}" == "yes"
|
|
|
+ - Net::Pcap (%{V_net_pcap})
|
|
|
+%endif
|
|
|
|
|
|
%track
|
|
|
prog perl-net:Curl-easy = {
|
|
|
@@ -177,6 +187,11 @@ AutoReqProv: no
|
|
|
url = http://www.cpan.org/modules/by-module/RPC/
|
|
|
regex = PlRPC-(__VER__)\.tar\.gz
|
|
|
}
|
|
|
+ prog perl-net:Net-Pcap = {
|
|
|
+ version = %{V_net_pcap}
|
|
|
+ url = http://www.cpan.org/authors/id/K/KC/KCARNUT/
|
|
|
+ regex = Net-Pcap-(__VER__)\.tar\.gz
|
|
|
+ }
|
|
|
|
|
|
%prep
|
|
|
%setup -q -c
|
|
|
@@ -193,7 +208,8 @@ AutoReqProv: no
|
|
|
%setup -q -T -D -a 11
|
|
|
%setup -q -T -D -a 12
|
|
|
%setup -q -T -D -a 13
|
|
|
- %patch -p0
|
|
|
+ %setup -q -T -D -a 14
|
|
|
+ sed <%{PATCH0} -e 's;@l_prefix@;%{l_prefix};g' | %{l_patch} -p0 -b
|
|
|
|
|
|
%build
|
|
|
|
|
|
@@ -215,6 +231,9 @@ AutoReqProv: no
|
|
|
%endif
|
|
|
%{l_prefix}/bin/perl-openpkg -d %{SOURCE12} configure build install
|
|
|
%{l_prefix}/bin/perl-openpkg -d %{SOURCE13} configure build install
|
|
|
+%if "%{with_pcap}" == "yes"
|
|
|
+ %{l_prefix}/bin/perl-openpkg -d %{SOURCE14} configure build install
|
|
|
+%endif
|
|
|
%{l_prefix}/bin/perl-openpkg -F perl-openpkg-files fixate cleanup
|
|
|
%{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} `cat perl-openpkg-files`
|
|
|
|