3 %bcond_without tests # do not perform "make test"
5 %include /usr/lib/rpm/macros.perl
7 %define pnam Hostname-FQDN
8 Summary: Sys::Hostname::FQDN - extract full host name
9 Summary(pl): Sys::Hostname::FQDN - uzyskiwanie pe³nej nazwy hosta
10 Name: perl-Sys-Hostname-FQDN
14 Group: Development/Languages/Perl
15 Source0: http://www.cpan.org/modules/by-module/%{pdir}/%{pdir}-%{pnam}-%{version}.tar.gz
16 # Source0-md5: ab6b00e3f0781b3e074daa53160d1815
17 Patch0: %{name}-segv.patch
18 BuildRequires: perl-devel >= 1:5.8.0
19 BuildRequires: rpm-perlprov >= 4.1-13
20 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23 Sys::Hostname::FQDN uses the host C library to discover the (usually)
24 short host name, then uses (perl) gethostbyname to extract the real
27 The results from gethostbyname are exported as gethostinfo and
28 asciihostinfo as a convenience since they are available. Similarly,
29 the C library functions inet_ntoa and inet_aton are exported.
32 Sys::Hostname::FQDN u¿ywa biblioteki C do uzyskania (zwykle) krótkiej
33 nazwy hosta, a nastêpnie u¿ywa (perlowej) funkcji gethostbyname aby
34 uzyskaæ prawdziw± nazwê hosta.
36 Wyniki z gethostbyname s± dla wygody eksportowane jako gethostinfo i
37 asciihostinfo, poniewa¿ s± dostêpne. Podobnie s± wyeksportowane
38 funkcje biblioteki C inet_ntoa i inet_aton.
41 %setup -q -n %{pdir}-%{pnam}-%{version}
45 %{__perl} Makefile.PL \
48 OPTIMIZE="%{rpmcflags}"
50 %{?with_tests:%{__make} test}
53 rm -rf $RPM_BUILD_ROOT
55 %{__make} pure_install \
56 DESTDIR=$RPM_BUILD_ROOT
58 rm -f $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Sys/Hostname/FQDN/.packlist
61 rm -rf $RPM_BUILD_ROOT
64 %defattr(644,root,root,755)
66 %dir %{perl_vendorarch}/Sys/Hostname
67 %{perl_vendorarch}/Sys/Hostname/FQDN.pm
68 %dir %{perl_vendorarch}/auto/Sys/Hostname
69 %dir %{perl_vendorarch}/auto/Sys/Hostname/FQDN
70 %{perl_vendorarch}/auto/Sys/Hostname/FQDN/FQDN.bs
71 %attr(755,root,root) %{perl_vendorarch}/auto/Sys/Hostname/FQDN/FQDN.so