perl-net.spec 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388
  1. ##
  2. ## perl-net.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2007 OpenPKG Foundation e.V. <http://openpkg.net/>
  4. ## Copyright (c) 2000-2007 Ralf S. Engelschall <http://engelschall.com/>
  5. ##
  6. ## Permission to use, copy, modify, and distribute this software for
  7. ## any purpose with or without fee is hereby granted, provided that
  8. ## the above copyright notice and this permission notice appear in all
  9. ## copies.
  10. ##
  11. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  12. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  13. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  14. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  15. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  16. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  17. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  18. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  19. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  20. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  21. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  22. ## SUCH DAMAGE.
  23. ##
  24. # versions of individual parts
  25. %define V_perl 5.8.8
  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.39
  30. %define V_net_server 0.96
  31. %define V_net_ext 1.011
  32. %define V_libnet 1.20
  33. %define V_net_netmask 1.9015
  34. %define V_net_ftp_common 6.0
  35. %define V_net_snmp 5.2.0
  36. %define V_net_tftp 0.16
  37. %define V_net_telnet 3.03
  38. %define V_net_telnet_cisco 1.10
  39. %define V_plrpc 0.2018
  40. %define V_curl_easy 1.35
  41. %define V_net_imap_simple 1.14
  42. %define V_net_bgp 0.08
  43. %define V_net_pcap 0.14
  44. %define V_net_radius 1.53
  45. %define V_net_ip 1.25
  46. %define V_class_gomor_hash 0.22
  47. %define V_net_packet 3.25
  48. %define V_net_xmpp 1.02
  49. %define V_net_jabber 2.0
  50. %define V_net_patricia 1.014
  51. %define V_net_irc 0.75
  52. %define V_ip_country 2.23
  53. %define V_io_socket_multicast 1.05
  54. # package information
  55. Name: perl-net
  56. Summary: Perl Modules for use with networks
  57. URL: http://www.cpan.org/
  58. Vendor: Perl Community
  59. Packager: OpenPKG Foundation e.V.
  60. Distribution: OpenPKG Community
  61. Class: BASE
  62. Group: Perl
  63. License: GPL/Artistic
  64. Version: %{V_perl}
  65. Release: 20070401
  66. # package options
  67. %option with_curl no
  68. %option with_pcap no
  69. # list of sources
  70. Source0: http://www.cpan.org/modules/by-module/Math/Math-Base85-%{V_math_base85}.tar.gz
  71. Source1: http://www.cpan.org/modules/by-module/Net/Net-IPv4Addr-%{V_net_ipv4addr}.tar.gz
  72. Source2: http://www.cpan.org/modules/by-module/Net/Net-IPv6Addr-%{V_net_ipv6addr}.tar.gz
  73. Source3: http://www.cpan.org/modules/by-module/Net/Net-Daemon-%{V_net_daemon}.tar.gz
  74. Source4: http://www.cpan.org/modules/by-module/Net/Net-Server-%{V_net_server}.tar.gz
  75. Source5: http://www.cpan.org/modules/by-module/Net/Net-ext-%{V_net_ext}.tar.gz
  76. Source6: http://www.cpan.org/modules/by-module/Net/libnet-%{V_libnet}.tar.gz
  77. Source7: http://www.cpan.org/modules/by-module/Net/Net-Netmask-%{V_net_netmask}.tar.gz
  78. Source8: http://www.cpan.org/modules/by-module/Net/Net-FTP-Common-%{V_net_ftp_common}.tar.gz
  79. Source9: http://www.cpan.org/modules/by-module/Net/Net-SNMP-%{V_net_snmp}.tar.gz
  80. Source10: http://www.cpan.org/modules/by-module/Net/Net-TFTP-%{V_net_tftp}.tar.gz
  81. Source11: http://www.cpan.org/modules/by-module/Net/Net-Telnet-%{V_net_telnet}.tar.gz
  82. Source12: http://www.cpan.org/modules/by-module/Net/Net-Telnet-Cisco-%{V_net_telnet_cisco}.tar.gz
  83. Source13: http://www.cpan.org/modules/by-module/Net/Net-Radius-%{V_net_radius}.tar.gz
  84. Source14: http://www.cpan.org/modules/by-module/RPC/PlRPC-%{V_plrpc}.tar.gz
  85. Source15: http://curl.haxx.se/libcurl/perl/Curl-easy-%{V_curl_easy}.tar.gz
  86. Source16: http://www.cpan.org/modules/by-module/Net/Net-IMAP-Simple-%{V_net_imap_simple}.tar.gz
  87. Source17: http://www.cpan.org/modules/by-module/Net/Net-BGP-%{V_net_bgp}.tar.gz
  88. Source18: http://www.cpan.org/modules/by-module/Net/Net-Pcap-%{V_net_pcap}.tar.gz
  89. Source19: http://www.cpan.org/modules/by-module/Class/Class-Gomor-Hash-%{V_class_gomor_hash}.tar.gz
  90. Source20: http://www.cpan.org/modules/by-module/Net/Net-Packet-%{V_net_packet}.tar.gz
  91. Source21: http://www.cpan.org/modules/by-module/Net/Net-IP-%{V_net_ip}.tar.gz
  92. Source22: http://www.cpan.org/modules/by-module/Net/Net-XMPP-%{V_net_xmpp}.tar.gz
  93. Source23: http://www.cpan.org/modules/by-module/Net/Net-Jabber-%{V_net_jabber}.tar.gz
  94. Source24: http://www.cpan.org/modules/by-module/Net/Net-Patricia-%{V_net_patricia}.tar.gz
  95. Source25: http://www.cpan.org/modules/by-module/Net/Net-IRC-%{V_net_irc}.tar.gz
  96. Source26: http://www.cpan.org/modules/by-module/IP/IP-Country-%{V_ip_country}.tar.gz
  97. Source27: http://www.cpan.org/modules/by-module/IO/IO-Socket-Multicast-%{V_io_socket_multicast}.tar.gz
  98. Patch0: perl-net.patch
  99. # build information
  100. Prefix: %{l_prefix}
  101. BuildRoot: %{l_buildroot}
  102. BuildPreReq: OpenPKG, openpkg >= 20040130, perl >= %{V_perl}, perl-openpkg >= %{V_perl}-20040126
  103. PreReq: OpenPKG, openpkg >= 20040130, perl >= %{V_perl}
  104. BuildPreReq: perl-crypto, perl-sys, perl-time, perl-xml, perl-util >= %{V_perl}-20040210
  105. PreReq: perl-crypto, perl-sys, perl-time, perl-xml, perl-util >= %{V_perl}-20040210
  106. %if "%{with_curl}" == "yes"
  107. BuildPreReq: curl
  108. PreReq: curl
  109. %endif
  110. %if "%{with_pcap}" == "yes"
  111. BuildPreReq: libpcap
  112. PreReq: libpcap
  113. %endif
  114. AutoReq: no
  115. AutoReqProv: no
  116. %description
  117. Perl modules for use with networks:
  118. - Net::Daemon (%{V_net_daemon})
  119. - Net::FTP (%{V_libnet})
  120. - Net::NNTP
  121. - Net::POP3
  122. - Net::SMTP
  123. - Net::SNPP
  124. - Net::Time
  125. - Net::FTP::Common (%{V_net_ftp_common})
  126. - Net::Gen (%{V_net_ext})
  127. - Net::Inet
  128. - Net::TCP
  129. - Net::TCP::Server
  130. - Net::UDP
  131. - Net::UNIX
  132. - Net::UNIX::Server
  133. - Net::Netmask (%{V_net_netmask})
  134. - Net::SNMP (%{V_net_snmp})
  135. - Net::Server (%{V_net_server})
  136. - Net::TFTP (%{V_net_tftp})
  137. - Net::Telnet (%{V_net_telnet})
  138. - Net::Telnet::Cisco (%{V_net_telnet_cisco})
  139. - Net::Radius (%{V_net_radius})
  140. - RPC::PlServer, RPC::PlClient (%{V_plrpc})
  141. - Net::IP (%{V_net_ip})
  142. %if "%{with_curl}" == "yes"
  143. - Curl::easy (%{V_curl_easy})
  144. %endif
  145. - Net::IMAP::Simple (%{V_net_imap_simple})
  146. - Net::BGP (%{V_net_bgp})
  147. %if "%{with_pcap}" == "yes"
  148. - Net::Pcap (%{V_net_pcap})
  149. - Net::Packet (%{V_net_packet})
  150. - Class:Gomor::Hash (%{V_class_gomor_hash})
  151. %endif
  152. - Net::XMPP (%{V_net_xmpp})
  153. - Net::Jabber (%{V_net_jabber})
  154. - Net::Patricia (%{V_net_patricia})
  155. - Net::IPv4Addr (%{V_net_ipv4addr})
  156. - Net::IPv6Addr (%{V_net_ipv6addr})
  157. - Net::IRC (%{V_net_irc})
  158. - IP::Country (%{V_ip_country})
  159. - IO::Socket::Multicast (%{V_io_socket_multicast})
  160. %track
  161. prog perl-net:Curl-easy = {
  162. version = %{V_curl_easy}
  163. url = http://curl.haxx.se/libcurl/perl/
  164. regex = Curl-easy-(__VER__)\.tar\.gz
  165. }
  166. prog perl-net:Net-Netmask = {
  167. version = %{V_net_netmask}
  168. url = http://www.cpan.org/modules/by-module/Net/
  169. regex = Net-Netmask-(__VER__)\.tar\.gz
  170. }
  171. prog perl-net:Net-Ftp-Common = {
  172. version = %{V_net_ftp_common}
  173. url = http://www.cpan.org/modules/by-module/Net/
  174. regex = Net-FTP-Common-(__VER__)\.tar\.gz
  175. }
  176. prog perl-net:libnet = {
  177. version = %{V_libnet}
  178. url = http://www.cpan.org/modules/by-module/Net/
  179. regex = libnet-(__VER__)\.tar\.gz
  180. }
  181. prog perl-net:Net-BGP = {
  182. version = %{V_net_bgp}
  183. url = http://www.cpan.org/modules/by-module/Net/
  184. regex = Net-BGP-(__VER__)\.tar\.gz
  185. }
  186. prog perl-net:Net-Daemon = {
  187. version = %{V_net_daemon}
  188. url = http://www.cpan.org/modules/by-module/Net/
  189. regex = Net-Daemon-(__VER__)\.tar\.gz
  190. }
  191. prog perl-net:Net-ext = {
  192. version = %{V_net_ext}
  193. url = http://www.cpan.org/modules/by-module/Net/
  194. regex = Net-ext-(__VER__)\.tar\.gz
  195. }
  196. prog perl-net:Net-Imap-Simple = {
  197. version = %{V_net_imap_simple}
  198. url = http://www.cpan.org/modules/by-module/Net/
  199. regex = Net-IMAP-Simple-(__VER__)\.tar\.gz
  200. }
  201. prog perl-net:Net-Server = {
  202. version = %{V_net_server}
  203. url = http://www.cpan.org/modules/by-module/Net/
  204. regex = Net-Server-(__VER__)\.tar\.gz
  205. }
  206. prog perl-net:Net-SNMP = {
  207. version = %{V_net_snmp}
  208. url = http://www.cpan.org/modules/by-module/Net/
  209. regex = Net-SNMP-(__VER__)\.tar\.gz
  210. }
  211. prog perl-net:Net-Telnet = {
  212. version = %{V_net_telnet}
  213. url = http://www.cpan.org/modules/by-module/Net/
  214. regex = Net-Telnet-(__VER__)\.tar\.gz
  215. }
  216. prog perl-net:Net-Telnet-Cisco = {
  217. version = %{V_net_telnet_cisco}
  218. url = http://www.cpan.org/modules/by-module/Net/
  219. regex = Net-Telnet-Cisco-(__VER__)\.tar\.gz
  220. }
  221. prog perl-net:Net-TFTP = {
  222. version = %{V_net_tftp}
  223. url = http://www.cpan.org/modules/by-module/Net/
  224. regex = Net-TFTP-(__VER__)\.tar\.gz
  225. }
  226. prog perl-net:PlRPC = {
  227. version = %{V_plrpc}
  228. url = http://www.cpan.org/modules/by-module/RPC/
  229. regex = PlRPC-(__VER__)\.tar\.gz
  230. }
  231. prog perl-net:Net-Pcap = {
  232. version = %{V_net_pcap}
  233. url = http://www.cpan.org/modules/by-module/Net/
  234. regex = Net-Pcap-(__VER__)\.tar\.gz
  235. }
  236. prog perl-net:Net-Radius = {
  237. version = %{V_net_radius}
  238. url = http://www.cpan.org/modules/by-module/Net/
  239. regex = Net-Radius-(__VER__)\.tar\.gz
  240. }
  241. prog perl-net:Net-IP = {
  242. version = %{V_net_ip}
  243. url = http://www.cpan.org/authors/id/M/MA/MANU/
  244. regex = Net-IP-(__VER__)\.tar\.gz
  245. }
  246. prog perl-net:Net-Packet = {
  247. version = %{V_net_packet}
  248. url = http://www.cpan.org/modules/by-module/Net/
  249. regex = Net-Packet-(__VER__)\.tar\.gz
  250. }
  251. prog perl-net:Class-Gomor-Hash = {
  252. version = %{V_class_gomor_hash}
  253. url = http://www.cpan.org/modules/by-module/Class/
  254. regex = Class-Gomor-Hash-(__VER__)\.tar\.gz
  255. }
  256. prog perl-net:Net-XMPP = {
  257. version = %{V_net_xmpp}
  258. url = http://www.cpan.org/modules/by-module/Net/
  259. regex = Net-XMPP-(__VER__)\.tar\.gz
  260. }
  261. prog perl-net:Net-Jabber = {
  262. version = %{V_net_jabber}
  263. url = http://www.cpan.org/modules/by-module/Net/
  264. regex = Net-Jabber-(__VER__)\.tar\.gz
  265. }
  266. prog perl-net:Net-Patricia = {
  267. version = %{V_net_patricia}
  268. url = http://www.cpan.org/modules/by-module/Net/
  269. regex = Net-Patricia-(__VER__)\.tar\.gz
  270. }
  271. prog perl-net:Net-IPv4Addr = {
  272. version = %{V_net_ipv4addr}
  273. url = http://www.cpan.org/modules/by-module/Net/
  274. regex = Net-IPv4Addr-(__VER__)\.tar\.gz
  275. }
  276. prog perl-net:Net-IPv6Addr = {
  277. version = %{V_net_ipv6addr}
  278. url = http://www.cpan.org/modules/by-module/Net/
  279. regex = Net-IPv6Addr-(__VER__)\.tar\.gz
  280. }
  281. prog perl-net:Math-Base85 = {
  282. version = %{V_math_base85}
  283. url = http://www.cpan.org/modules/by-module/Math/
  284. regex = Math-Base85-(__VER__)\.tar\.gz
  285. }
  286. prog perl-net:Net-IRC = {
  287. version = %{V_net_irc}
  288. url = http://www.cpan.org/modules/by-module/Net/
  289. regex = Net-IRC-(__VER__)\.tar\.gz
  290. }
  291. prog perl-net:IP-Country = {
  292. version = %{V_ip_country}
  293. url = http://www.cpan.org/modules/by-module/IP/
  294. regex = IP-Country-(__VER__)\.tar\.gz
  295. }
  296. prog perl-net:IO-Socket-Multicast = {
  297. version = %{V_io_socket_multicast}
  298. url = http://www.cpan.org/modules/by-module/IO/
  299. regex = IO-Socket-Multicast-(__VER__)\.tar\.gz
  300. }
  301. %prep
  302. %setup -q -c
  303. %setup -q -T -D -a 1
  304. %setup -q -T -D -a 2
  305. %setup -q -T -D -a 3
  306. %setup -q -T -D -a 4
  307. %setup -q -T -D -a 5
  308. %setup -q -T -D -a 6
  309. %setup -q -T -D -a 7
  310. %setup -q -T -D -a 8
  311. %setup -q -T -D -a 9
  312. %setup -q -T -D -a 10
  313. %setup -q -T -D -a 11
  314. %setup -q -T -D -a 12
  315. %setup -q -T -D -a 13
  316. %setup -q -T -D -a 14
  317. %setup -q -T -D -a 15
  318. %setup -q -T -D -a 16
  319. %setup -q -T -D -a 17
  320. %setup -q -T -D -a 18
  321. %setup -q -T -D -a 19
  322. %setup -q -T -D -a 20
  323. %setup -q -T -D -a 21
  324. %setup -q -T -D -a 22
  325. %setup -q -T -D -a 23
  326. %setup -q -T -D -a 24
  327. %setup -q -T -D -a 25
  328. %setup -q -T -D -a 26
  329. %setup -q -T -D -a 27
  330. sed <%{PATCH0} -e 's;@l_prefix@;%{l_prefix};g' | %{l_patch} -p0 -b
  331. %build
  332. %install
  333. rm -rf $RPM_BUILD_ROOT
  334. %{l_prefix}/bin/perl-openpkg prepare
  335. %{l_prefix}/bin/perl-openpkg -d %{SOURCE0} configure build install
  336. %{l_prefix}/bin/perl-openpkg -d %{SOURCE1} configure build install
  337. %{l_prefix}/bin/perl-openpkg -d %{SOURCE2} configure build install
  338. %{l_prefix}/bin/perl-openpkg -d %{SOURCE3} configure build install
  339. %{l_prefix}/bin/perl-openpkg -d %{SOURCE4} configure build install
  340. %{l_prefix}/bin/perl-openpkg -d %{SOURCE5} configure build install
  341. %{l_prefix}/bin/perl-openpkg -d %{SOURCE6} configure build install
  342. %{l_prefix}/bin/perl-openpkg -d %{SOURCE7} configure build install
  343. %{l_prefix}/bin/perl-openpkg -d %{SOURCE8} configure build install
  344. %{l_prefix}/bin/perl-openpkg -d %{SOURCE9} configure build install
  345. %{l_prefix}/bin/perl-openpkg -d %{SOURCE10} configure build install
  346. %{l_prefix}/bin/perl-openpkg -d %{SOURCE11} configure build install
  347. %{l_prefix}/bin/perl-openpkg -d %{SOURCE12} configure build install
  348. %{l_prefix}/bin/perl-openpkg -d %{SOURCE13} configure build install
  349. %{l_prefix}/bin/perl-openpkg -d %{SOURCE14} configure build install
  350. %if "%{with_curl}" == "yes"
  351. %{l_prefix}/bin/perl-openpkg -d %{SOURCE15} configure build install
  352. %endif
  353. %{l_prefix}/bin/perl-openpkg -d %{SOURCE16} configure build install
  354. %{l_prefix}/bin/perl-openpkg -d %{SOURCE17} configure build install
  355. %if "%{with_pcap}" == "yes"
  356. %{l_prefix}/bin/perl-openpkg -d %{SOURCE18} configure build install
  357. %{l_prefix}/bin/perl-openpkg -d %{SOURCE19} configure build install
  358. %{l_prefix}/bin/perl-openpkg -d %{SOURCE20} \
  359. -A "INC='-I. %{l_cppflags}'" \
  360. -A "LIBS='%{l_ldflags} -lpcap'" \
  361. configure build install
  362. %endif
  363. %{l_prefix}/bin/perl-openpkg -d %{SOURCE21} configure build install
  364. %{l_prefix}/bin/perl-openpkg -d %{SOURCE22} configure build install
  365. %{l_prefix}/bin/perl-openpkg -d %{SOURCE23} configure build install
  366. %{l_prefix}/bin/perl-openpkg -d %{SOURCE24} configure build install
  367. %{l_prefix}/bin/perl-openpkg -d %{SOURCE25} configure build install
  368. %{l_prefix}/bin/perl-openpkg -d %{SOURCE26} configure build install
  369. %{l_prefix}/bin/perl-openpkg -d %{SOURCE27} configure build install
  370. %{l_prefix}/bin/perl-openpkg -F perl-openpkg-files fixate cleanup
  371. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} `cat perl-openpkg-files`
  372. %files -f files
  373. %clean
  374. rm -rf $RPM_BUILD_ROOT