- add perl-homedir subpackage

This commit is contained in:
Chris Weyl 2010-01-05 02:29:12 +00:00
parent 2cba1f59d5
commit de4000428c
3 changed files with 64 additions and 1 deletions

17
perl-homedir.csh Normal file
View File

@ -0,0 +1,17 @@
# invoke local::lib
# default -- invoke local::lib for all users
setenv PERL_HOMEDIR 1
# load our configs, aka opportunities to set PERL_HOMEDIR=0
[ -f /etc/sysconfig/perl-homedir ] && . /etc/sysconfig/perl-homedir
[ -f $HOME/.perl-homedir ] && . $HOME/.perl-homedir
alias perlll="eval `perl -Mlocal::lib`"
# if system default
if [ "x$PERL_HOMEDIR" = "x1" ] ; then
eval `perl -Mlocal::lib`
fi

16
perl-homedir.sh Normal file
View File

@ -0,0 +1,16 @@
# invoke local::lib
# default -- invoke local::lib for all users
PERL_HOMEDIR=1
# load our configs, aka opportunities to set PERL_HOMEDIR=0
[ -f /etc/sysconfig/perl-homedir ] && . /etc/sysconfig/perl-homedir
[ -f $HOME/.perl-homedir ] && . $HOME/.perl-homedir
alias perlll="eval `perl -Mlocal::lib`"
# if system default
if [ "x$PERL_HOMEDIR" = "x1" ] ; then
eval `perl -Mlocal::lib`
fi

View File

@ -1,6 +1,6 @@
Name: perl-local-lib
Version: 1.004009
Release: 1%{?dist}
Release: 2%{?dist}
# lib/local/lib.pm -> GPL+ or Artistic
License: GPL+ or Artistic
Group: Development/Libraries
@ -11,6 +11,9 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
BuildArch: noarch
Source10: perl-homedir.sh
Source11: perl-homedir.csh
BuildRequires: perl(ExtUtils::MakeMaker) >= 6.42
BuildRequires: perl(CPAN) >= 1.80
BuildRequires: perl(ExtUtils::CBuilder)
@ -47,6 +50,22 @@ or collection of modules. Useful in cases like when an upstream maintainer
hasn't applied a patch to a module of theirs that you need for your
application.
%package -n perl-homedir
License: GPL+ or Artistic
Group: Development/Libraries
Summary: Per-user Perl local::lib setup
Requires: %{name} = %{version}-%{release}
Requires: /usr/bin/cpan
%description -n perl-homedir
perl-homedir configures the system to automatically create a ~/perl5
directory in each user's $HOME on user login. This allows each user to
install and CPAN packages via the CPAN to their $HOME, with no additional
configuration or privliges, and without installing them system-wide.
If you want your users to be able to install and use their own Perl modules,
install this package.
%prep
%setup -q -n local-lib-%{version}
@ -63,6 +82,10 @@ find %{buildroot} -depth -type d -exec rmdir {} 2>/dev/null ';'
%{_fixperms} %{buildroot}/*
mkdir -p %{buildroot}%{_sysconfdir}/profile.d
cp %{SOURCE10} %{buildroot}%{_sysconfdir}/profile.d/
cp %{SOURCE11} %{buildroot}%{_sysconfdir}/profile.d/
%check
make test
@ -75,7 +98,14 @@ rm -rf %{buildroot}
%{perl_vendorlib}/*
%{_mandir}/man3/*.3*
%files -n perl-homedir
%defattr(-,root,root,-)
%{_sysconfdir}/profile.d/*
%changelog
* Tue Jan 05 2010 Chris Weyl <cweyl@alumni.drew.edu> 1.004009-2
- add perl-homedir subpackage
* Tue Jan 05 2010 Chris Weyl <cweyl@alumni.drew.edu> 1.004009-1
- add perl_default_filter
- auto-update to 1.004009 (by cpan-spec-update 0.01)