perl-net.spec 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378
  1. ##
  2. ## perl-net.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2006 OpenPKG Foundation e.V. <http://openpkg.net/>
  4. ## Copyright (c) 2000-2006 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.94
  31. %define V_net_ext 1.011
  32. %define V_libnet 1.19
  33. %define V_net_netmask 1.9015
  34. %define V_net_ftp_common 5.32
  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.51
  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.0
  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.22
  53. # package information
  54. Name: perl-net
  55. Summary: Perl Modules for use with networks
  56. URL: http://www.cpan.org/
  57. Vendor: Perl Community
  58. Packager: OpenPKG Foundation e.V.
  59. Distribution: OpenPKG Community
  60. Class: BASE
  61. Group: Perl
  62. License: GPL/Artistic
  63. Version: %{V_perl}
  64. Release: 20061228
  65. # package options
  66. %option with_curl no
  67. %option with_pcap no
  68. # list of sources
  69. Source0: http://www.cpan.org/modules/by-module/Math/Math-Base85-%{V_math_base85}.tar.gz
  70. Source1: http://www.cpan.org/modules/by-module/Net/Net-IPv4Addr-%{V_net_ipv4addr}.tar.gz
  71. Source2: http://www.cpan.org/modules/by-module/Net/Net-IPv6Addr-%{V_net_ipv6addr}.tar.gz
  72. Source3: http://www.cpan.org/modules/by-module/Net/Net-Daemon-%{V_net_daemon}.tar.gz
  73. Source4: http://www.cpan.org/modules/by-module/Net/Net-Server-%{V_net_server}.tar.gz
  74. Source5: http://www.cpan.org/modules/by-module/Net/Net-ext-%{V_net_ext}.tar.gz
  75. Source6: http://www.cpan.org/modules/by-module/Net/libnet-%{V_libnet}.tar.gz
  76. Source7: http://www.cpan.org/modules/by-module/Net/Net-Netmask-%{V_net_netmask}.tar.gz
  77. Source8: http://www.cpan.org/modules/by-module/Net/Net-FTP-Common-%{V_net_ftp_common}.tar.gz
  78. Source9: http://www.cpan.org/modules/by-module/Net/Net-SNMP-%{V_net_snmp}.tar.gz
  79. Source10: http://www.cpan.org/modules/by-module/Net/Net-TFTP-%{V_net_tftp}.tar.gz
  80. Source11: http://www.cpan.org/modules/by-module/Net/Net-Telnet-%{V_net_telnet}.tar.gz
  81. Source12: http://www.cpan.org/modules/by-module/Net/Net-Telnet-Cisco-%{V_net_telnet_cisco}.tar.gz
  82. Source13: http://www.cpan.org/modules/by-module/Net/Net-Radius-%{V_net_radius}.tar.gz
  83. Source14: http://www.cpan.org/modules/by-module/RPC/PlRPC-%{V_plrpc}.tar.gz
  84. Source15: http://curl.haxx.se/libcurl/perl/Curl-easy-%{V_curl_easy}.tar.gz
  85. Source16: http://www.cpan.org/modules/by-module/Net/Net-IMAP-Simple-%{V_net_imap_simple}.tar.gz
  86. Source17: http://www.cpan.org/modules/by-module/Net/Net-BGP-%{V_net_bgp}.tar.gz
  87. Source18: http://www.cpan.org/modules/by-module/Net/Net-Pcap-%{V_net_pcap}.tar.gz
  88. Source19: http://www.cpan.org/modules/by-module/Class/Class-Gomor-Hash-%{V_class_gomor_hash}.tar.gz
  89. Source20: http://www.cpan.org/modules/by-module/Net/Net-Packet-%{V_net_packet}.tar.gz
  90. Source21: http://www.cpan.org/modules/by-module/Net/Net-IP-%{V_net_ip}.tar.gz
  91. Source22: http://www.cpan.org/modules/by-module/Net/Net-XMPP-%{V_net_xmpp}.tar.gz
  92. Source23: http://www.cpan.org/modules/by-module/Net/Net-Jabber-%{V_net_jabber}.tar.gz
  93. Source24: http://www.cpan.org/modules/by-module/Net/Net-Patricia-%{V_net_patricia}.tar.gz
  94. Source25: http://www.cpan.org/modules/by-module/Net/Net-IRC-%{V_net_irc}.tar.gz
  95. Source26: http://www.cpan.org/modules/by-module/IP/IP-Country-%{V_ip_country}.tar.gz
  96. Patch0: perl-net.patch
  97. # build information
  98. Prefix: %{l_prefix}
  99. BuildRoot: %{l_buildroot}
  100. BuildPreReq: OpenPKG, openpkg >= 20040130, perl >= %{V_perl}, perl-openpkg >= %{V_perl}-20040126
  101. PreReq: OpenPKG, openpkg >= 20040130, perl >= %{V_perl}
  102. BuildPreReq: perl-crypto, perl-sys, perl-time, perl-xml, perl-util >= %{V_perl}-20040210
  103. PreReq: perl-crypto, perl-sys, perl-time, perl-xml, perl-util >= %{V_perl}-20040210
  104. %if "%{with_curl}" == "yes"
  105. BuildPreReq: curl
  106. PreReq: curl
  107. %endif
  108. %if "%{with_pcap}" == "yes"
  109. BuildPreReq: libpcap
  110. PreReq: libpcap
  111. %endif
  112. AutoReq: no
  113. AutoReqProv: no
  114. %description
  115. Perl modules for use with networks:
  116. - Net::Daemon (%{V_net_daemon})
  117. - Net::FTP (%{V_libnet})
  118. - Net::NNTP
  119. - Net::POP3
  120. - Net::SMTP
  121. - Net::SNPP
  122. - Net::Time
  123. - Net::FTP::Common (%{V_net_ftp_common})
  124. - Net::Gen (%{V_net_ext})
  125. - Net::Inet
  126. - Net::TCP
  127. - Net::TCP::Server
  128. - Net::UDP
  129. - Net::UNIX
  130. - Net::UNIX::Server
  131. - Net::Netmask (%{V_net_netmask})
  132. - Net::SNMP (%{V_net_snmp})
  133. - Net::Server (%{V_net_server})
  134. - Net::TFTP (%{V_net_tftp})
  135. - Net::Telnet (%{V_net_telnet})
  136. - Net::Telnet::Cisco (%{V_net_telnet_cisco})
  137. - Net::Radius (%{V_net_radius})
  138. - RPC::PlServer, RPC::PlClient (%{V_plrpc})
  139. - Net::IP (%{V_net_ip})
  140. %if "%{with_curl}" == "yes"
  141. - Curl::easy (%{V_curl_easy})
  142. %endif
  143. - Net::IMAP::Simple (%{V_net_imap_simple})
  144. - Net::BGP (%{V_net_bgp})
  145. %if "%{with_pcap}" == "yes"
  146. - Net::Pcap (%{V_net_pcap})
  147. - Net::Packet (%{V_net_packet})
  148. - Class:Gomor::Hash (%{V_class_gomor_hash})
  149. %endif
  150. - Net::XMPP (%{V_net_xmpp})
  151. - Net::Jabber (%{V_net_jabber})
  152. - Net::Patricia (%{V_net_patricia})
  153. - Net::IPv4Addr (%{V_net_ipv4addr})
  154. - Net::IPv6Addr (%{V_net_ipv6addr})
  155. - Net::IRC (%{V_net_irc})
  156. - IP::Country (%{V_ip_country})
  157. %track
  158. prog perl-net:Curl-easy = {
  159. version = %{V_curl_easy}
  160. url = http://curl.haxx.se/libcurl/perl/
  161. regex = Curl-easy-(__VER__)\.tar\.gz
  162. }
  163. prog perl-net:Net-Netmask = {
  164. version = %{V_net_netmask}
  165. url = http://www.cpan.org/modules/by-module/Net/
  166. regex = Net-Netmask-(__VER__)\.tar\.gz
  167. }
  168. prog perl-net:Net-Ftp-Common = {
  169. version = %{V_net_ftp_common}
  170. url = http://www.cpan.org/modules/by-module/Net/
  171. regex = Net-FTP-Common-(__VER__)\.tar\.gz
  172. }
  173. prog perl-net:libnet = {
  174. version = %{V_libnet}
  175. url = http://www.cpan.org/modules/by-module/Net/
  176. regex = libnet-(__VER__)\.tar\.gz
  177. }
  178. prog perl-net:Net-BGP = {
  179. version = %{V_net_bgp}
  180. url = http://www.cpan.org/modules/by-module/Net/
  181. regex = Net-BGP-(__VER__)\.tar\.gz
  182. }
  183. prog perl-net:Net-Daemon = {
  184. version = %{V_net_daemon}
  185. url = http://www.cpan.org/modules/by-module/Net/
  186. regex = Net-Daemon-(__VER__)\.tar\.gz
  187. }
  188. prog perl-net:Net-ext = {
  189. version = %{V_net_ext}
  190. url = http://www.cpan.org/modules/by-module/Net/
  191. regex = Net-ext-(__VER__)\.tar\.gz
  192. }
  193. prog perl-net:Net-Imap-Simple = {
  194. version = %{V_net_imap_simple}
  195. url = http://www.cpan.org/modules/by-module/Net/
  196. regex = Net-IMAP-Simple-(__VER__)\.tar\.gz
  197. }
  198. prog perl-net:Net-Server = {
  199. version = %{V_net_server}
  200. url = http://www.cpan.org/modules/by-module/Net/
  201. regex = Net-Server-(__VER__)\.tar\.gz
  202. }
  203. prog perl-net:Net-SNMP = {
  204. version = %{V_net_snmp}
  205. url = http://www.cpan.org/modules/by-module/Net/
  206. regex = Net-SNMP-(__VER__)\.tar\.gz
  207. }
  208. prog perl-net:Net-Telnet = {
  209. version = %{V_net_telnet}
  210. url = http://www.cpan.org/modules/by-module/Net/
  211. regex = Net-Telnet-(__VER__)\.tar\.gz
  212. }
  213. prog perl-net:Net-Telnet-Cisco = {
  214. version = %{V_net_telnet_cisco}
  215. url = http://www.cpan.org/modules/by-module/Net/
  216. regex = Net-Telnet-Cisco-(__VER__)\.tar\.gz
  217. }
  218. prog perl-net:Net-TFTP = {
  219. version = %{V_net_tftp}
  220. url = http://www.cpan.org/modules/by-module/Net/
  221. regex = Net-TFTP-(__VER__)\.tar\.gz
  222. }
  223. prog perl-net:PlRPC = {
  224. version = %{V_plrpc}
  225. url = http://www.cpan.org/modules/by-module/RPC/
  226. regex = PlRPC-(__VER__)\.tar\.gz
  227. }
  228. prog perl-net:Net-Pcap = {
  229. version = %{V_net_pcap}
  230. url = http://www.cpan.org/modules/by-module/Net/
  231. regex = Net-Pcap-(__VER__)\.tar\.gz
  232. }
  233. prog perl-net:Net-Radius = {
  234. version = %{V_net_radius}
  235. url = http://www.cpan.org/modules/by-module/Net/
  236. regex = Net-Radius-(__VER__)\.tar\.gz
  237. }
  238. prog perl-net:Net-IP = {
  239. version = %{V_net_ip}
  240. url = http://www.cpan.org/authors/id/M/MA/MANU/
  241. regex = Net-IP-(__VER__)\.tar\.gz
  242. }
  243. prog perl-net:Net-Packet = {
  244. version = %{V_net_packet}
  245. url = http://www.cpan.org/modules/by-module/Net/
  246. regex = Net-Packet-(__VER__)\.tar\.gz
  247. }
  248. prog perl-net:Class-Gomor-Hash = {
  249. version = %{V_class_gomor_hash}
  250. url = http://www.cpan.org/modules/by-module/Class/
  251. regex = Class-Gomor-Hash-(__VER__)\.tar\.gz
  252. }
  253. prog perl-net:Net-XMPP = {
  254. version = %{V_net_xmpp}
  255. url = http://www.cpan.org/modules/by-module/Net/
  256. regex = Net-XMPP-(__VER__)\.tar\.gz
  257. }
  258. prog perl-net:Net-Jabber = {
  259. version = %{V_net_jabber}
  260. url = http://www.cpan.org/modules/by-module/Net/
  261. regex = Net-Jabber-(__VER__)\.tar\.gz
  262. }
  263. prog perl-net:Net-Patricia = {
  264. version = %{V_net_patricia}
  265. url = http://www.cpan.org/modules/by-module/Net/
  266. regex = Net-Patricia-(__VER__)\.tar\.gz
  267. }
  268. prog perl-net:Net-IPv4Addr = {
  269. version = %{V_net_ipv4addr}
  270. url = http://www.cpan.org/modules/by-module/Net/
  271. regex = Net-IPv4Addr-(__VER__)\.tar\.gz
  272. }
  273. prog perl-net:Net-IPv6Addr = {
  274. version = %{V_net_ipv6addr}
  275. url = http://www.cpan.org/modules/by-module/Net/
  276. regex = Net-IPv6Addr-(__VER__)\.tar\.gz
  277. }
  278. prog perl-net:Math-Base85 = {
  279. version = %{V_math_base85}
  280. url = http://www.cpan.org/modules/by-module/Math/
  281. regex = Math-Base85-(__VER__)\.tar\.gz
  282. }
  283. prog perl-net:Net-IRC = {
  284. version = %{V_net_irc}
  285. url = http://www.cpan.org/modules/by-module/Net/
  286. regex = Net-IRC-(__VER__)\.tar\.gz
  287. }
  288. prog perl-net:IP-Country = {
  289. version = %{V_ip_country}
  290. url = http://www.cpan.org/modules/by-module/IP/
  291. regex = IP-Country-(__VER__)\.tar\.gz
  292. }
  293. %prep
  294. %setup -q -c
  295. %setup -q -T -D -a 1
  296. %setup -q -T -D -a 2
  297. %setup -q -T -D -a 3
  298. %setup -q -T -D -a 4
  299. %setup -q -T -D -a 5
  300. %setup -q -T -D -a 6
  301. %setup -q -T -D -a 7
  302. %setup -q -T -D -a 8
  303. %setup -q -T -D -a 9
  304. %setup -q -T -D -a 10
  305. %setup -q -T -D -a 11
  306. %setup -q -T -D -a 12
  307. %setup -q -T -D -a 13
  308. %setup -q -T -D -a 14
  309. %setup -q -T -D -a 15
  310. %setup -q -T -D -a 16
  311. %setup -q -T -D -a 17
  312. %setup -q -T -D -a 18
  313. %setup -q -T -D -a 19
  314. %setup -q -T -D -a 20
  315. %setup -q -T -D -a 21
  316. %setup -q -T -D -a 22
  317. %setup -q -T -D -a 23
  318. %setup -q -T -D -a 24
  319. %setup -q -T -D -a 25
  320. %setup -q -T -D -a 26
  321. sed <%{PATCH0} -e 's;@l_prefix@;%{l_prefix};g' | %{l_patch} -p0 -b
  322. %build
  323. %install
  324. rm -rf $RPM_BUILD_ROOT
  325. %{l_prefix}/bin/perl-openpkg prepare
  326. %{l_prefix}/bin/perl-openpkg -d %{SOURCE0} configure build install
  327. %{l_prefix}/bin/perl-openpkg -d %{SOURCE1} configure build install
  328. %{l_prefix}/bin/perl-openpkg -d %{SOURCE2} configure build install
  329. %{l_prefix}/bin/perl-openpkg -d %{SOURCE3} configure build install
  330. %{l_prefix}/bin/perl-openpkg -d %{SOURCE4} configure build install
  331. %{l_prefix}/bin/perl-openpkg -d %{SOURCE5} configure build install
  332. %{l_prefix}/bin/perl-openpkg -d %{SOURCE6} configure build install
  333. %{l_prefix}/bin/perl-openpkg -d %{SOURCE7} configure build install
  334. %{l_prefix}/bin/perl-openpkg -d %{SOURCE8} configure build install
  335. %{l_prefix}/bin/perl-openpkg -d %{SOURCE9} configure build install
  336. %{l_prefix}/bin/perl-openpkg -d %{SOURCE10} configure build install
  337. %{l_prefix}/bin/perl-openpkg -d %{SOURCE11} configure build install
  338. %{l_prefix}/bin/perl-openpkg -d %{SOURCE12} configure build install
  339. %{l_prefix}/bin/perl-openpkg -d %{SOURCE13} configure build install
  340. %{l_prefix}/bin/perl-openpkg -d %{SOURCE14} configure build install
  341. %if "%{with_curl}" == "yes"
  342. %{l_prefix}/bin/perl-openpkg -d %{SOURCE15} configure build install
  343. %endif
  344. %{l_prefix}/bin/perl-openpkg -d %{SOURCE16} configure build install
  345. %{l_prefix}/bin/perl-openpkg -d %{SOURCE17} configure build install
  346. %if "%{with_pcap}" == "yes"
  347. %{l_prefix}/bin/perl-openpkg -d %{SOURCE18} configure build install
  348. %{l_prefix}/bin/perl-openpkg -d %{SOURCE19} configure build install
  349. %{l_prefix}/bin/perl-openpkg -d %{SOURCE20} \
  350. -A "INC='-I. %{l_cppflags}'" \
  351. -A "LIBS='%{l_ldflags} -lpcap'" \
  352. configure build install
  353. %endif
  354. %{l_prefix}/bin/perl-openpkg -d %{SOURCE21} configure build install
  355. %{l_prefix}/bin/perl-openpkg -d %{SOURCE22} configure build install
  356. %{l_prefix}/bin/perl-openpkg -d %{SOURCE23} configure build install
  357. %{l_prefix}/bin/perl-openpkg -d %{SOURCE24} configure build install
  358. %{l_prefix}/bin/perl-openpkg -d %{SOURCE25} configure build install
  359. %{l_prefix}/bin/perl-openpkg -d %{SOURCE26} configure build install
  360. %{l_prefix}/bin/perl-openpkg -F perl-openpkg-files fixate cleanup
  361. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} `cat perl-openpkg-files`
  362. %files -f files
  363. %clean
  364. rm -rf $RPM_BUILD_ROOT