]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # Conditional build: | |
3 | %bcond_with tests # perform "make test" (uses network) | |
4 | # | |
5 | %define pdir WWW | |
6 | %define pnam libwww-perl | |
7 | Summary: libwww-perl - a simple and consistent API to the World-Wide Web | |
8 | Summary(pl.UTF-8): libwww-perl - prosty i logiczny API do WWW | |
9 | Name: perl-libwww | |
10 | Version: 6.47 | |
11 | Release: 1 | |
12 | # same as perl | |
13 | License: GPL v1+ or Artistic | |
14 | Group: Development/Languages/Perl | |
15 | Source0: http://search.cpan.org/CPAN/authors/id/O/OA/OALDERS/%{pnam}-%{version}.tar.gz | |
16 | # Source0-md5: fe42c3f99fd8d1438d383f820c89d9bd | |
17 | URL: http://search.cpan.org/dist/libwww-perl/ | |
18 | BuildRequires: perl-devel >= 1:5.8.8 | |
19 | BuildRequires: rpm-perlprov >= 4.1-13 | |
20 | BuildRequires: rpmbuild(macros) >= 1.663 | |
21 | %if %{with tests} | |
22 | BuildRequires: perl(Net::FTP) >= 2.58 | |
23 | BuildRequires: perl-Digest-MD5 | |
24 | BuildRequires: perl-Encode >= 2.12 | |
25 | BuildRequires: perl-Encode-Locale | |
26 | BuildRequires: perl-File-Listing >= 6 | |
27 | BuildRequires: perl-HTML-Parser >= 3.33 | |
28 | BuildRequires: perl-HTTP-Cookies >= 6 | |
29 | BuildRequires: perl-HTTP-Daemon >= 6 | |
30 | BuildRequires: perl-HTTP-Date >= 6 | |
31 | BuildRequires: perl-HTTP-Message >= 6 | |
32 | BuildRequires: perl-HTTP-Negotiate >= 6 | |
33 | BuildRequires: perl-LWP-MediaTypes >= 6 | |
34 | BuildRequires: perl-MIME-Base64 >= 2.1 | |
35 | BuildRequires: perl-Net-HTTP >= 6.18 | |
36 | BuildRequires: perl-Test-Needs | |
37 | BuildRequires: perl-Test-RequiresInternet | |
38 | BuildRequires: perl-Test-Simple | |
39 | BuildRequires: perl-URI >= 1.10 | |
40 | BuildRequires: perl-WWW-RobotRules >= 6 | |
41 | BuildRequires: perl-libnet | |
42 | %endif | |
43 | Requires: perl-File-Listing >= 6 | |
44 | Requires: perl-HTTP-Cookies >= 6 | |
45 | Requires: perl-HTTP-Daemon >= 6 | |
46 | Requires: perl-HTTP-Date >= 6 | |
47 | Requires: perl-HTTP-Message >= 6 | |
48 | Requires: perl-HTTP-Negotiate >= 6 | |
49 | Requires: perl-LWP-MediaTypes >= 6 | |
50 | Requires: perl-MIME-Base64 >= 2.1 | |
51 | Requires: perl-Net-HTTP >= 6.18 | |
52 | Requires: perl-URI >= 1.10 | |
53 | Requires: perl-WWW-RobotRules >= 6 | |
54 | Obsoletes: perl-libwww-perl | |
55 | BuildArch: noarch | |
56 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
57 | ||
58 | # modules not always required | |
59 | %define _noautoreq_perl HTTP::GHTTP Authen::NTLM | |
60 | ||
61 | %description | |
62 | The libwww-perl collection is a set of Perl modules which provides a | |
63 | simple and consistent application programming interface to the | |
64 | World-Wide Web. The main focus of the library is to provide classes | |
65 | and functions that allow you to write WWW clients. The library also | |
66 | contain modules that are of more general use and even classes that | |
67 | help you implement simple HTTP servers. | |
68 | ||
69 | %description -l pl.UTF-8 | |
70 | libwww-perl jest zbiorem modułów Perla, dostarczających prostego API | |
71 | do WWW (World-Wide Web). Głównym zadaniem biblioteki jest | |
72 | udostępnianie klas i funkcji, pozwalających na pisanie klientów WWW. | |
73 | Biblioteka zawiera także moduły bardziej ogólnego przeznaczenia, a | |
74 | nawet klasy, pozwalające na implementację prostego serwera HTTP. | |
75 | ||
76 | %prep | |
77 | %setup -q -n libwww-perl-%{version} | |
78 | ||
79 | %build | |
80 | yes | %{__perl} Makefile.PL \ | |
81 | INSTALLDIRS=vendor | |
82 | %{__make} | |
83 | ||
84 | %{?with_tests:%{__make} test} | |
85 | ||
86 | %install | |
87 | rm -rf $RPM_BUILD_ROOT | |
88 | ||
89 | %{__make} pure_install \ | |
90 | DESTDIR=$RPM_BUILD_ROOT | |
91 | ||
92 | for file in GET HEAD POST; do | |
93 | ln -sf lwp-request $RPM_BUILD_ROOT%{_bindir}/$file | |
94 | echo '.so lwp-request.1p' > $RPM_BUILD_ROOT%{_mandir}/man1/$file.1p | |
95 | done | |
96 | %{__rm} $RPM_BUILD_ROOT%{perl_vendorlib}/libwww/*.pod | |
97 | ||
98 | %clean | |
99 | rm -rf $RPM_BUILD_ROOT | |
100 | ||
101 | %files | |
102 | %defattr(644,root,root,755) | |
103 | %doc Changes README* | |
104 | %attr(755,root,root) %{_bindir}/GET | |
105 | %attr(755,root,root) %{_bindir}/HEAD | |
106 | %attr(755,root,root) %{_bindir}/POST | |
107 | %attr(755,root,root) %{_bindir}/lwp-* | |
108 | %{perl_vendorlib}/LWP.pm | |
109 | %{perl_vendorlib}/LWP/Authen | |
110 | %{perl_vendorlib}/LWP/ConnCache.pm | |
111 | %{perl_vendorlib}/LWP/Debug.pm | |
112 | %dir %{perl_vendorlib}/LWP/Debug | |
113 | %{perl_vendorlib}/LWP/Debug/TraceHTTP.pm | |
114 | %{perl_vendorlib}/LWP/DebugFile.pm | |
115 | %{perl_vendorlib}/LWP/MemberMixin.pm | |
116 | %{perl_vendorlib}/LWP/Protocol.pm | |
117 | %{perl_vendorlib}/LWP/Protocol | |
118 | %{perl_vendorlib}/LWP/RobotUA.pm | |
119 | %{perl_vendorlib}/LWP/Simple.pm | |
120 | %{perl_vendorlib}/LWP/UserAgent.pm | |
121 | %{_mandir}/man1/GET.1p* | |
122 | %{_mandir}/man1/HEAD.1p* | |
123 | %{_mandir}/man1/POST.1p* | |
124 | %{_mandir}/man1/lwp-*.1p* | |
125 | %{_mandir}/man3/LWP*.3pm* | |
126 | %{_mandir}/man3/libwww::lwpcook.3pm* | |
127 | %{_mandir}/man3/libwww::lwptut.3pm* |