[packages/perl-Module-Path] - initial

arekm arekm at pld-linux.org
Tue Jul 21 09:39:32 CEST 2020


commit 28641c39661e1f2036c29be6760c33f56733a0e0
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Tue Jul 21 09:39:19 2020 +0200

    - initial

 perl-Module-Path.spec | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 71 insertions(+)
---
diff --git a/perl-Module-Path.spec b/perl-Module-Path.spec
new file mode 100644
index 0000000..10fc51b
--- /dev/null
+++ b/perl-Module-Path.spec
@@ -0,0 +1,71 @@
+#
+# Conditional build:
+%bcond_without	tests		# do not perform "make test"
+#
+%define		pdir	Module
+%define		pnam	Path
+Summary:	Module::Path - get the full path to a locally installed module
+Name:		perl-Module-Path
+Version:	0.19
+Release:	1
+License:	GPL v1+ or Artistic
+Group:		Development/Languages/Perl
+Source0:	http://www.cpan.org/modules/by-module/Module/%{pdir}-%{pnam}-%{version}.tar.gz
+# Source0-md5:	8f409cc8654c5b3896f5d2770e07ddab
+URL:		https://metacpan.org/release/Module-Path
+BuildRequires:	perl-devel >= 1:5.8.0
+BuildRequires:	rpm-perlprov >= 4.1-13
+BuildRequires:	rpmbuild(macros) >= 1.745
+%if %{with tests}
+BuildRequires:	perl(Devel::FindPerl)
+%endif
+BuildArch:	noarch
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+This module provides a single function, module_path(), which takes a
+module name and finds the first directory in your @INC path where the
+module is installed locally. It returns the full path to that file,
+resolving any symlinks. It is portable and only depends on core
+modules.
+
+It works by looking in all the directories in @INC for an
+appropriately named file:
+
+I wrote this module because I couldn't find an alternative which dealt
+with the points listed above, and didn't pull in what seemed like too
+many dependencies to me.
+
+The distribution for Module::Path includes the mpath script, which
+lets you get the path for a module from the command-line:
+
+% mpath Module::Path
+
+%prep
+%setup -q -n %{pdir}-%{pnam}-%{version}
+
+%{__sed} -E -i -e '1s,#!\s*/usr/bin/env\s+perl(\s|$),#!%{__perl}\1,' bin/mpath
+
+%build
+%{__perl} Makefile.PL \
+	INSTALLDIRS=vendor
+%{__make}
+
+%{?with_tests:%{__make} test}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} pure_install \
+	DESTDIR=$RPM_BUILD_ROOT
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc Changes README
+%{_bindir}/mpath
+%{perl_vendorlib}/Module/Path.pm
+%{_mandir}/man1/mpath.1*
+%{_mandir}/man3/Module::Path.3pm.gz
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/perl-Module-Path.git/commitdiff/28641c39661e1f2036c29be6760c33f56733a0e0



More information about the pld-cvs-commit mailing list