%define	pkgname	Class-Data-Inheritable

# Basic Information
Name:		perl-%{pkgname}
Version:	0.08
Release:	1%{?_dist_release}
License:	Artistic or GPL
Group:		Development/Libraries
Source0:	http://search.cpan.org/CPAN/authors/id/T/TM/TMTM/%{pkgname}-%{version}.tar.gz
BuildRoot:	%{_tmppath}/%{name}-%{version}-root

Vendor:		Project Vine
Distribution:	Vine Linux
Packager:	yasumichi

Summary:	Inheritable, overridable class data
Summary(ja):	クラスデータを継承可能、オーバーライド可能にする

# Dependency
Requires:	perl
Requires:	perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))

BuildRequires:	perl

%description
Class::Data::Inheritable is for creating accessor/mutators to class data.
That is, if you want to store something about your class as a whole (instead
of about a single object). This data is then inherited by your subclasses
and can be overriden.

#%%description -l ja
#ここに日本語で詳細を記述してください。

%prep
%setup -q -n Class-Data-Inheritable-0.08

%build
perl Makefile.PL
%{__make}

%install
%{__rm} -rf ${RPM_BUILD_ROOT}
%{__make} install DESTDIR=${RPM_BUILD_ROOT}

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

# remove unnecessary files.
%{__rm} ${RPM_BUILD_ROOT}%{perl_archlib}/perllocal.pod
%{__rm} ${RPM_BUILD_ROOT}%{perl_sitearch}/auto/Class/Data/Inheritable/.packlist


%clean
%{__rm} -rf ${RPM_BUILD_ROOT}


%files -f %{name}.files
%defattr(-,root,root)
%doc Changes README
%{_mandir}/*/*

%changelog
* Mon Oct 10 2011 Yasumichi Akahoshi <yasumichi@vinelinux.org> 0.08-1
- initial build for Vine Linux