3 %bcond_without tests # do not perform "make test"
6 %define pnam Hostname-FQDN
7 Summary: Sys::Hostname::FQDN - extract full host name
8 Summary(pl.UTF-8): Sys::Hostname::FQDN - uzyskiwanie pełnej nazwy hosta
9 Name: perl-Sys-Hostname-FQDN
13 Group: Development/Languages/Perl
14 Source0: http://www.cpan.org/modules/by-module/Sys/%{pdir}-%{pnam}-%{version}.tar.gz
15 # Source0-md5: b66ba140adaac6a738b5d02b4b5c3240
16 URL: http://search.cpan.org/dist/Sys-Hostname-FQDN/
17 BuildRequires: perl-devel >= 1:5.8.0
18 BuildRequires: rpm-perlprov >= 4.1-13
19 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
22 Sys::Hostname::FQDN uses the host C library to discover the (usually)
23 short host name, then uses (perl) gethostbyname to extract the real
26 The results from gethostbyname are exported as gethostinfo and
27 asciihostinfo as a convenience since they are available. Similarly,
28 the C library functions inet_ntoa and inet_aton are exported.
30 %description -l pl.UTF-8
31 Sys::Hostname::FQDN używa biblioteki C do uzyskania (zwykle) krótkiej
32 nazwy hosta, a następnie używa (perlowej) funkcji gethostbyname aby
33 uzyskać prawdziwą nazwę hosta.
35 Wyniki z gethostbyname są dla wygody eksportowane jako gethostinfo i
36 asciihostinfo, ponieważ są dostępne. Podobnie są wyeksportowane
37 funkcje biblioteki C inet_ntoa i inet_aton.
40 %setup -q -n %{pdir}-%{pnam}-%{version}
43 %{__perl} Makefile.PL \
47 OPTIMIZE="%{rpmcflags}"
49 %{?with_tests:%{__make} test}
52 rm -rf $RPM_BUILD_ROOT
54 %{__make} pure_install \
55 DESTDIR=$RPM_BUILD_ROOT
57 rm -f $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Sys/Hostname/FQDN/.packlist
60 rm -rf $RPM_BUILD_ROOT
63 %defattr(644,root,root,755)
65 %dir %{perl_vendorarch}/Sys/Hostname
66 %{perl_vendorarch}/Sys/Hostname/FQDN.pm
67 %dir %{perl_vendorarch}/auto/Sys/Hostname
68 %dir %{perl_vendorarch}/auto/Sys/Hostname/FQDN
69 %attr(755,root,root) %{perl_vendorarch}/auto/Sys/Hostname/FQDN/FQDN.so