Skip to content

Instantly share code, notes, and snippets.

@rdark
Created July 25, 2014 12:25
Show Gist options
  • Save rdark/6256831599b046484ce3 to your computer and use it in GitHub Desktop.
Save rdark/6256831599b046484ce3 to your computer and use it in GitHub Desktop.
%{?scl:%scl_package perl-App-FatPacker}
%{!?scl:%global pkg_name %{name}}
Name: %{?scl_prefix}perl-App-FatPacker
Version: 0.010001
Release: 2%{?dist}
Summary: Pack dependencies onto a script file
License: GPL+ or Artistic
Group: Development/Libraries
URL: http://search.cpan.org/dist/App-FatPacker/
Source0: http://www.cpan.org/authors/id/M/MS/MSTROUT/App-FatPacker-%{version}.tar.gz
BuildArch: noarch
BuildRequires: %{?scl_prefix}perl
BuildRequires: %{?scl_prefix}perl(ExtUtils::MakeMaker)
BuildRequires: %{?scl_prefix}perl(strict)
BuildRequires: %{?scl_prefix}perl(warnings)
# Run-time:
BuildRequires: %{?scl_prefix}perl(B)
BuildRequires: %{?scl_prefix}perl(Cwd)
BuildRequires: %{?scl_prefix}perl(File::Copy)
BuildRequires: %{?scl_prefix}perl(File::Find)
BuildRequires: %{?scl_prefix}perl(File::Path)
BuildRequires: %{?scl_prefix}perl(File::Spec::Functions)
BuildRequires: %{?scl_prefix}perl(File::Spec::Unix)
BuildRequires: %{?scl_prefix}perl(Getopt::Long)
# Tests:
BuildRequires: %{?scl_prefix}perl(File::Basename)
BuildRequires: %{?scl_prefix}perl(File::Spec)
BuildRequires: %{?scl_prefix}perl(File::Temp)
BuildRequires: %{?scl_prefix}perl(Test::More)
%{?scl:%global perl_version %(scl enable %{scl} 'eval "`perl -V:version`"; echo $version')}
%{!?scl:%global perl_version %(eval "`perl -V:version`"; echo $version)}
Requires: %{?scl_prefix}perl(:MODULE_COMPAT_%{perl_version})
%description
This tool does all the work of tracing, collecting packlists, extracting
perl modules in fatlib, and then concatenating them into a packed script.
%prep
%setup -q -n App-FatPacker-%{version}
sed -i -e '1s|#!/usr/bin/env perl|#!%{__perl}|' bin/fatpack
%build
%{?scl:scl enable %{scl} - << \EOF}
perl Makefile.PL INSTALLDIRS=vendor
%{?scl:EOF}
%{?scl:scl enable %{scl} - << \EOF}
make %{?_smp_mflags}
%{?scl:EOF}
%install
%{?scl:scl enable %{scl} - << \EOF}
make pure_install DESTDIR=$RPM_BUILD_ROOT
%{?scl:EOF}
find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} \;
%{_fixperms} $RPM_BUILD_ROOT/*
%check
%{?scl:scl enable %{scl} - << \EOF}
make test
%{?scl:EOF}
%files
%doc Changes README
%{_bindir}/*
%{perl_vendorlib}/*
%{_mandir}/man1/*
%{_mandir}/man3/*
%changelog
* Thu Mar 20 2014 Richard Clark <[email protected]> - 0.010001-2
- Import of fc21 spec + migrate to scl
* Thu Mar 20 2014 Petr Pisar <[email protected]> - 0.010001-1
- 0.010001 bump
* Tue Jan 07 2014 Petr Pisar <[email protected]> 0.010000-1
- Specfile autogenerated by cpanspec 1.78.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment