%define realname        Unicode-String

Name:           perl-Unicode-String
Version:        2.09
Release:        1%{_dist_release}
License:        GPL or Artistic
Group:          Development/Libraries
Summary:        Unicode-String module for perl
Source0:        ftp://ftp.perl.org/pub/CPAN/modules/by-module/Unicode/%{realname}-%{version}.tar.gz
Url:            http://www.cpan.org
BuildRoot:      %{_tmppath}/%{name}-%{version}-root
BuildRequires:  perl >= 5.8.0
Requires:       perl


%description
These are experimental modules to handle various Unicode issues.  They
were made before perl included native UTF8 support.

More information on what Unicode is and can do for you are to be found
at http://www.unicode.org


%prep
%setup -q -n %{realname}-%{version}

%build
%{__perl} Makefile.PL INSTALLDIRS=vendor
make

%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT

[ -x /usr/lib/rpm/brp-compress ] && /usr/lib/rpm/brp-compress

find $RPM_BUILD_ROOT \( -name perllocal.pod -o -name .packlist \) -exec rm -v {} \;
find $RPM_BUILD_ROOT -type f -name '*.bs' -a -empty -exec rm -f {} ';'

find $RPM_BUILD_ROOT/usr -type f -print |
         sed "s@^$RPM_BUILD_ROOT@@g" |
	 grep -v perllocal.pod |
	 grep -v "\.packlist" > Unicode-Strings-%{version}-filelist
if [ "$(cat Unicode-Strings-%{version}-filelist)X" = "X" ] ; then
    echo "ERROR: EMPTY FILE LIST"
    exit -1
fi

%check
make test

%clean
rm -rf $RPM_BUILD_ROOT

%files -f Unicode-Strings-%{version}-filelist
%defattr(-,root,root)

%changelog
* Mon Apr 28 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.09-1vl5
- rebuilt with perl-5.10.0
- applied new versioning policy

* Thu Aug  9 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.09-0vl2
- changed Group to Development/Libraries

* Sat Jul 15 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.09-0vl1
- new upstream release
- changed Group to Development/Languages

* Mon Jan 10 2005 Satoshi MACHINO <machino@vinelinux.org> 2.07-3vl2
- built with perl-5.8.6

* Sat Oct 02 2004 Satoshi MACHINO <machino@vinelinux.org> 2.07-3vl1
- rebuilt for VineLinux

* Thu Aug 14 2003 Per ��yvind Karlsen <peroyvind@linux-mandrake.com> 2.07-3mdk
- rebuild for new perl
- drop Prefix tag
- don't use PREFIX
- use %%makeinstall_std macro

* Tue May 27 2003 Thierry Vignaud <tvignaud@mandrakesoft.com> 2.07-1mdk
- rebuild for new auto{prov,req}

* Fri Apr 25 2003 Fran��is Pons <fpons@mandrakesoft.com> 2.07-1mdk
- 2.07.

* Wed Jan 29 2003 Lenny Cartier <lenny@mandrakesoft.com> 2.06-5mdk
- rebuild

* Fri Jan 24 2003 Arnaud de Lorbeau <adelorbeau@mandrakesoft.com> 2.06-4mdk
- Rebuilt

* Tue Aug 06 2002 Guillaume Rousse <g.rousse@linux-mandrake.com> 2.06-3mdk
- rebuild for multi-thread perl

* Wed Jul 10 2002 Pixel <pixel@mandrakesoft.com> 2.06-2mdk
- rebuild for perl 5.8.0

* Fri Mar  8 2002 Arnaud de Lorbeau <adelorbeau@mandrakesoft.com> 2.06-1mdk
- First MandrakeSoft Package