Blob Blame Raw
Name:           perl-PAR-Packer
Version:        0.991
Release:        4%{?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
Patch0:		perl-PAR-Packer-cflags.patch
Patch1:		perl-PAR-Packer-open.patch
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.78
BuildRequires:  perl(PAR) >= 0.977
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}
%patch0 -p1 -b.cflags
%patch1 -p1 -b.open

%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 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.