commit ee31c93f9ef9d7a38f58110061bf098f813ddb92 Author: Petr Písař <ppisar@xxxxxxxxxx> Date: Tue Feb 24 13:09:05 2015 +0100 Import .gitignore | 1 + ...ta-Changes-2.05-Install-bin-ini.report.pl.patch | 28 ++++++ ...-2.05-Search-assets-in-system-directories.patch | 78 ++++++++++++++++ perl-Module-Metadata-Changes.spec | 104 +++++++++++++++++++++ sources | 1 + 5 files changed, 212 insertions(+) --- diff --git a/.gitignore b/.gitignore index e69de29..a1609d4 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/Module-Metadata-Changes-2.05.tgz diff --git a/Module-Metadata-Changes-2.05-Install-bin-ini.report.pl.patch b/Module-Metadata-Changes-2.05-Install-bin-ini.report.pl.patch new file mode 100644 index 0000000..e73b557 --- /dev/null +++ b/Module-Metadata-Changes-2.05-Install-bin-ini.report.pl.patch @@ -0,0 +1,28 @@ +From 03f823ef558395e2700d1b4317d9f61bdd7f8969 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@xxxxxxxxxx> +Date: Thu, 19 Feb 2015 17:16:42 +0100 +Subject: [PATCH] Install bin/ini.report.pl +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Petr Písař <ppisar@xxxxxxxxxx> +--- + Makefile.PL | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/Makefile.PL b/Makefile.PL +index 49f09a5..65f1564 100644 +--- a/Makefile.PL ++++ b/Makefile.PL +@@ -23,6 +23,7 @@ WriteMakefile + NAME => 'Module::Metadata::Changes', + LICENSE => 'artistic_2', + PL_FILES => {}, ++ EXE_FILES => [ 'bin/ini.report.pl' ], + PREREQ_PM => + { + Config::IniFiles => 2.66, +-- +2.1.0 + diff --git a/Module-Metadata-Changes-2.05-Search-assets-in-system-directories.patch b/Module-Metadata-Changes-2.05-Search-assets-in-system-directories.patch new file mode 100644 index 0000000..9a0d58f --- /dev/null +++ b/Module-Metadata-Changes-2.05-Search-assets-in-system-directories.patch @@ -0,0 +1,78 @@ +From 8e6902ab84652608df231126654c1385828d5f97 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@xxxxxxxxxx> +Date: Thu, 19 Feb 2015 17:30:11 +0100 +Subject: [PATCH] Search assets in system directories +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +See <https://fedoraproject.org/wiki/Packaging:Web_Assets>. I kept the +long upstream prefix to be ready when upstream adds rich content +there. + +Signed-off-by: Petr Písař <ppisar@xxxxxxxxxx> +--- + bin/ini.report.pl | 4 ++-- + lib/Module/Metadata/Changes.pm | 8 ++++---- + 2 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/bin/ini.report.pl b/bin/ini.report.pl +index f9cde65..4d9abb8 100644 +--- a/bin/ini.report.pl ++++ b/bin/ini.report.pl +@@ -154,7 +154,7 @@ The name of a file to be written. + + The path to the HTML::Template-style templates used by the -table and -webPage switches. + +-Default: '/dev/shm/html/assets/templates/module/metadata/changes'. ++Default: '/usr/share/perl-Module-Metadata-Changes/templates/module/metadata/changes'. + + =item o -release aVersionNumber + +@@ -175,7 +175,7 @@ The table template is called C<ini.table.tmpl>. + The URL to insert into the web page, if using the -webPage switch, + which points to the CSS for the page. + +-Defaults to /assets/css/module/metadata/changes/ini.css. ++Defaults to /.sysassets/css/module/metadata/changes/ini.css. + + =item o -verbose + +diff --git a/lib/Module/Metadata/Changes.pm b/lib/Module/Metadata/Changes.pm +index a5a0bea..62b55c1 100644 +--- a/lib/Module/Metadata/Changes.pm ++++ b/lib/Module/Metadata/Changes.pm +@@ -105,10 +105,10 @@ sub init + $$arg{errstr} = ''; + $$arg{inFileName} ||= ''; # See also run(). + $$arg{outFileName} ||= 'Changelog.ini'; +- $$arg{pathForHTML} ||= '/dev/shm/html/assets/templates/module/metadata/changes'; ++ $$arg{pathForHTML} ||= '/usr/share/perl-Module-Metadata-Changes/templates/module/metadata/changes'; + $$arg{release} ||= ''; + $$arg{table} ||= 0; +- $$arg{urlForCSS} ||= '/assets/css/module/metadata/changes/ini.css'; ++ $$arg{urlForCSS} ||= '/.sysassets/perl-Module-Metadata-Changes/css/module/metadata/changes/ini.css'; + $$arg{verbose} ||= 0; + $$arg{webPage} ||= 0; + +@@ -765,7 +765,7 @@ The default is 'Changelog.ini'. + + This is path to the HTML::Template-style templates used by the 'table' and 'webPage' options. + +-The default is '/dev/shm/html/assets/templates/module/metadata/changes'. ++The default is '/usr/share/perl-Module-Metadata-Changes/templates/module/metadata/changes'. + + =item o release + +@@ -800,7 +800,7 @@ However, if the 'webPage' option is 1, the HTML will be a complete web page. + + =item o urlForCSS + +-The default is '/assets/css/module/metadata/changes/ini.css'. ++The default is '/.sysassets/css/module/metadata/changes/ini.css'. + + This is only used if the 'webPage' option is 1. + +-- +2.1.0 + diff --git a/perl-Module-Metadata-Changes.spec b/perl-Module-Metadata-Changes.spec new file mode 100644 index 0000000..ef0534b --- /dev/null +++ b/perl-Module-Metadata-Changes.spec @@ -0,0 +1,104 @@ +Name: perl-Module-Metadata-Changes +Version: 2.05 +Release: 1%{?dist} +Summary: Manage a module's machine-readable Changes/CHANGES file +License: Artistic 2.0 +Group: Development/Libraries +URL: http://search.cpan.org/dist/Module-Metadata-Changes/ +Source0: http://www.cpan.org/authors/id/R/RS/RSAVAGE/Module-Metadata-Changes-%{version}.tgz +# Install bin scripts, CPAN RT#102247 +Patch0: Module-Metadata-Changes-2.05-Install-bin-ini.report.pl.patch +# Search templates and CSS in the system directories +Patch1: Module-Metadata-Changes-2.05-Search-assets-in-system-directories.patch +BuildArch: noarch +BuildRequires: perl +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: web-assets-devel +# Run-time: +BuildRequires: perl(Config::IniFiles) >= 2.66 +# DateTime nowhere used +# DateTime::Format::HTTP 0.4 not used at tests +# DateTime::Format::Strptime 1.5 not used at tests +BuildRequires: perl(DateTime::Format::W3CDTF) >= 0.06 +# Getopt::Long not used at tests +BuildRequires: perl(Hash::FieldHash) >= 0.1 +BuildRequires: perl(HTML::Entities::Interpolate) >= 1.03 +BuildRequires: perl(HTML::Template) >= 2.9 +BuildRequires: perl(Perl6::Slurp) >= 0.03 +# Pod::Usage not used at tests +BuildRequires: perl(strict) +BuildRequires: perl(Try::Tiny) +BuildRequires: perl(version) >= 0.82 +BuildRequires: perl(warnings) +# Tests: +BuildRequires: perl(lib) +BuildRequires: perl(Test::More) >= 0.96 +# Optinonal tests: +BuildRequires: perl(Test::Pod) >= 1.45 +Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) +Requires: perl(Config::IniFiles) >= 2.66 +Requires: perl(DateTime::Format::HTTP) >= 0.4 +Requires: perl(DateTime::Format::Strptime) >= 1.5 +Requires: perl(DateTime::Format::W3CDTF) >= 0.06 +Requires: perl(Hash::FieldHash) >= 0.1 +Requires: perl(HTML::Entities::Interpolate) >= 1.03 +Requires: perl(HTML::Template) >= 2.9 +Requires: perl(Perl6::Slurp) >= 0.03 +Requires: perl(version) >= 0.82 +Requires: web-assets-filesystem + +%{?perl_default_filter} + +# Filter under-specified dependencies +%global __requires_exclude %{?__requires_exclude:%__requires_exclude|}^perl\\((Config::IniFiles|DateTime::Format::W3CDTF|Hash::FieldHash|HTML::Entities::Interpolate|HTML::Template|Perl6::Slurp|version)\\)$ + +%description +Module::Metadata::Changes is a pure Perl module. It allows you to convert +old-style Changes/CHANGES files, and to read and write Changelog.ini files. + +%prep +%setup -q -n Module-Metadata-Changes-%{version} +# Enable writing for patching +find -type f -exec chmod u+w {} + +%patch0 -p1 +%patch1 -p1 +chmod -x scripts/report.names.pl +sed -i -e '1 s/^#!.*/#!perl/' bin/ini.report.pl + +%build +perl Makefile.PL INSTALLDIRS=vendor +make %{?_smp_mflags} + +%install +make pure_install DESTDIR=$RPM_BUILD_ROOT +find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} \; +%{_fixperms} $RPM_BUILD_ROOT/* + +# Install templates +install -d $RPM_BUILD_ROOT%{_datadir}/%{name}/templates/module/metadata/changes +install -m 0644 \ + -t $RPM_BUILD_ROOT%{_datadir}/%{name}/templates/module/metadata/changes \ + htdocs/assets/templates/module/metadata/changes/* + +# Install web assets +install -d $RPM_BUILD_ROOT%{_webassetdir}/%{name}/css/module/metadata/changes +install -m 0644 \ + -t $RPM_BUILD_ROOT%{_webassetdir}/%{name}/css/module/metadata/changes \ + htdocs/assets/css/module/metadata/changes/* + +%check +make test + +%files +# The Changelog.ini is an example for ini.report.pl tool +%doc Changelog.ini Changes README scripts +%{_bindir}/* +%{perl_vendorlib}/* +%{_datadir}/%{name} +%{_webassetdir}/%{name} +%{_mandir}/man1/* +%{_mandir}/man3/* + +%changelog +* Thu Feb 19 2015 Petr Pisar <ppisar@xxxxxxxxxx> 2.05-1 +- Specfile autogenerated by cpanspec 1.78. diff --git a/sources b/sources index e69de29..51f2369 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +ad90c4ebe79d5b3bb2c60c2eebe45a2e Module-Metadata-Changes-2.05.tgz -- Fedora Extras Perl SIG http://www.fedoraproject.org/wiki/Extras/SIGs/Perl perl-devel mailing list perl-devel@xxxxxxxxxxxxxxxxxxxxxxx https://admin.fedoraproject.org/mailman/listinfo/perl-devel