diff --git a/cpanspec.yml b/cpanspec.yml index 46f2a79..7f28e38 100644 --- a/cpanspec.yml +++ b/cpanspec.yml @@ -18,8 +18,8 @@ sources: #post_build: |- # rm unused.files post_install: |- - %__install -d "%{buildroot}%{_sysconfdir}/profile.d" - %__install -m0644 "%{SOURCE1}" "%{SOURCE2}" "%{buildroot}%{_sysconfdir}/profile.d/" + install -d "%{buildroot}%{_sysconfdir}/profile.d" + install -m0644 "%{SOURCE1}" "%{SOURCE2}" "%{buildroot}%{_sysconfdir}/profile.d/" #license: SUSE-NonFree #skip_noarch: 1 #custom_build: |- @@ -27,3 +27,24 @@ post_install: |- #custom_test: |- #startserver && make test #ignore_requires: Bizarre::Module +#skip_doc: regexp_to_skip_for_doc.* +#add_doc: files to add to docs +misc: |- + %package -n perl-homedir + Summary: Per-user Perl local::lib setup + Group: Development/Libraries/Perl + 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. + + %files -n perl-homedir + %defattr(-,root,root) + %config(noreplace) %{_sysconfdir}/profile.d/* diff --git a/perl-local-lib.changes b/perl-local-lib.changes index 84409fb..93c3608 100644 --- a/perl-local-lib.changes +++ b/perl-local-lib.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Sep 14 20:03:17 UTC 2021 - Dirk Stoecker + +- refresh spec file, use cpanspec compatible build + ------------------------------------------------------------------- Sat Oct 17 13:57:56 UTC 2020 - Dirk Stoecker diff --git a/perl-local-lib.spec b/perl-local-lib.spec index 257f2bb..802f931 100644 --- a/perl-local-lib.spec +++ b/perl-local-lib.spec @@ -1,7 +1,7 @@ # # spec file for package perl-local-lib # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,20 +16,18 @@ # +%define cpan_name local-lib Name: perl-local-lib Version: 2.000024 Release: 0 -%define cpan_name local-lib -Summary: Create and use a local lib/ for perl modules with PERL5LIB License: Artistic-1.0 OR GPL-1.0-or-later -Group: Development/Libraries/Perl +Summary: Create and use a local lib/ for perl modules with PERL5LIB URL: https://metacpan.org/release/%{cpan_name} Source0: https://cpan.metacpan.org/authors/id/H/HA/HAARG/%{cpan_name}-%{version}.tar.gz Source1: perl-homedir.sh Source2: perl-homedir.csh Source3: cpanspec.yml BuildArch: noarch -BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: perl BuildRequires: perl-macros BuildRequires: perl(CPAN) >= 1.82 @@ -74,6 +72,29 @@ When possible, these will be appended to instead of overwritten entirely. These values are then available for reference by any code after import. +%prep +%autosetup -n %{cpan_name}-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%make_build + +%check +make test + +%install +%perl_make_install +%perl_process_packlist +# MANUAL BEGIN +install -d "%{buildroot}%{_sysconfdir}/profile.d" +install -m0644 "%{SOURCE1}" "%{SOURCE2}" "%{buildroot}%{_sysconfdir}/profile.d/" +# MANUAL END +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README +%license LICENSE + %package -n perl-homedir Summary: Per-user Perl local::lib setup Group: Development/Libraries/Perl @@ -89,30 +110,6 @@ 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 %{cpan_name}-%{version} - -%build -perl Makefile.PL INSTALLDIRS=vendor -make %{?_smp_mflags} - -%check -make test - -%install -%perl_make_install -%perl_process_packlist -# MANUAL BEGIN -%__install -d "%{buildroot}%{_sysconfdir}/profile.d" -%__install -m0644 "%{SOURCE1}" "%{SOURCE2}" "%{buildroot}%{_sysconfdir}/profile.d/" -# MANUAL END -%perl_gen_filelist - -%files -f %{name}.files -%defattr(-,root,root,755) -%doc Changes README -%license LICENSE - %files -n perl-homedir %defattr(-,root,root) %config(noreplace) %{_sysconfdir}/profile.d/*