%define	pkgname	Class-Inspector

# Basic Information
Name:		perl-%{pkgname}
Version:	1.25
Release:	1%{?_dist_release}
# License は、COPYING などのファイルを参考に適切なものに変更してください。
License:	Artistic or GPL
Group:		Development/Libraries
Source0:	http://search.cpan.org/CPAN/authors/id/A/AD/ADAMK/%{pkgname}-%{version}.tar.gz
BuildRoot:	%{_tmppath}/%{name}-%{version}-root

Vendor:		Project Vine
Distribution:	Vine Linux
Packager:	yasumichi

Summary:	Get information about a class and its structure
Summary(ja):	クラスおよびその構造について情報を得る

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

BuildRequires:	perl

%description
Class::Inspector allows you to get information about a loaded class. Most or
all of this information can be found in other ways, but they aren't always
very friendly, and usually involve a relatively high level of Perl wizardry,
or strange and unusual looking code. Class::Inspector attempts to provide an
easier, more friendly interface to this information.

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

%prep
%setup -q -n Class-Inspector-1.25

%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/Inspector/.packlist


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


%files -f %{name}.files
%defattr(-,root,root)
%doc Changes LICENSE README
%dir %{perl_sitelib}/Class/Inspector
%{_mandir}/*/*


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