Fix manual pages names

This commit is contained in:
Petr Písař 2015-03-25 18:02:28 +01:00
parent 2dafa1476c
commit 6844bf5e49
2 changed files with 62 additions and 0 deletions

View File

@ -0,0 +1,56 @@
From 425354918f774c39c68b79de55691ee262cdcb84 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
Date: Wed, 25 Mar 2015 17:57:05 +0100
Subject: [PATCH] Build from lib
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Building from lib.modern adds "modern::" prefix to manual pages.
This is a work-around for CPAN RT#103116. Creating symlink is not
enough for EU::MM.
Signed-off-by: Petr Písař <ppisar@redhat.com>
diff --git a/Makefile.PL b/Makefile.PL
index a8dbc7e..1b5b51a 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -1,10 +1,15 @@
use ExtUtils::MakeMaker;
+if (!-d 'lib') {
+ rename (($] > 5.010 ? 'lib.modern' : 'lib.old'), 'lib') or
+ die "Could not rename to lib: $!";
+}
+
WriteMakefile(
'NAME' => 'Text-Wrap',
'DISTNAME' => 'Text-Tabs+Wrap',
- 'VERSION_FROM' => 'lib.modern/Text/Wrap.pm',
+ 'VERSION_FROM' => 'lib/Text/Wrap.pm',
($] >= 5.005 ?
(
ABSTRACT => 'Expand tabs and do simple line wrapping',
@@ -21,16 +26,5 @@ WriteMakefile(
'dist' => { COMPRESS=>"gzip", SUFFIX=>"gz" },
'INSTALLDIRS' => 'perl',
- PM => ($] > 5.010 ?
- {
- 'lib.modern/Text/Tabs.pm' => '$(INST_LIBDIR)/Text/Tabs.pm',
- 'lib.modern/Text/Wrap.pm' => '$(INST_LIBDIR)/Text/Wrap.pm',
- }
- :
- {
- 'lib.old/Text/Tabs.pm' => '$(INST_LIBDIR)/Text/Tabs.pm',
- 'lib.old/Text/Wrap.pm' => '$(INST_LIBDIR)/Text/Wrap.pm',
- })
-
);
--
2.1.0

View File

@ -6,6 +6,8 @@ License: TTWL
Group: Development/Libraries Group: Development/Libraries
URL: http://search.cpan.org/dist/Text-Tabs%2BWrap/ URL: http://search.cpan.org/dist/Text-Tabs%2BWrap/
Source0: http://www.cpan.org/authors/id/M/MU/MUIR/modules/Text-Tabs+Wrap-%{version}.tar.gz Source0: http://www.cpan.org/authors/id/M/MU/MUIR/modules/Text-Tabs+Wrap-%{version}.tar.gz
# Work around CPAN RT#103116
Patch0: Text-Tabs+Wrap-2013.0523-Build-from-lib.patch
BuildArch: noarch BuildArch: noarch
BuildRequires: perl BuildRequires: perl
BuildRequires: perl(ExtUtils::MakeMaker) BuildRequires: perl(ExtUtils::MakeMaker)
@ -22,6 +24,8 @@ BuildRequires: perl(warnings)
# Optional tests: # Optional tests:
# Benchmark not used # Benchmark not used
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
# Sub-packaged from perl.spec, it would conflicted on manual pages
Conflicts: perl < 4:5.20.2-325
%description %description
Text::Tabs performs the same job that the UNIX expand(1) and unexpand(1) Text::Tabs performs the same job that the UNIX expand(1) and unexpand(1)
@ -32,6 +36,7 @@ up long lines, it will not join short lines together.
%prep %prep
%setup -q -n Text-Tabs+Wrap-%{version} %setup -q -n Text-Tabs+Wrap-%{version}
%patch0 -p1
%build %build
perl Makefile.PL INSTALLDIRS=vendor perl Makefile.PL INSTALLDIRS=vendor
@ -53,6 +58,7 @@ make test
%changelog %changelog
* Wed Mar 25 2015 Petr Pisar <ppisar@redhat.com> - 2013.0523-326 * Wed Mar 25 2015 Petr Pisar <ppisar@redhat.com> - 2013.0523-326
- Increase release number to compete with perl's sub-package - Increase release number to compete with perl's sub-package
- Fix manual pages names
* Wed Feb 13 2013 Petr Pisar <ppisar@redhat.com> - 2013.0523-1 * Wed Feb 13 2013 Petr Pisar <ppisar@redhat.com> - 2013.0523-1
- Version 2013.0523 packaged - Version 2013.0523 packaged