perl-net.spec 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255
  1. ##
  2. ## perl-net.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2004 The OpenPKG Project <http://www.openpkg.org/>
  4. ## Copyright (c) 2000-2004 Ralf S. Engelschall <rse@engelschall.com>
  5. ## Copyright (c) 2000-2004 Cable & Wireless <http://www.cw.com/>
  6. ##
  7. ## Permission to use, copy, modify, and distribute this software for
  8. ## any purpose with or without fee is hereby granted, provided that
  9. ## the above copyright notice and this permission notice appear in all
  10. ## copies.
  11. ##
  12. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  13. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  14. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  15. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  16. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  17. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  18. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  19. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  20. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  21. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  22. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  23. ## SUCH DAMAGE.
  24. ##
  25. # versions of individual parts
  26. %define V_perl 5.8.3
  27. %define V_net_daemon 0.38
  28. %define V_net_server 0.87
  29. %define V_net_ext 1.011
  30. %define V_libnet 1.17
  31. %define V_net_netmask 1.9002
  32. %define V_net_ftp_common 2.9
  33. %define V_net_snmp 4.1.2
  34. %define V_net_tftp 0.16
  35. %define V_net_telnet 3.03
  36. %define V_net_telnet_cisco 1.10
  37. %define V_plrpc 0.2017
  38. %define V_curl_easy 1.35
  39. %define V_net_imap_simple 0.93
  40. %define V_net_bgp 0.07
  41. %define V_net_pcap 0.05
  42. %define V_net_radius 1.44
  43. # package information
  44. Name: perl-net
  45. Summary: Perl Modules for use with networks
  46. URL: http://www.cpan.org/
  47. Vendor: Perl Community
  48. Packager: The OpenPKG Project
  49. Distribution: OpenPKG
  50. Class: BASE
  51. Group: Language
  52. License: GPL/Artistic
  53. Version: %{V_perl}
  54. Release: 20040311
  55. # package options
  56. %option with_curl no
  57. %option with_pcap no
  58. # list of sources
  59. Source0: http://www.cpan.org/modules/by-module/Net/Net-Daemon-%{V_net_daemon}.tar.gz
  60. Source1: http://www.cpan.org/modules/by-module/Net/Net-Server-%{V_net_server}.tar.gz
  61. Source2: http://www.cpan.org/modules/by-module/Net/Net-ext-%{V_net_ext}.tar.gz
  62. Source3: http://www.cpan.org/modules/by-module/Net/libnet-%{V_libnet}.tar.gz
  63. Source4: http://www.cpan.org/modules/by-module/Net/Net-Netmask-%{V_net_netmask}.tar.gz
  64. Source5: http://www.cpan.org/modules/by-module/Net/Net-FTP-Common-%{V_net_ftp_common}.tar.gz
  65. Source6: http://www.cpan.org/modules/by-module/Net/Net-SNMP-%{V_net_snmp}.tar.gz
  66. Source7: http://www.cpan.org/modules/by-module/Net/Net-TFTP-%{V_net_tftp}.tar.gz
  67. Source8: http://www.cpan.org/modules/by-module/Net/Net-Telnet-%{V_net_telnet}.tar.gz
  68. Source9: http://www.cpan.org/modules/by-module/Net/Net-Telnet-Cisco-%{V_net_telnet_cisco}.tar.gz
  69. Source10: http://www.cpan.org/modules/by-module/Net/Net-Radius-%{V_net_radius}.tar.gz
  70. Source11: http://www.cpan.org/modules/by-module/RPC/PlRPC-%{V_plrpc}.tar.gz
  71. Source12: http://curl.haxx.se/libcurl/perl/Curl-easy-%{V_curl_easy}.tar.gz
  72. Source13: http://www.cpan.org/modules/by-module/Net/Net-IMAP-Simple-%{V_net_imap_simple}.tar.gz
  73. Source14: http://www.cpan.org/modules/by-module/Net/Net-BGP-%{V_net_bgp}.tar.gz
  74. Source15: http://www.cpan.org/authors/id/K/KC/KCARNUT/Net-Pcap-%{V_net_pcap}.tar.gz
  75. Patch0: perl-net.patch
  76. # build information
  77. Prefix: %{l_prefix}
  78. BuildRoot: %{l_buildroot}
  79. BuildPreReq: OpenPKG, openpkg >= 20040130, perl >= %{V_perl}, perl-openpkg >= %{V_perl}-20040126, perl-crypto
  80. PreReq: OpenPKG, openpkg >= 20040130, perl >= %{V_perl}, perl-openpkg >= %{V_perl}-20040126, perl-crypto
  81. %if "%{with_curl}" == "yes"
  82. BuildPreReq: curl
  83. PreReq: curl
  84. %endif
  85. %if "%{with_pcap}" == "yes"
  86. BuildPreReq: libpcap
  87. PreReq: libpcap
  88. %endif
  89. AutoReq: no
  90. AutoReqProv: no
  91. %description
  92. Perl modules for use with networks:
  93. - Net::Daemon (%{V_net_daemon})
  94. - Net::FTP (%{V_libnet})
  95. - Net::FTP::Common (%{V_net_ftp_common})
  96. - Net::Gen (%{V_net_ext})
  97. - Net::Inet (%{V_net_ext})
  98. - Net::NNTP (%{V_libnet})
  99. - Net::Netmask (%{V_net_netmask})
  100. - Net::POP3 (%{V_libnet})
  101. - Net::SMTP (%{V_libnet})
  102. - Net::SNMP (%{V_net_snmp})
  103. - Net::SNPP (%{V_libnet})
  104. - Net::Server (%{V_net_server})
  105. - Net::TCP (%{V_net_ext})
  106. - Net::TCP::Server (%{V_net_ext})
  107. - Net::TFTP (%{V_net_tftp})
  108. - Net::Telnet (%{V_net_telnet})
  109. - Net::Telnet::Cisco (%{V_net_telnet_cisco})
  110. - Net::Time (%{V_libnet})
  111. - Net::Time (%{V_libnet})
  112. - Net::UDP (%{V_net_ext})
  113. - Net::UNIX (%{V_net_ext})
  114. - Net::UNIX::Server (%{V_net_ext})
  115. - Net::Radius (%{V_net_radius})
  116. - RPC::PlServer, RPC::PlClient (%{V_plrpc})
  117. %if "%{with_curl}" == "yes"
  118. - Curl::easy (%{V_curl_easy})
  119. %endif
  120. - Net::IMAP::Simple (%{V_net_imap_simple})
  121. - Net::BGP (%{V_net_bgp})
  122. %if "%{with_pcap}" == "yes"
  123. - Net::Pcap (%{V_net_pcap})
  124. %endif
  125. %track
  126. prog perl-net:Curl-easy = {
  127. version = %{V_curl_easy}
  128. url = http://curl.haxx.se/libcurl/perl/
  129. regex = Curl-easy-(__VER__)\.tar\.gz
  130. }
  131. prog perl-net:libnet = {
  132. version = %{V_libnet}
  133. url = http://www.cpan.org/modules/by-module/Net/
  134. regex = libnet-(__VER__)\.tar\.gz
  135. }
  136. prog perl-net:Net-BGP = {
  137. version = %{V_net_bgp}
  138. url = http://www.cpan.org/modules/by-module/Net/
  139. regex = Net-BGP-(__VER__)\.tar\.gz
  140. }
  141. prog perl-net:Net-Daemon = {
  142. version = %{V_net_daemon}
  143. url = http://www.cpan.org/modules/by-module/Net/
  144. regex = Net-Daemon-(__VER__)\.tar\.gz
  145. }
  146. prog perl-net:Net-ext = {
  147. version = %{V_net_ext}
  148. url = http://www.cpan.org/modules/by-module/Net/
  149. regex = Net-ext-(__VER__)\.tar\.gz
  150. }
  151. prog perl-net:Net-Imap-Simple = {
  152. version = %{V_net_imap_simple}
  153. url = http://www.cpan.org/modules/by-module/Net/
  154. regex = Net-IMAP-Simple-(__VER__)\.tar\.gz
  155. }
  156. prog perl-net:Net-Server = {
  157. version = %{V_net_server}
  158. url = http://www.cpan.org/modules/by-module/Net/
  159. regex = Net-Server-(__VER__)\.tar\.gz
  160. }
  161. prog perl-net:Net-SNMP = {
  162. version = %{V_net_snmp}
  163. url = http://www.cpan.org/modules/by-module/Net/
  164. regex = Net-SNMP-(__VER__)\.tar\.gz
  165. }
  166. prog perl-net:Net-Telnet = {
  167. version = %{V_net_telnet}
  168. url = http://www.cpan.org/modules/by-module/Net/
  169. regex = Net-Telnet-(__VER__)\.tar\.gz
  170. }
  171. prog perl-net:Net-Telnet-Cisco = {
  172. version = %{V_net_telnet_cisco}
  173. url = http://www.cpan.org/modules/by-module/Net/
  174. regex = Net-Telnet-Cisco-(__VER__)\.tar\.gz
  175. }
  176. prog perl-net:Net-TFTP = {
  177. version = %{V_net_tftp}
  178. url = http://www.cpan.org/modules/by-module/Net/
  179. regex = Net-TFTP-(__VER__)\.tar\.gz
  180. }
  181. prog perl-net:PlRPC = {
  182. version = %{V_plrpc}
  183. url = http://www.cpan.org/modules/by-module/RPC/
  184. regex = PlRPC-(__VER__)\.tar\.gz
  185. }
  186. prog perl-net:Net-Pcap = {
  187. version = %{V_net_pcap}
  188. url = http://www.cpan.org/authors/id/K/KC/KCARNUT/
  189. regex = Net-Pcap-(__VER__)\.tar\.gz
  190. }
  191. prog perl-net:Net-Radius = {
  192. version = %{V_net_radius}
  193. url = http://www.cpan.org/modules/by-module/Net/
  194. regex = Net-Radius-(__VER__)\.tar\.gz
  195. }
  196. %prep
  197. %setup -q -c
  198. %setup -q -T -D -a 1
  199. %setup -q -T -D -a 2
  200. %setup -q -T -D -a 3
  201. %setup -q -T -D -a 4
  202. %setup -q -T -D -a 5
  203. %setup -q -T -D -a 6
  204. %setup -q -T -D -a 7
  205. %setup -q -T -D -a 8
  206. %setup -q -T -D -a 9
  207. %setup -q -T -D -a 10
  208. %setup -q -T -D -a 11
  209. %setup -q -T -D -a 12
  210. %setup -q -T -D -a 13
  211. %setup -q -T -D -a 14
  212. %setup -q -T -D -a 15
  213. sed <%{PATCH0} -e 's;@l_prefix@;%{l_prefix};g' | %{l_patch} -p0 -b
  214. %build
  215. %install
  216. %{l_prefix}/bin/perl-openpkg prepare
  217. %{l_prefix}/bin/perl-openpkg -d %{SOURCE0} configure build install
  218. %{l_prefix}/bin/perl-openpkg -d %{SOURCE1} configure build install
  219. %{l_prefix}/bin/perl-openpkg -d %{SOURCE2} configure build install
  220. %{l_prefix}/bin/perl-openpkg -d %{SOURCE3} configure build install
  221. %{l_prefix}/bin/perl-openpkg -d %{SOURCE4} configure build install
  222. %{l_prefix}/bin/perl-openpkg -d %{SOURCE5} configure build install
  223. %{l_prefix}/bin/perl-openpkg -d %{SOURCE6} configure build install
  224. %{l_prefix}/bin/perl-openpkg -d %{SOURCE7} configure build install
  225. %{l_prefix}/bin/perl-openpkg -d %{SOURCE8} configure build install
  226. %{l_prefix}/bin/perl-openpkg -d %{SOURCE9} configure build install
  227. %{l_prefix}/bin/perl-openpkg -d %{SOURCE10} configure build install
  228. %{l_prefix}/bin/perl-openpkg -d %{SOURCE11} configure build install
  229. %if "%{with_curl}" == "yes"
  230. %{l_prefix}/bin/perl-openpkg -d %{SOURCE12} configure build install
  231. %endif
  232. %{l_prefix}/bin/perl-openpkg -d %{SOURCE13} configure build install
  233. %{l_prefix}/bin/perl-openpkg -d %{SOURCE14} configure build install
  234. %if "%{with_pcap}" == "yes"
  235. %{l_prefix}/bin/perl-openpkg -d %{SOURCE15} configure build install
  236. %endif
  237. %{l_prefix}/bin/perl-openpkg -F perl-openpkg-files fixate cleanup
  238. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} `cat perl-openpkg-files`
  239. %files -f files
  240. %clean
  241. rm -rf $RPM_BUILD_ROOT