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