[publican/f17] Build 3.1
RĂ¼diger Landmann
rlandmann at fedoraproject.org
Sun Apr 7 15:00:17 UTC 2013
commit 947cb2b612d7a2167355a69877e61f3837ea253c
Author: Ruediger Landmann <r.landmann at redhat.com>
Date: Mon Apr 8 01:00:43 2013 +1000
Build 3.1
.gitignore | 1 +
nopdfcover.patch | 126 ++++++++++++++++++++++++++++++++++++++++++++++++
nopdftest.patch | 84 ++++++++++++++++++++++++++++++++
publican.spec | 78 ++++++++++++++++++++++++-----
sources | 2 +-
xsl-newlines-315.patch | 60 +++++++++++++++++++++++
6 files changed, 336 insertions(+), 15 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index da2daa1..1d2f36f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,3 +7,4 @@ Publican-2.1.tar.gz
/Publican-2.7.tar.gz
/Publican-2.8.tar.gz
/Publican-v3.0.0.tar.gz
+/Publican-v3.1.5.tar.gz
diff --git a/nopdfcover.patch b/nopdfcover.patch
new file mode 100644
index 0000000..a69b699
--- /dev/null
+++ b/nopdfcover.patch
@@ -0,0 +1,126 @@
+--- Publican-v3.1.5/lib/Publican/Builder.pm 2013-03-18 15:02:57.000000000 +1000
++++ Publican-v3.1.5-patched/lib/Publican/Builder.pm 2013-03-20 17:44:21.172973666 +1000
+@@ -1069,117 +1069,18 @@
+ if ( -f "$brand_path/book_templates/footer.html" );
+
+ my @wkhtmltopdf_args = (
+- $wkhtmltopdf_cmd, '--javascript-delay',
+- 0, '--header-spacing',
+- 5, '--footer-spacing',
+- 5, '--margin-top',
+- 20, '--margin-bottom',
++ $wkhtmltopdf_cmd, '--margin-top',
+ 20, '--margin-left',
+ '15mm', '--margin-right',
+- '15mm', '--header-html',
+- $header, '--footer-html',
+- $footer
++ '15mm'
+ );
+
+- my $tmpl_path = "$common_config/book_templates";
+- $tmpl_path = "$brand_path/book_templates:$tmpl_path"
+- if ( -d "$brand_path/book_templates" );
+-
+- my $tconf = { INCLUDE_PATH => $tmpl_path, };
+- my $template = Template->new($tconf)
+- or croak( Template->error() );
+-
+- my $subtitle = $self->{publican}->get_subtitle( { lang => $lang } );
+- $subtitle =~ s/"/\\"/g;
+- $subtitle =~ s/\p{Z}+/ /g;
+- chomp($subtitle);
+-
+- my $prod
+- = $web_product_label
+- ? $web_product_label
+- : $self->{publican}->param('product');
+- $prod =~ s/_/ /g;
+-
+- my $ver
+- = $web_version_label
+- ? $web_version_label
+- : $self->{publican}->param('version');
+- $ver =~ s/_/ /g;
+-
+- my $name
+- = $web_name_label
+- ? $web_name_label
+- : $self->{publican}->param('docname');
+- $name =~ s/_/ /g;
+-
+- my @authors = $self->{publican}->get_author_list( { lang => $lang } );
+- my $contributors
+- = $self->{publican}->get_contributors( { lang => $lang } );
+- my $legalnotice
+- = $self->{publican}->get_legalnotice( { lang => $lang } );
+- my $abstract = $self->{publican}->get_abstract( { lang => $lang } );
+- $abstract =~ s/\p{Z}+/ /g;
+-
+- my @keywords = $self->{publican}->get_keywords( { lang => $lang } );
+- my $draft = $self->{publican}->get_draft( { lang => $lang } );
+-
+- my $vars = {
+- draft => $draft,
+- product => decode_utf8($prod),
+- docname => decode_utf8($name),
+- version => decode_utf8($ver),
+- edition => decode_utf8($self->{publican}->param('edition')),
+- release => decode_utf8($self->{publican}->param('release')),
+- subtitle => decode_utf8($subtitle),
+- authors => \@authors,
+- editorlabel => decode_utf8( $locale->maketext("Edited by") ),
+- contributors => $contributors,
+- contriblabel =>
+- decode_utf8( $locale->maketext("With contributions from") ),
+- legalnotice => $legalnotice,
+- legaltitle => decode_utf8( $locale->maketext("Legal Notice") ),
+- abstract => $abstract,
+- abstracttitle => decode_utf8( $locale->maketext("Abstract") ),
+- keywords => \@keywords,
+- keywordtitle => decode_utf8( $locale->maketext("Keywords") ),
+- toctitle => decode_utf8( $locale->maketext("Table of Contents") ),
+- };
+-
+- $template->process(
+- 'cover.tmpl', $vars,
+- "$tmp_dir/$lang/html-pdf/cover.html",
+- binmode => ':encoding(UTF-8)'
+- ) or croak( $template->error() );
++ if ( -f "$common_config/header.html" ) {
++ push( @wkhtmltopdf_args,
++ '--header-html', "$common_config/header.html" );
++ }
+
+ push( @wkhtmltopdf_args,
+- 'cover', "$tmp_dir/$lang/html-pdf/cover.html" );
+-
+- # $template->process(
+- # 'titlepage.tmpl', $vars,
+- # "$tmp_dir/$lang/html-pdf/titlepage.html",
+- # binmode => ':encoding(UTF-8)'
+- # ) or croak( $template->error() );
+-
+- # push( @wkhtmltopdf_args,
+- # 'cover', "$tmp_dir/$lang/html-pdf/titlepage.html" );
+-
+- my $toc_xsl = "$tmp_dir/$lang/html-pdf/toc.xsl";
+-
+- $template->process( 'toc-xsl.tmpl', $vars, $toc_xsl,
+- binmode => ':encoding(UTF-8)' )
+- or croak( $template->error() );
+-
+-## my $toc_xsl = "$common_config/book_templates/toc.xsl";
+-## $toc_xsl = "$brand_path/book_templates/toc.xsl"
+-## if ( -f "$brand_path/book_templates/toc.xsl" );
+-
+- push(
+- @wkhtmltopdf_args,
+- 'toc',
+- '--xsl-style-sheet',
+- $toc_xsl,
+-## '--toc-header-text',
+-## decode_utf8( $locale->maketext("Table of Contents") ),
+ "$tmp_dir/$lang/html-pdf/index.html",
+ "$tmp_dir/$lang/pdf/$pdf_name"
+ );
diff --git a/nopdftest.patch b/nopdftest.patch
new file mode 100644
index 0000000..7083e90
--- /dev/null
+++ b/nopdftest.patch
@@ -0,0 +1,84 @@
+diff -u Publican-v3.1.5/t/300.Builder.t Publican-v3.1.5-patched/t/300.Builder.t
+--- Publican-v3.1.5/t/300.Builder.t 2013-03-18 15:02:57.000000000 +1000
++++ Publican-v3.1.5-patched/t/300.Builder.t 2013-03-21 08:53:32.100630154 +1000
+@@ -25,7 +25,7 @@
+ my $builder = Publican::Builder->new();
+ isa_ok( $builder, 'Publican::Builder', 'creating a Publican::Builder' );
+
+-eval { $builder->build( { formats => "html,pdf,drupal-book", langs => "en-US" } ) };
++eval { $builder->build( { formats => "html,drupal-book", langs => "en-US" } ) };
+ my $e = $@;
+ ok( ( not $e ), "build a book" );
+ diag($e) if $e;
+diff -u Publican-v3.1.5/t/900.publican.t Publican-v3.1.5-patched/t/900.publican.t
+--- Publican-v3.1.5/t/900.publican.t 2013-03-18 15:02:57.000000000 +1000
++++ Publican-v3.1.5-patched/t/900.publican.t 2013-03-21 10:53:22.516102963 +1000
+@@ -68,7 +68,7 @@
+
+
+ is( system(
+- qq{perl -CA $coverdb -I $lib $publican build --formats=html,pdf --langs=en-US $common_opts --publish}
++ qq{perl -CA $coverdb -I $lib $publican build --formats=html --langs=en-US $common_opts --publish}
+ ),
+ 0,
+ 'publish a book'
+diff -u Publican-v3.1.5/t/910.publican.Users_Guide.t Publican-v3.1.5-patched/t/910.publican.Users_Guide.t
+--- Publican-v3.1.5/t/910.publican.Users_Guide.t 2013-03-18 15:02:57.000000000 +1000
++++ Publican-v3.1.5-patched/t/910.publican.Users_Guide.t 2013-03-21 08:54:00.731632037 +1000
+@@ -50,7 +50,7 @@
+
+ $result
+ = system( @perl_args, $publican, 'build', '--formats',
+- 'html,html-single,html-desktop,pdf,txt,eclipse,epub,drupal-book',
++ 'html,html-single,html-desktop,txt,eclipse,epub,drupal-book',
+ '--langs', 'en-US', '--publish', @common_opts );
+
+ is( $result, 0, 'build the Users Guide in all formats' );
+diff -u Publican-v3.1.5/t/920.WebSite.t Publican-v3.1.5-patched/t/920.WebSite.t
+--- Publican-v3.1.5/t/920.WebSite.t 2013-03-18 15:02:58.000000000 +1000
++++ Publican-v3.1.5-patched/t/920.WebSite.t 2013-03-21 14:04:57.665858832 +1000
+@@ -1,7 +1,7 @@
+ use strict;
+ use warnings;
+
+-use Test::More tests => 8;
++use Test::More tests => 6;
+ use File::pushd;
+ use File::Path;
+
+@@ -52,24 +52,24 @@
+
+ my $site_config = abs_path('foo3/foomaster.cfg');
+
+-$dir = pushd('Users_Guide');
++# $dir = pushd('Users_Guide');
+
+-$result
+- = system( @perl_args, $publican, 'install_book', '--site_config', $site_config, '--lang',
+- 'en-US', @common_opts );
+-is( $result, 0, 'install the Users Guide on the website' );
+-
+-$result = system( @perl_args, $publican, 'remove_book', '--site_config', $site_config, '--lang',
+- 'en-US', @common_opts );
+-is( $result, 0, 'remove the Users Guide on the website' );
++# $result
++# = system( @perl_args, $publican, 'install_book', '--site_config', $site_config, '--lang',
++# 'en-US', @common_opts );
++# is( $result, 0, 'install the Users Guide on the website' );
++
++# $result = system( @perl_args, $publican, 'remove_book', '--site_config', $site_config, '--lang',
++# 'en-US', @common_opts );
++# is( $result, 0, 'remove the Users Guide on the website' );
+
+ $dir = undef;
+
+ $result = system( @perl_args, $publican, 'site_stats', '--site_config', $site_config,
+- @common_opts );
++ @common_opts );
+ is( $result, 0, 'report on the content of a Website' );
+
+ $result = system( @perl_args, $publican, 'update_site', '--site_config', $site_config,
+- @common_opts );
++ @common_opts );
+ is( $result, 0, 'refresh the website structure' );
+
diff --git a/publican.spec b/publican.spec
index 91fd4ec..939c6a5 100644
--- a/publican.spec
+++ b/publican.spec
@@ -10,13 +10,13 @@
# required for desktop file install
%define my_vendor %(test %{OTHER} == 1 && echo "fedora" || echo "redhat")
-%define TESTS 0
+%define TESTS 1
%define brand common
%define wwwdir /var/www/html/docs
Name: publican
-Version: 3.0.0
-Release: 0%{?dist}
+Version: 3.1.5
+Release: 1%{?dist}
Summary: Common files and scripts for publishing with DocBook XML
# For a breakdown of the licensing, refer to LICENSE
License: (GPLv2+ or Artistic) and CC0
@@ -42,7 +42,7 @@ BuildRequires: perl(Test::Pod) => 1.14
BuildRequires: perl(Test::Pod::Coverage) => 1.04
BuildRequires: perl(Archive::Tar)
BuildRequires: perl(Archive::Zip)
-BuildRequires: perl(Locale::Maketext::Gettext)
+BuildRequires: perl(Locale::Maketext::Gettext) >= 1.27-1.2
BuildRequires: perl(Carp)
BuildRequires: perl(Config::Simple)
BuildRequires: perl(Cwd)
@@ -84,18 +84,20 @@ BuildRequires: perl(XML::LibXML) => 1.67
BuildRequires: perl(XML::LibXSLT) => 1.67
BuildRequires: perl(XML::Simple)
BuildRequires: perl(XML::TreeBuilder) => 4.0
-BuildRequires: wkhtmltopdf
-BuildRequires: docbook-style-xsl >= 1.76.1
+BuildRequires: wkhtmltopdf >= 0.10.0_rc2-5
+BuildRequires: docbook-style-xsl >= 1.77.1
BuildRequires: desktop-file-utils
BuildRequires: gettext
BuildRequires: perl(Text::CSV_XS)
+BuildRequires: perl(Sort::Versions)
+BuildRequires: perl(DBD::SQLite)
# Most of these are handled automatically
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
-Requires: perl(Locale::Maketext::Gettext)
-Requires: wkhtmltopdf
+Requires: perl(Locale::Maketext::Gettext) >= 1.27-1.2
+Requires: wkhtmltopdf >= 0.10.0_rc2-5
Requires: rpm-build
-Requires: docbook-style-xsl >= 1.76.1
+Requires: docbook-style-xsl >= 1.77.1
Requires: perl(XML::LibXML) >= 1.67
Requires: perl(XML::LibXSLT) >= 1.67
Requires: perl(XML::TreeBuilder) >= 4.0
@@ -118,7 +120,7 @@ Requires: lohit-malayalam-fonts lohit-marathi-fonts lohit-nepali-fonts
Requires: lohit-oriya-fonts lohit-punjabi-fonts lohit-sindhi-fonts
Requires: lohit-tamil-fonts lohit-telugu-fonts dejavu-lgc-sans-mono-fonts
Requires: dejavu-fonts-common dejavu-serif-fonts dejavu-sans-fonts
-Requires: dejavu-sans-mono-fonts
+Requires: dejavu-sans-mono-fonts overpass-fonts
BuildRequires: liberation-mono-fonts liberation-sans-fonts liberation-serif-fonts
BuildRequires: cjkuni-uming-fonts ipa-gothic-fonts ipa-pgothic-fonts
@@ -127,13 +129,17 @@ BuildRequires: lklug-fonts baekmuk-ttf-batang-fonts
%if %{OTHER}
Requires: liberation-mono-fonts liberation-sans-fonts liberation-serif-fonts
Requires: cjkuni-uming-fonts ipa-gothic-fonts ipa-pgothic-fonts
-Requires: lklug-fonts baekmuk-ttf-batang-fonts
+Requires: lklug-fonts baekmuk-ttf-batang-fonts overpass-fonts
BuildRequires: liberation-mono-fonts liberation-sans-fonts liberation-serif-fonts
BuildRequires: cjkuni-uming-fonts ipa-gothic-fonts ipa-pgothic-fonts
BuildRequires: lklug-fonts baekmuk-ttf-batang-fonts
%endif
+Patch0: xsl-newlines-315.patch
+Patch1: nopdfcover.patch
+Patch2: nopdftest.patch
+
%description
Publican is a DocBook publication system, not just a DocBook processing tool.
As well as ensuring your DocBook XML is valid, publican works to ensure
@@ -161,10 +167,13 @@ Website style for common brand.
%prep
%setup -q -n Publican-v%{version}
+%patch0 -p 1
+%patch1 -p 1
+%patch2 -p 1
%build
%{__perl} Build.PL installdirs=vendor --nocolours=1
-./Build
+./Build --nocolours=1
dir=`pwd` && cd Users_Guide && %{__perl} -CA -I $dir/blib/lib $dir/blib/script/publican build \
--formats=html-desktop --publish --langs=all \
--common_config="$dir/blib/datadir" \
@@ -200,7 +209,7 @@ cd -
%check
%if %{TESTS}
-./Build test
+./Build --nocolours=1 test
%endif
%post
@@ -224,7 +233,7 @@ rm -rf $RPM_BUILD_ROOT
%defattr(-,root,root,-)
%doc Changes README COPYING Artistic pod1/publican
%{perl_vendorlib}/Publican.pm
-%{perl_vendorlib}/Publican/*
+%{perl_vendorlib}/Publican
%{_mandir}/man3/Publican*
%{_mandir}/man1/*
%{_bindir}/publican
@@ -247,6 +256,47 @@ rm -rf $RPM_BUILD_ROOT
%changelog
+* Wed Mar 20 2013 RĂ¼diger Landmann <rlandmann at redhat.com> 3.1.5-1
+- patch for XSL newlines broken in F18 and newer
+- patch for PDFs built with wkhtmltopdf built against system QT
+- patch to suppress PDF tests in Koji without X
+
+* Mon Mar 18 2013 Jeff Fearn <jfearn at redhat.com> 3.1.5-0
+- Fix translated PDS encode issue when build from packaged books.
+
+* Tue Mar 12 2013 Jeff Fearn <jfearn at redhat.com> 3.1.4-0
+- Fix entities in Book_Info braking build. BZ #917898
+- add translations of "Revision History". BZ #918365
+- Fix TOC title not translated in PDF. BZ #918365
+- Fix translated strings with parameters. BZ #891166
+- update translations
+- add it-IT translation of PUG via <fedora at marionline.it> BZ #797515
+
+* Fri Feb 22 2013 Jeff Fearn <jfearn at redhat.com> 3.1.3-1
+- Fix add_revision breaking XML parser. BZ #912985
+- Stronger fix for cover pages causing page number overrun. BZ #912967
+- Fix CSS for article front page subtile. BZ #913016
+
+* Mon Feb 18 2013 Jeff Fearn <jfearn at redhat.com> 3.1.2-0
+- Fix tests failing when publican not installed. BZ #908956
+- Fix broken mr-IN/Conventions.po. BZ #908956
+- Fix footnote link unclickable. BZ #909006
+- Fix missing translations for common files. BZ #908976
+- Fix using edition for version on cover pages. BZ #912180
+- Fix nested entities causing XML::TreeBuilder to fail. BZ #912187
+
+* Thu Feb 7 2013 Jeff Fearn <jfearn at redhat.com> 3.1.1-0
+- Fix web site CSS for admonitions. BZ #908539
+
+* Mon Feb 4 2013 Jeff Fearn <jfearn at redhat.com> 3.1.0-2
+- Fix translated text
+
+* Mon Feb 4 2013 Jeff Fearn <jfearn at redhat.com> 3.1.0-1
+- Warn of failure to chmod/chown.
+
+* Fri Jan 25 2013 Jeff Fearn <jfearn at redhat.com> 3.1.0-0
+- new upstream package.
+
* Wed Oct 31 2012 Jeff Fearn <jfearn at redhat.com> 3.0.0-0
- new upstream package.
diff --git a/sources b/sources
index 84586ec..9f5fef7 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-a4327409d5d1152cd6849dc6ac51e76d Publican-v3.0.0.tar.gz
+34f6057dbc14db9aa05bf2d44d83fe9e Publican-v3.1.5.tar.gz
diff --git a/xsl-newlines-315.patch b/xsl-newlines-315.patch
new file mode 100644
index 0000000..36b3045
--- /dev/null
+++ b/xsl-newlines-315.patch
@@ -0,0 +1,60 @@
+diff -ru Publican-v3.1.5/datadir/xsl/web-spec.xsl Publican-v3.1.5-patched/datadir/xsl/web-spec.xsl
+--- Publican-v3.1.5/datadir/xsl/web-spec.xsl 2013-03-18 15:02:58.000000000 +1000
++++ Publican-v3.1.5-patched/datadir/xsl/web-spec.xsl 2013-03-20 17:05:42.000000000 +1000
+@@ -22,7 +22,8 @@
+ Release: <xsl:value-of select="$rpmrel"/>%{?dist}
+ <xsl:if test="$translation = '1'">Summary: <xsl:value-of select="$language"/> translation of <xsl:value-of select="$book-title"/>
+ Summary(<xsl:value-of select="$lang"/>): <xsl:value-of select="$full_subtitle"/></xsl:if>
+-<xsl:if test="$translation != '1'">Summary: <xsl:value-of select="$full_subtitle"/></xsl:if>
++<xsl:if test="$translation != '1'">
++Summary: <xsl:value-of select="$full_subtitle"/></xsl:if>
+ Group: Documentation
+ License: <xsl:value-of select="$license"/>
+ URL: <xsl:value-of select="$url"/>
+@@ -32,15 +33,20 @@
+ BuildRequires: publican >= <xsl:value-of select="$spec_version"/>
+ BuildRequires: desktop-file-utils
+ Requires: publican >= <xsl:value-of select="$spec_version"/>
+-<xsl:if test="$brand != 'publican-common'">BuildRequires: <xsl:value-of select="$brand"/></xsl:if>
+-<xsl:if test="$web_obsoletes != ''">Obsoletes: <xsl:value-of select="$web_obsoletes"/></xsl:if>
+-<xsl:if test="$web_req != ''">Requires: <xsl:value-of select="$web_req"/></xsl:if>
++<xsl:if test="$brand != 'publican-common'">
++BuildRequires: <xsl:value-of select="$brand"/></xsl:if>
++<xsl:if test="$web_obsoletes != ''">
++Obsoletes: <xsl:value-of select="$web_obsoletes"/></xsl:if>
++<xsl:if test="$web_req != ''">
++Requires: <xsl:value-of select="$web_req"/></xsl:if>
+ Requires: <xsl:value-of select="$brand"/>-web
+
+ %description
+ <xsl:if test="$translation = '1'"><xsl:value-of select="$language"/> translation of <xsl:value-of select="$book-title"/>
+
+ %description -l <xsl:value-of select="$lang"/> </xsl:if>
++<xsl:text>
++</xsl:text>
+ <xsl:value-of select="$abstract" />
+
+ %package -n <xsl:value-of select="$book-title"/>-<xsl:value-of select="$lang"/>
+@@ -57,13 +63,18 @@
+ %else
+ Requires: xdg-utils
+ %endif
+-<xsl:if test="$dt_obsoletes != ''">Obsoletes: <xsl:value-of select="$dt_obsoletes"/></xsl:if>
+-<xsl:if test="$dt_requires != ''">Requires: <xsl:value-of select="$dt_requires"/></xsl:if>
++<xsl:if test="$dt_obsoletes != ''">
++Obsoletes: <xsl:value-of select="$dt_obsoletes"/></xsl:if>
++<xsl:if test="$dt_requires != ''">
++Requires: <xsl:value-of select="$dt_requires"/></xsl:if>
+
+ %description -n <xsl:value-of select="$book-title"/>-<xsl:value-of select="$lang"/>
+-<xsl:if test="$translation = '1'"><xsl:value-of select="$language"/> translation of <xsl:value-of select="$docname"/>
++<xsl:if test="$translation = '1'">
++<xsl:text>
++</xsl:text>
++<xsl:value-of select="$language"/> translation of <xsl:value-of select="$docname"/>
+
+-%description -l <xsl:value-of select="$lang"/> -n <xsl:value-of select="$book-title"/>-<xsl:value-of select="$lang"/> </xsl:if>
++%description -l <xsl:value-of select="$lang"/> -n <xsl:value-of select="$book-title"/>-<xsl:value-of select="$lang"/></xsl:if>
+ <xsl:text>
+ </xsl:text>
+ <xsl:value-of select="$abstract" />
More information about the scm-commits
mailing list