Blob Blame Raw
Name:           perl-PAR-Packer
Version:        1.007
Release:        2%{?dist}
Summary:        PAR Packager
License:        GPL+ or Artistic
Group:          Development/Libraries
URL:            http://search.cpan.org/dist/PAR-Packer/
Source0:        http://www.cpan.org/authors/id/S/SM/SMUELLER/PAR-Packer-%{version}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires:  perl(Archive::Zip) >= 1
BuildRequires:  perl(Compress::Zlib) >= 1.3
BuildRequires:  perl(ExtUtils::MakeMaker)
BuildRequires:  perl(ExtUtils::Embed)
BuildRequires:  perl(Getopt::ArgvFile) >= 1.07
BuildRequires:  perl(Module::ScanDeps) >= 0.97
BuildRequires:  perl(PAR) >= 1.000
BuildRequires:  perl(PAR::Dist) >= 0.22
Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))

%description
This module implements the App::Packer::Backend interface, for generating
stand-alone executables, perl scripts and PAR files.

%prep
%setup -q -n PAR-Packer-%{version}

%build
# The build procedure for binaries parl and parldyn exploits PAR through
# a compiled binary named myldr/static and thus looks very obfuscated.
# There is no obvious way to teach the build system not to strip the installed
# binaries.  Consequently, desable the -debuginfo subpackage:
%global debug_package %{nil}
%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="$RPM_OPT_FLAGS"
# The Makefile is not parallel-safe.
# PAR_GLOBAL_TEMP seems to be needed for the build.
make PAR_GLOBAL_TEMP=/var/tmp

%install
rm -rf $RPM_BUILD_ROOT

make pure_install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT

find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} \;
find $RPM_BUILD_ROOT -type f -name '*.bs' -size 0 -exec rm -f {} \;
find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null \;

%{_fixperms} $RPM_BUILD_ROOT/*

%check
export PAR_GLOBAL_TEMP=/var/tmp
#export PAR_GLOBAL_TMPDIR=/var/tmp
## does not pass
# make test PERL_TEST_POD=1 || :

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root,-)
%doc AUTHORS ChangeLog README TODO
%{perl_vendorlib}/*
%{_bindir}/par.pl
%{_bindir}/parl
%{_bindir}/parldyn
%{_bindir}/pp
%{_bindir}/tkpp
%{_mandir}/man1/*.1.gz
%{_mandir}/man3/*

%changelog
* Wed Sep 29 2010 jkeating - 1.007-2
- Rebuilt for gcc bug 634757

* Tue Sep 14 2010 Petr Sabata <psabata@redhat.com> - 1.007-1
- New release, v1.007

* Tue Aug 24 2010 Adam Tkac <atkac redhat com> - 1.005-2
- rebuild

* Fri Jun 11 2010 Petr Sabata <psabata@redhat.com> - 1.005-1
- Update to the latest release, fixing #602933

* Tue May 04 2010 Marcela Maslanova <mmaslano@redhat.com> - 0.991-6
- Mass rebuild with perl-5.12.0

* Mon Dec  7 2009 Stepan Kasal <skasal@redhat.com> - 0.991-5
- rebuild against perl 5.10.1

* Wed Sep 23 2009 Stepan Kasal <skasal@redhat.com> - 0.991-4
- too hard to build without stripping (#524894)

* Mon Sep 21 2009 Stepan Kasal <skasal@redhat.com> - 0.991-3
- patch to use $RPM_OPT_FLAGS
- patch to submit the third parameter to open()

* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.991-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Mon Apr 27 2009 Marcela Mašláňová <mmaslano@redhat.com> 0.991-1
- Specfile autogenerated by cpanspec 1.78.