%define PackageName gettext

Name: perl-%{PackageName}
Version: 1.05
Release: 12%{?_dist_release}
Summary: Interface to gettext family of functions

Group: Development/Libraries
License: GPL or Artistic
Source: http://search.cpan.org/CPAN/authors/id/P/PV/PVANDRY/gettext-%{version}.tar.gz
Patch0: perl-gettext-fix-conflict-posix.patch
URL:    http://search.cpan.org/~pvandry/gettext/

BuildRoot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: gettext
Requires:	gettext
Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))

Obsoletes: perl-Locale-gettext <= 1.05

Vendor: Project Vine
Distribution: Vine Linux
Packager: daisuke, inagaki, iwaim

%description
Perl module gettext - This module give acces to the C library functions
for internatialization gettext.


%prep
%setup -q -n %{PackageName}-%{version}
%patch0 -p1

%build
%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="$RPM_OPT_FLAGS"
make %{?_smp_mflags}

%install
rm -rf %{buildroot}
make pure_install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT
find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} ';'
find $RPM_BUILD_ROOT -type f -name '*.bs' -a -size 0 -exec rm -f {} ';'
find $RPM_BUILD_ROOT -type d -depth -exec rmdir {} 2>/dev/null ';'
chmod -R u+w $RPM_BUILD_ROOT/*

%check
unset LC_MESSAGES
case "$LANG" in
''|'C'|'POSIX' ) 
  export LANG=en_US.UTF-8;;
esac
make test

%clean
rm -rf %{buildroot}


%files 
%defattr(-,root,root,-)
%doc README
%{perl_vendorarch}/auto/Locale
%{perl_vendorarch}/Locale
%{_mandir}/man3/*.3*


%changelog
* Sat Jul 12 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.05-12
- rebuild with perl-5.16.3

* Thu Apr 28 2011 Yasumichi Akahoshi <yasumichi@vinelinux.org> 1.05-11
- add patch0 from http://rt.cpan.org/Public/Bug/Display.html?id=35680
- add Vendor, Distribution and Packager tag.

* Sat Mar 26 2011 IWAI, Masaharu <iwai@alib.jp> 1.05-10vl6
- rebuild with perl 5.12.3

* Mon Jul 07 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 1.05-9
- rebuild with perl-5.10
- new versioning policy

* Sat Sep  2 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.05-8vl1
- new upstream release

* Sun Jan  2 2005 IWAI, Masaharu <iwai@alib.jp> 1.03-0vl2
- build on perl-5.8.6-0vl1
- update URL

* Sun Sep 26 2004 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.03-0vl1
- new upstream release
- changed Group: and URL:
- added Prereq: gettext
- moved perllocal.pod to docdir
- rebuild with perl 5.8.2

* Tue Oct  7 2003 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.01-14vl2
- rebuild to remove dependancy at i386
- rebuild with perl 5.8.1

* Tue Nov 26 2002 Daisuke SUZUKI <daisuke@linux.or.jp> 1.01-14vl1
- build for Vine Linux

* Sun Nov 11 2001 Magic Bumper <dist@conectiva.com.br>
+ perl-%{PackageName}-1.01-14cl
- rebuilt against current perl version

* Fri Mar 02 2001 Rodrigo Barbosa <rodrigob@conectiva.com>
+ perl-gettext-1.01-13cl
- Removing macros from changelog

* Thu Dec 07 2000 Rodrigo Barbosa <rodrigob@conectiva.com>
- Added AutoProv: no

* Tue Oct 31 2000 Raul Dias <rsd@conectiva.com>
- Changed perl from "Requires:" to "Prereq:".

* Sat Oct 28 2000 Raul Dias <rsd@conectiva.com>
- Updated spec file
- eliminate sed use

* Fri Sep 29 2000 Raul Dias <rsd@conectiva.com>
- Updated spec file

* Tue Jun 06 2000 Raul Dias <rsd@conectiva.com>
- Fixed instalation without %%doc

* Mon May 22 2000 Raul Dias <rsd@conectiva.com.br>
- New spec allow compiling with perl version 5.00503 and >= 5.6.0

* Fri May 05 2000 Raul Dias <rsd@conectiva.com>
- New spec format

* Fri Mar 10 2000 Raul Dias <rsd@conectiva.com.br>
- first build

