Tue, 29 Mar 2011 19:46:35 +0200
Correct and introduce slightly needed logic, leading to better reliability:
Update bash(1) patch logic, correct several buildconf make location
errors, correct failed bash(1) configure invocation, enable perl(1) to
build with unpathed make(1), patch rpm(1) to correctly link with
internal libdb(3), and lastly unsuscessfully try to reorganize rpm patch
hunks.
1 ##
2 ## perl-net.spec -- OpenPKG RPM Package Specification
3 ## Copyright (c) 2000-2008 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 # versions of individual parts
25 %define V_perl 5.10.0
26 %define V_math_base85 0.2
27 %define V_net_ipv4addr 0.10
28 %define V_net_ipv6addr 0.2
29 %define V_net_daemon 0.43
30 %define V_net_server 0.97
31 %define V_net_ext 1.011
32 %define V_libnet 1.22
33 %define V_net_netmask 1.9015
34 %define V_net_ftp_common 6.1
35 %define V_net_snmp 5.2.0
36 %define V_net_tftp 0.17
37 %define V_net_telnet 3.03
38 %define V_net_telnet_cisco 1.10
39 %define V_plrpc 0.2020
40 %define V_net_imap_simple 1.17
41 %define V_net_bgp 0.10
42 %define V_net_pcap 0.16
43 %define V_net_radius 1.56
44 %define V_net_ip 1.25
45 %define V_class_gomor 1.01
46 %define V_net_packet 3.26
47 %define V_net_xmpp 1.02
48 %define V_net_jabber 2.0
49 %define V_net_patricia 1.014
50 %define V_net_irc 0.75
51 %define V_ip_country 2.26
52 %define V_io_socket_multicast 1.05
53 %define V_net_growlclient 0.02
54 %define V_net_dhcp 0.66
55 %define V_net_proxy 0.12
56 %define V_net_netxap 0.02
58 # package information
59 Name: perl-net
60 Summary: Perl Modules for use with networks
61 URL: http://www.cpan.org/
62 Vendor: Perl Community
63 Packager: OpenPKG Foundation e.V.
64 Distribution: OpenPKG Community
65 Class: BASE
66 Group: Perl
67 License: GPL/Artistic
68 Version: %{V_perl}
69 Release: 20090106
71 # package options
72 %option with_pcap no
74 # list of sources
75 Source0: http://www.cpan.org/modules/by-module/Math/Math-Base85-%{V_math_base85}.tar.gz
76 Source1: http://www.cpan.org/modules/by-module/Net/Net-IPv4Addr-%{V_net_ipv4addr}.tar.gz
77 Source2: http://www.cpan.org/modules/by-module/Net/Net-IPv6Addr-%{V_net_ipv6addr}.tar.gz
78 Source3: http://www.cpan.org/modules/by-module/Net/Net-Daemon-%{V_net_daemon}.tar.gz
79 Source4: http://www.cpan.org/modules/by-module/Net/Net-Server-%{V_net_server}.tar.gz
80 Source5: http://www.cpan.org/modules/by-module/Net/Net-ext-%{V_net_ext}.tar.gz
81 Source6: http://www.cpan.org/modules/by-module/Net/libnet-%{V_libnet}.tar.gz
82 Source7: http://www.cpan.org/modules/by-module/Net/Net-Netmask-%{V_net_netmask}.tar.gz
83 Source8: http://www.cpan.org/modules/by-module/Net/Net-FTP-Common-%{V_net_ftp_common}.tar.gz
84 Source9: http://www.cpan.org/modules/by-module/Net/Net-SNMP-%{V_net_snmp}.tar.gz
85 Source10: http://www.cpan.org/modules/by-module/Net/Net-TFTP-%{V_net_tftp}.tar.gz
86 Source11: http://www.cpan.org/modules/by-module/Net/Net-Telnet-%{V_net_telnet}.tar.gz
87 Source12: http://www.cpan.org/modules/by-module/Net/Net-Telnet-Cisco-%{V_net_telnet_cisco}.tar.gz
88 Source13: http://www.cpan.org/modules/by-module/Net/Net-Radius-%{V_net_radius}.tar.gz
89 Source14: http://www.cpan.org/modules/by-module/RPC/PlRPC-%{V_plrpc}.tar.gz
90 Source15: http://www.cpan.org/modules/by-module/Net/Net-IMAP-Simple-%{V_net_imap_simple}.tar.gz
91 Source16: http://www.cpan.org/modules/by-module/Net/Net-BGP-%{V_net_bgp}.tar.gz
92 Source17: http://www.cpan.org/modules/by-module/Net/Net-Pcap-%{V_net_pcap}.tar.gz
93 Source18: http://www.cpan.org/modules/by-module/Class/Class-Gomor-%{V_class_gomor}.tar.gz
94 Source19: http://www.cpan.org/modules/by-module/Net/Net-Packet-%{V_net_packet}.tar.gz
95 Source20: http://www.cpan.org/modules/by-module/Net/Net-IP-%{V_net_ip}.tar.gz
96 Source21: http://www.cpan.org/modules/by-module/Net/Net-XMPP-%{V_net_xmpp}.tar.gz
97 Source22: http://www.cpan.org/modules/by-module/Net/Net-Jabber-%{V_net_jabber}.tar.gz
98 Source23: http://www.cpan.org/modules/by-module/Net/Net-Patricia-%{V_net_patricia}.tar.gz
99 Source24: http://www.cpan.org/modules/by-module/Net/Net-IRC-%{V_net_irc}.tar.gz
100 Source25: http://www.cpan.org/modules/by-module/IP/IP-Country-%{V_ip_country}.tar.gz
101 Source26: http://www.cpan.org/modules/by-module/IO/IO-Socket-Multicast-%{V_io_socket_multicast}.tar.gz
102 Source27: http://www.cpan.org/modules/by-module/Net/Net-GrowlClient-%{V_net_growlclient}.tar.gz
103 Source28: http://www.cpan.org/modules/by-module/Net/Net-DHCP-%{V_net_dhcp}.tar.gz
104 Source29: http://www.cpan.org/modules/by-module/Net/Net-Proxy-%{V_net_proxy}.tar.gz
105 Source30: http://www.cpan.org/modules/by-module/Net/NetxAP-%{V_net_netxap}.tar.gz
106 Patch0: perl-net.patch
108 # build information
109 Prefix: %{l_prefix}
110 BuildRoot: %{l_buildroot}
111 BuildPreReq: OpenPKG, openpkg >= 20040130
112 PreReq: OpenPKG, openpkg >= 20040130
113 BuildPreReq: perl >= %{V_perl}, perl-openpkg >= %{V_perl}-20040126, binutils
114 PreReq: perl >= %{V_perl}
115 BuildPreReq: perl-crypto, perl-sys, perl-time
116 PreReq: perl-crypto, perl-sys, perl-time
117 BuildPreReq: perl-xml, perl-util >= %{V_perl}-20040210
118 PreReq: perl-xml, perl-util >= %{V_perl}-20040210
119 %if "%{with_pcap}" == "yes"
120 BuildPreReq: libpcap
121 PreReq: libpcap
122 %endif
123 AutoReq: no
124 AutoReqProv: no
126 %description
127 Perl modules for use with networks:
128 - Net::Daemon (%{V_net_daemon})
129 - Net::FTP (%{V_libnet})
130 - Net::NNTP
131 - Net::POP3
132 - Net::SMTP
133 - Net::SNPP
134 - Net::Time
135 - Net::FTP::Common (%{V_net_ftp_common})
136 - Net::Gen (%{V_net_ext})
137 - Net::Inet
138 - Net::TCP
139 - Net::TCP::Server
140 - Net::UDP
141 - Net::UNIX
142 - Net::UNIX::Server
143 - Net::Netmask (%{V_net_netmask})
144 - Net::SNMP (%{V_net_snmp})
145 - Net::Server (%{V_net_server})
146 - Net::TFTP (%{V_net_tftp})
147 - Net::Telnet (%{V_net_telnet})
148 - Net::Telnet::Cisco (%{V_net_telnet_cisco})
149 - Net::Radius (%{V_net_radius})
150 - RPC::PlServer, RPC::PlClient (%{V_plrpc})
151 - Net::IP (%{V_net_ip})
152 - Net::IMAP::Simple (%{V_net_imap_simple})
153 - Net::BGP (%{V_net_bgp})
154 %if "%{with_pcap}" == "yes"
155 - Net::Pcap (%{V_net_pcap})
156 - Net::Packet (%{V_net_packet})
157 - Class::Gomor (%{V_class_gomor})
158 %endif
159 - Net::XMPP (%{V_net_xmpp})
160 - Net::Jabber (%{V_net_jabber})
161 - Net::Patricia (%{V_net_patricia})
162 - Net::IPv4Addr (%{V_net_ipv4addr})
163 - Net::IPv6Addr (%{V_net_ipv6addr})
164 - Net::IRC (%{V_net_irc})
165 - IP::Country (%{V_ip_country})
166 - IO::Socket::Multicast (%{V_io_socket_multicast})
167 - Net::GrowlClient (%{V_net_growlclient})
168 - Net::DHCP (%{V_net_dhcp})
169 - Net::Proxy (%{V_net_proxy})
170 - Net::NetxAP (%V_net_netxap})
172 %track
173 prog perl-net:Net-Netmask = {
174 version = %{V_net_netmask}
175 url = http://www.cpan.org/modules/by-module/Net/
176 regex = Net-Netmask-(__VER__)\.tar\.gz
177 }
178 prog perl-net:Net-Ftp-Common = {
179 version = %{V_net_ftp_common}
180 url = http://www.cpan.org/modules/by-module/Net/
181 regex = Net-FTP-Common-(__VER__)\.tar\.gz
182 }
183 prog perl-net:libnet = {
184 version = %{V_libnet}
185 url = http://www.cpan.org/modules/by-module/Net/
186 regex = libnet-(__VER__)\.tar\.gz
187 }
188 prog perl-net:Net-BGP = {
189 version = %{V_net_bgp}
190 url = http://www.cpan.org/modules/by-module/Net/
191 regex = Net-BGP-(__VER__)\.tar\.gz
192 }
193 prog perl-net:Net-Daemon = {
194 version = %{V_net_daemon}
195 url = http://www.cpan.org/modules/by-module/Net/
196 regex = Net-Daemon-(__VER__)\.tar\.gz
197 }
198 prog perl-net:Net-ext = {
199 version = %{V_net_ext}
200 url = http://www.cpan.org/modules/by-module/Net/
201 regex = Net-ext-(__VER__)\.tar\.gz
202 }
203 prog perl-net:Net-Imap-Simple = {
204 version = %{V_net_imap_simple}
205 url = http://www.cpan.org/modules/by-module/Net/
206 regex = Net-IMAP-Simple-(__VER__)\.tar\.gz
207 }
208 prog perl-net:Net-Server = {
209 version = %{V_net_server}
210 url = http://www.cpan.org/modules/by-module/Net/
211 regex = Net-Server-(__VER__)\.tar\.gz
212 }
213 prog perl-net:Net-SNMP = {
214 version = %{V_net_snmp}
215 url = http://www.cpan.org/modules/by-module/Net/
216 regex = Net-SNMP-(__VER__)\.tar\.gz
217 }
218 prog perl-net:Net-Telnet = {
219 version = %{V_net_telnet}
220 url = http://www.cpan.org/modules/by-module/Net/
221 regex = Net-Telnet-(__VER__)\.tar\.gz
222 }
223 prog perl-net:Net-Telnet-Cisco = {
224 version = %{V_net_telnet_cisco}
225 url = http://www.cpan.org/modules/by-module/Net/
226 regex = Net-Telnet-Cisco-(__VER__)\.tar\.gz
227 }
228 prog perl-net:Net-TFTP = {
229 version = %{V_net_tftp}
230 url = http://www.cpan.org/modules/by-module/Net/
231 regex = Net-TFTP-(__VER__)\.tar\.gz
232 }
233 prog perl-net:PlRPC = {
234 version = %{V_plrpc}
235 url = http://www.cpan.org/modules/by-module/RPC/
236 regex = PlRPC-(__VER__)\.tar\.gz
237 }
238 prog perl-net:Net-Pcap = {
239 version = %{V_net_pcap}
240 url = http://www.cpan.org/modules/by-module/Net/
241 regex = Net-Pcap-(__VER__)\.tar\.gz
242 }
243 prog perl-net:Net-Radius = {
244 version = %{V_net_radius}
245 url = http://www.cpan.org/modules/by-module/Net/
246 regex = Net-Radius-(__VER__)\.tar\.gz
247 }
248 prog perl-net:Net-IP = {
249 version = %{V_net_ip}
250 url = http://www.cpan.org/authors/id/M/MA/MANU/
251 regex = Net-IP-(__VER__)\.tar\.gz
252 }
253 prog perl-net:Net-Packet = {
254 version = %{V_net_packet}
255 url = http://www.cpan.org/modules/by-module/Net/
256 regex = Net-Packet-(__VER__)\.tar\.gz
257 }
258 prog perl-net:Class-Gomor = {
259 version = %{V_class_gomor}
260 url = http://www.cpan.org/modules/by-module/Class/
261 regex = Class-Gomor-(__VER__)\.tar\.gz
262 }
263 prog perl-net:Net-XMPP = {
264 version = %{V_net_xmpp}
265 url = http://www.cpan.org/modules/by-module/Net/
266 regex = Net-XMPP-(__VER__)\.tar\.gz
267 }
268 prog perl-net:Net-Jabber = {
269 version = %{V_net_jabber}
270 url = http://www.cpan.org/modules/by-module/Net/
271 regex = Net-Jabber-(__VER__)\.tar\.gz
272 }
273 prog perl-net:Net-Patricia = {
274 version = %{V_net_patricia}
275 url = http://www.cpan.org/modules/by-module/Net/
276 regex = Net-Patricia-(__VER__)\.tar\.gz
277 }
278 prog perl-net:Net-IPv4Addr = {
279 version = %{V_net_ipv4addr}
280 url = http://www.cpan.org/modules/by-module/Net/
281 regex = Net-IPv4Addr-(__VER__)\.tar\.gz
282 }
283 prog perl-net:Net-IPv6Addr = {
284 version = %{V_net_ipv6addr}
285 url = http://www.cpan.org/modules/by-module/Net/
286 regex = Net-IPv6Addr-(__VER__)\.tar\.gz
287 }
288 prog perl-net:Math-Base85 = {
289 version = %{V_math_base85}
290 url = http://www.cpan.org/modules/by-module/Math/
291 regex = Math-Base85-(__VER__)\.tar\.gz
292 }
293 prog perl-net:Net-IRC = {
294 version = %{V_net_irc}
295 url = http://www.cpan.org/modules/by-module/Net/
296 regex = Net-IRC-(__VER__)\.tar\.gz
297 }
298 prog perl-net:IP-Country = {
299 version = %{V_ip_country}
300 url = http://www.cpan.org/modules/by-module/IP/
301 regex = IP-Country-(__VER__)\.tar\.gz
302 }
303 prog perl-net:IO-Socket-Multicast = {
304 version = %{V_io_socket_multicast}
305 url = http://www.cpan.org/modules/by-module/IO/
306 regex = IO-Socket-Multicast-(__VER__)\.tar\.gz
307 }
308 prog perl-net:Net-GrowlClient = {
309 version = %{V_net_growlclient}
310 url = http://www.cpan.org/modules/by-module/Net/
311 regex = Net-GrowlClient-(__VER__)\.tar\.gz
312 }
313 prog perl-net:Net-DHCP = {
314 version = %{V_net_dhcp}
315 url = http://www.cpan.org/modules/by-module/Net/
316 regex = Net-DHCP-(__VER__)\.tar\.gz
317 }
318 prog perl-net:Net-Proxy = {
319 version = %{V_net_proxy}
320 url = http://www.cpan.org/modules/by-module/Net/
321 regex = Net-Proxy-(__VER__)\.tar\.gz
322 }
323 prog perl-net:NetxAP = {
324 version = %{V_net_netxap}
325 url = http://www.cpan.org/modules/by-module/Net/
326 regex = NetxAP-(__VER__)\.tar\.gz
327 }
329 %prep
330 %setup -q -c
331 %setup -q -T -D -a 1
332 %setup -q -T -D -a 2
333 %setup -q -T -D -a 3
334 %setup -q -T -D -a 4
335 %setup -q -T -D -a 5
336 %setup -q -T -D -a 6
337 %setup -q -T -D -a 7
338 %setup -q -T -D -a 8
339 %setup -q -T -D -a 9
340 %setup -q -T -D -a 10
341 %setup -q -T -D -a 11
342 %setup -q -T -D -a 12
343 %setup -q -T -D -a 13
344 %setup -q -T -D -a 14
345 %setup -q -T -D -a 15
346 %setup -q -T -D -a 16
347 %setup -q -T -D -a 17
348 %setup -q -T -D -a 18
349 %setup -q -T -D -a 19
350 %setup -q -T -D -a 20
351 %setup -q -T -D -a 21
352 %setup -q -T -D -a 22
353 %setup -q -T -D -a 23
354 %setup -q -T -D -a 24
355 %setup -q -T -D -a 25
356 %setup -q -T -D -a 26
357 %setup -q -T -D -a 27
358 (
359 %setup -q -T -D -a 28
360 ) || true
361 %setup -q -T -D -a 29
362 %setup -q -T -D -a 30
363 sed <%{PATCH0} -e 's;@l_prefix@;%{l_prefix};g' | %{l_patch} -p0 -b
365 %build
367 %install
368 rm -rf $RPM_BUILD_ROOT
369 %{l_prefix}/bin/perl-openpkg prepare
370 %{l_prefix}/bin/perl-openpkg -d %{SOURCE0} configure build install
371 %{l_prefix}/bin/perl-openpkg -d %{SOURCE1} configure build install
372 %{l_prefix}/bin/perl-openpkg -d %{SOURCE2} configure build install
373 %{l_prefix}/bin/perl-openpkg -d %{SOURCE3} configure build install
374 %{l_prefix}/bin/perl-openpkg -d %{SOURCE4} configure build install
375 %{l_prefix}/bin/perl-openpkg -d %{SOURCE5} configure build install
376 %{l_prefix}/bin/perl-openpkg -d %{SOURCE6} configure build install
377 %{l_prefix}/bin/perl-openpkg -d %{SOURCE7} configure build install
378 %{l_prefix}/bin/perl-openpkg -d %{SOURCE8} configure build install
379 %{l_prefix}/bin/perl-openpkg -d %{SOURCE9} configure build install
380 %{l_prefix}/bin/perl-openpkg -d %{SOURCE10} configure build install
381 %{l_prefix}/bin/perl-openpkg -d %{SOURCE11} configure build install
382 %{l_prefix}/bin/perl-openpkg -d %{SOURCE12} configure build install
383 %{l_prefix}/bin/perl-openpkg -d %{SOURCE13} configure build install
384 %{l_prefix}/bin/perl-openpkg -d %{SOURCE14} configure build install
385 %{l_prefix}/bin/perl-openpkg -d %{SOURCE15} configure build install
386 %{l_prefix}/bin/perl-openpkg -d %{SOURCE16} configure build install
387 %if "%{with_pcap}" == "yes"
388 %{l_prefix}/bin/perl-openpkg -d %{SOURCE17} configure build install
389 %{l_prefix}/bin/perl-openpkg -d %{SOURCE18} configure build install
390 %{l_prefix}/bin/perl-openpkg -d %{SOURCE19} \
391 -A "INC='-I. %{l_cppflags}'" \
392 -A "LIBS='%{l_ldflags} -lpcap'" \
393 configure build install
394 %endif
395 %{l_prefix}/bin/perl-openpkg -d %{SOURCE20} configure build install
396 %{l_prefix}/bin/perl-openpkg -d %{SOURCE21} configure build install
397 %{l_prefix}/bin/perl-openpkg -d %{SOURCE22} configure build install
398 %{l_prefix}/bin/perl-openpkg -d %{SOURCE23} configure build install
399 %{l_prefix}/bin/perl-openpkg -d %{SOURCE24} configure build install
400 %{l_prefix}/bin/perl-openpkg -d %{SOURCE25} configure build install
401 %{l_prefix}/bin/perl-openpkg -d %{SOURCE26} configure build install
402 %{l_prefix}/bin/perl-openpkg -d %{SOURCE27} configure build install
403 %{l_prefix}/bin/perl-openpkg -d %{SOURCE28} configure build install
404 %{l_prefix}/bin/perl-openpkg -d %{SOURCE29} configure build install
405 %{l_prefix}/bin/perl-openpkg -d %{SOURCE30} configure build install
406 %{l_prefix}/bin/perl-openpkg -F perl-openpkg-files fixate cleanup
407 %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} `cat perl-openpkg-files`
409 %files -f files
411 %clean
412 rm -rf $RPM_BUILD_ROOT