From: zbyniu Date: Sun, 13 Mar 2005 19:05:23 +0000 (+0000) Subject: - initial X-Git-Tag: auto/ac/perl-Geography-Countries-1_4-0_7~3 X-Git-Url: https://git.pld-linux.org/?a=commitdiff_plain;ds=sidebyside;h=c1f717ae1da5afc74b4639ca11039a90ab8ccda8;p=packages%2Fperl-Geography-Countries.git - initial Changed files: perl-Geography-Countries.spec -> 1.1 --- c1f717ae1da5afc74b4639ca11039a90ab8ccda8 diff --git a/perl-Geography-Countries.spec b/perl-Geography-Countries.spec new file mode 100644 index 0000000..d5eea7b --- /dev/null +++ b/perl-Geography-Countries.spec @@ -0,0 +1,103 @@ +# +# Conditional build: +%bcond_without tests # do not perform "make test" +# +%include /usr/lib/rpm/macros.perl +%define pdir Geography +%define pnam Countries +Summary: Geography::Countries - 2-letter, 3-letter, and numerical codes for countries +Summary(pl): Geography::Countries - 2, 3-literowe i numeryczne kody krajów +Name: perl-Geography-Countries +Version: 1.4 +Release: 0.7 +License: Unknown +Group: Development/Languages/Perl +Source0: http://www.cpan.org/modules/by-module/%{pdir}/%{pdir}-%{pnam}-%{version}.tar.gz +# Source0-md5: 6b4e81ce6aee8c5d9e7e8b74722a5a1d +BuildRequires: perl-devel >= 1:5.8.0 +BuildRequires: rpm-perlprov >= 4.1-13 +%if %{with tests} +%endif +BuildArch: noarch +BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) + +%description +This module maps country names, and their 2-letter, 3-letter and +numerical codes, as defined by the ISO-3166 maintenance agency [1], +and defined by the UNSD. + +=head2 The C subroutine. + +This subroutine is exported by default. It takes a 2-letter, 3-letter or +numerical code, or a country name as argument. In scalar context, it will +return the country name, in list context, it will return a list consisting +of the 2-letter code, the 3-letter code, the numerical code, the country +name, and a flag, which is explained below. Note that not all countries +have all 3 codes; if a code is unknown, the undefined value is returned. + +There are 3 categories of countries. The largest category are the +current countries. Then there is a small set of countries that no +longer exist. The final set consists of areas consisting of multiple +countries, like I. No 2-letter or 3-letter codes are available +for the second two sets. (ISO 3166-3 [3] defines 4 letter codes for the +set of countries that no longer exist, but the author of this module +was unable to get her hands on that standard.) By default, C +only returns countries from the first set, but this can be changed +by giving C an optional second argument. + +The module optionally exports the constants C, +C, C and C. These constants can also +be important all at once by using the tag C<:FLAGS>. C is just +the binary or of the three other flags. The second argument of C +should be the binary or of a subset of the flags C, +C, and C - if no, or a false, second argument is +given, C is assumed. If C is set, regular +(current) countries will be returned; if C is set, old, +no longer existing, countries will be returned, while C +is used in case a region (not necessarely) a country might be returned. +If C is used in list context, the fifth returned element is +one of C, C and C, indicating +whether the result is a regular country, an old country, or a region. + +In list context, C returns a 5 element list. To avoid having +to remember which element is in which index, the constants C, +C, C, C and C +can be imported. Those constants contain the indices of the 2-letter code, +the 3-letter code, the numerical code, the country, and the flag explained +above, respectively. All index constants can be imported by using the +C<:INDICES> tag. + +=head2 The C, C, C and C routines. + +All known 2-letter codes, 3-letter codes, numerical codes and country +names can be returned by the routines C, C, C and +C. None of these methods is exported by default; all need to +be imported if one wants to use them. The tag C<:LISTS> imports them +all. In scalar context, the number of known codes or countries is returned. + +# %description -l pl +# TODO + +%prep +%setup -q -n %{pdir}-%{pnam}-%{version} + +%build +%{__perl} Makefile.PL \ + INSTALLDIRS=vendor +%{__make} + +%{?with_tests:%{__make} test} + +%install +rm -rf $RPM_BUILD_ROOT + +%{__make} install \ + DESTDIR=$RPM_BUILD_ROOT + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr(644,root,root,755) +%{perl_vendorlib}/Geography/*.pm +%{_mandir}/man3/*