- add perl-homedir subpackage
This commit is contained in:
parent
2cba1f59d5
commit
de4000428c
17
perl-homedir.csh
Normal file
17
perl-homedir.csh
Normal 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
16
perl-homedir.sh
Normal 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
|
@ -1,6 +1,6 @@
|
|||||||
Name: perl-local-lib
|
Name: perl-local-lib
|
||||||
Version: 1.004009
|
Version: 1.004009
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
# lib/local/lib.pm -> GPL+ or Artistic
|
# lib/local/lib.pm -> GPL+ or Artistic
|
||||||
License: GPL+ or Artistic
|
License: GPL+ or Artistic
|
||||||
Group: Development/Libraries
|
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))
|
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
|
Source10: perl-homedir.sh
|
||||||
|
Source11: perl-homedir.csh
|
||||||
|
|
||||||
BuildRequires: perl(ExtUtils::MakeMaker) >= 6.42
|
BuildRequires: perl(ExtUtils::MakeMaker) >= 6.42
|
||||||
BuildRequires: perl(CPAN) >= 1.80
|
BuildRequires: perl(CPAN) >= 1.80
|
||||||
BuildRequires: perl(ExtUtils::CBuilder)
|
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
|
hasn't applied a patch to a module of theirs that you need for your
|
||||||
application.
|
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
|
%prep
|
||||||
%setup -q -n local-lib-%{version}
|
%setup -q -n local-lib-%{version}
|
||||||
|
|
||||||
@ -63,6 +82,10 @@ find %{buildroot} -depth -type d -exec rmdir {} 2>/dev/null ';'
|
|||||||
|
|
||||||
%{_fixperms} %{buildroot}/*
|
%{_fixperms} %{buildroot}/*
|
||||||
|
|
||||||
|
mkdir -p %{buildroot}%{_sysconfdir}/profile.d
|
||||||
|
cp %{SOURCE10} %{buildroot}%{_sysconfdir}/profile.d/
|
||||||
|
cp %{SOURCE11} %{buildroot}%{_sysconfdir}/profile.d/
|
||||||
|
|
||||||
%check
|
%check
|
||||||
make test
|
make test
|
||||||
|
|
||||||
@ -75,7 +98,14 @@ rm -rf %{buildroot}
|
|||||||
%{perl_vendorlib}/*
|
%{perl_vendorlib}/*
|
||||||
%{_mandir}/man3/*.3*
|
%{_mandir}/man3/*.3*
|
||||||
|
|
||||||
|
%files -n perl-homedir
|
||||||
|
%defattr(-,root,root,-)
|
||||||
|
%{_sysconfdir}/profile.d/*
|
||||||
|
|
||||||
%changelog
|
%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
|
* Tue Jan 05 2010 Chris Weyl <cweyl@alumni.drew.edu> 1.004009-1
|
||||||
- add perl_default_filter
|
- add perl_default_filter
|
||||||
- auto-update to 1.004009 (by cpan-spec-update 0.01)
|
- auto-update to 1.004009 (by cpan-spec-update 0.01)
|
||||||
|
Loading…
Reference in New Issue
Block a user