package VineLinux::VSS::Skeleton::PerlModule::Spec;

1;
__DATA__
%define origname 

Summary: Perl Module Package
Name: <TMPL_VAR NAME="package_name">
Version: 
Release: 1%{?_dist_release}
License: 
Group: Development/Libraries
Source0: %{origname}-%{version}.tar.gz
Source1: filter-requires-<TMPL_VAR NAME="package_name">.sh
Url: 
BuildRoot: %{_tmppath}/%{name}-%{version}-root
BuildArch: noarch
BuildRequires: perl
Requires: perl

Distribution: Vine Linux
Vendor: Project Vine
Packager: <TMPL_VAR NAME="packager_name">

%define __find_requires %{SOURCE1}

%description
Perl Module Package

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

%build
CFLAGS="$RPM_OPT_FLAGS" perl Makefile.PL INSTALLDIRS=vendor
make

%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_prefix}
make DESTDIR=$RPM_BUILD_ROOT install

find $RPM_BUILD_ROOT \( -name perllocal.pod -o -name .packlist \) -exec rm -v {} \;

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

%check
make test

%clean 
rm -rf $RPM_BUILD_ROOT

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

%changelog
* <TMPL_VAR NAME="generate_date"> <TMPL_VAR NAME="packager_fullname"> <<TMPL_VAR NAME="packager_email">>
- first release for Vine Linux
