Summary: persistent session data in CGI applications with Perl
Name: perl-CGI-Session
Version: 4.48
Release: 1%{?_dist_release}
License: Artistic
Group: Development/Libraries
Source0: http://search.cpan.org/CPAN/authors/id/S/SH/SHERZODR/CGI-Session-%{version}.tar.gz
URL: http://search.cpan.org/~sherzodr/CGI-Session/

BuildRoot: %{_tmppath}/%{name}-%{version}-root
BuildArch: noarch
BuildRequires: perl >= 5.8.2
# for test
BuildRequires: perl-FreezeThaw
BuildRequires: perl-CGI-Simple

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

Vendor: Project Vine
Distribution: Vine Linux

%description
CGI-Session is a Perl5 library that provides an easy, reliable and
modular session management system across HTTP requests. Persistency is a
key feature for such applications as shopping carts,
login/authentication routines, and application that need to carry data
accross HTTP requests. CGI::Session does that and many more

%prep
%setup -q -n CGI-Session-%{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%{_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 
%{_mandir}/*/*
%dir %{perl_vendorlib}/CGI
%dir %{perl_vendorlib}/CGI/Session
%dir %{perl_vendorlib}/CGI/Session/ID
%dir %{perl_vendorlib}/CGI/Session/Driver
%dir %{perl_vendorlib}/CGI/Session/Serialize
%dir %{perl_vendorlib}/CGI/Session/Test

%changelog
* Sat Oct 25 2014 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 4.48-1
- new upstream release
- built with perl 5.16.3

* Sun May 22 2011 IWAI, Masaharu <iwai@alib.jp> 4.43-1
- new upstream release

* Thu Nov 12 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.42-1
- new upstream release
- applied new versioning policy

* Wed Jan 02 2008 Shu KONNO <owa@bg.wakwak.com> 4.14-0vl3
- rebuilt

* Thu Nov 30 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.14-0vl1
- updated to 4.14
- changed Group to Development/Libraries

* Fri Sep  9 2005 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.02-0vl1
- updated to 4.02
- use vendor_perl dir

* Mon Apr 28 2003 IWAI Masaharu <iwai@alib.jp> 3.93-0vl1
- first build for Vine Linux
