[packages/publican] - new - spec patch to fix generated specs - test patch with one change making closer not to BR: self

qboosh qboosh at pld-linux.org
Thu Nov 1 19:41:09 CET 2012


commit 42d3ece6ff2361a57acb7dfdd9016bc49c733926
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Thu Nov 1 19:41:51 2012 +0100

    - new
    - spec patch to fix generated specs
    - test patch with one change making closer not to BR: self for tests
      (another change is needed, but it requires adding web templates dir option to publican)

 publican-spec.patch |  11 +++
 publican-test.patch |  18 +++++
 publican.spec       | 198 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 227 insertions(+)
---
diff --git a/publican.spec b/publican.spec
new file mode 100644
index 0000000..ae20f42
--- /dev/null
+++ b/publican.spec
@@ -0,0 +1,198 @@
+# TODO: common-web
+#
+# Conditional build:
+%bcond_without	tests	# do not perform "./Build test"
+#
+%include	/usr/lib/rpm/macros.perl
+Summary:	Publishing tool based on DocBook XML
+Summary(pl.UTF-8):	Narzędzie do publikowania, oparte na formacie Docbook XML
+Name:		publican
+Version:	3.0.0
+Release:	1
+License:	CC0 (Common Content files), GPL v2+ or Artistic v1.0 (the rest)
+Group:		Applications/Publishing/XML
+Source0:	https://fedorahosted.org/releases/p/u/publican/Publican-v%{version}.tar.gz
+# Source0-md5:	a4327409d5d1152cd6849dc6ac51e76d
+Patch0:		%{name}-test.patch
+Patch1:		%{name}-spec.patch
+URL:		https://fedorahosted.org/publican/
+BuildRequires:	perl-Archive-Tar
+BuildRequires:	perl-Archive-Zip
+BuildRequires:	perl-Config-Simple
+BuildRequires:	perl-DBI
+BuildRequires:	perl-DateTime
+BuildRequires:	perl-DateTime-Format-DateParse
+BuildRequires:	perl-Devel-Cover
+BuildRequires:	perl-Encode
+BuildRequires:	perl-File-Copy-Recursive >= 0.38
+BuildRequires:	perl-File-Find-Rule
+BuildRequires:	perl-File-Which
+BuildRequires:	perl-File-pushd
+BuildRequires:	perl-HTML-Format
+BuildRequires:	perl-HTML-FormatText-WithLinks
+BuildRequires:	perl-HTML-FormatText-WithLinks-AndTables >= 0.02
+BuildRequires:	perl-HTML-Tree
+BuildRequires:	perl-I18N-LangTags
+BuildRequires:	perl-IO-String
+BuildRequires:	perl-Locale-Maketext-Gettext
+BuildRequires:	perl-Locale-PO
+BuildRequires:	perl-Makefile-Parser
+BuildRequires:	perl-Module-Build
+BuildRequires:	perl-String-Similarity
+BuildRequires:	perl-Syntax-Highlight-Engine-Kate
+BuildRequires:	perl-Template-Toolkit
+BuildRequires:	perl-Term-ANSIColor
+BuildRequires:	perl-Text-CSV_XS
+BuildRequires:	perl-XML-LibXML >= 1.67
+BuildRequires:	perl-XML-LibXSLT >= 1.67
+BuildRequires:	perl-XML-Simple
+BuildRequires:	perl-XML-TreeBuilder >= 4.0
+BuildRequires:	perl-devel >= 1:5.8.0
+BuildRequires:	perl-version
+BuildRequires:	rpm-perlprov >= 4.1-13
+%if %{with tests}
+BuildRequires:	docbook-style-xsl >= 1.76.1
+BuildRequires:	perl-Test-Pod >= 1.14
+BuildRequires:	perl-Test-Pod-Coverage >= 1.04
+BuildRequires:	perl-Test-Simple
+# because of WEB_TEMPLATE_PATH in publican script
+BuildRequires:	publican
+BuildRequires:	wkhtmltopdf
+%endif
+Requires:	docbook-style-xsl >= 1.76.1
+Requires:	perl-File-Copy-Recursive >= 0.38
+Requires:	perl-HTML-FormatText-WithLinks-AndTables >= 0.02
+Requires:	perl-XML-LibXML >= 1.67
+Requires:	perl-XML-LibXSLT >= 1.67
+Requires:	perl-XML-TreeBuilder >= 4.0
+Requires:	wkhtmltopdf
+# to produce RPMs
+Suggests:	rpm-build
+BuildArch:	noarch
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+# FIXME
+%define		wwwdir		%{_datadir}/html/docs
+
+%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 your XML is up to publishable standard.
+
+%description -l pl.UTF-8
+Publican to docbookowy system publikacji, nie będący tylko narzędziem
+do przetwarzania DocBooka. Poza sprawdzeniem, że DocBook XML jest
+poprawny, Publican sprawdza, czy XML jest zgodny z aktualnym
+standardem publikacji.
+
+%package doc
+Summary:	Documentation for the Publican package
+Summary(pl.UTF-8):	Dokumentacja do pakietu Publican
+License:	FDL
+Group:		Documentation
+
+%description doc
+Publican is a tool for publishing material authored in DocBook XML.
+This guide explains how to create and build books and articles using
+Publican. It is not a DocBook XML tutorial and concentrates solely on
+using the Publican tools.
+
+%description doc -l pl.UTF-8
+Publican to narzędzie do tworzenia publikacji z materiałów pisanych w
+formacie DocBook XML. Ten podręcznik opisuje tworzenie książek oraz
+artykułów przy użyciu pakietu Publican. Nie jest to podręcznik do
+DocBook XML-a i skupia się wyłącznie na użyciu narzędzi z pakietu
+Publican.
+
+%package common-web
+Summary:        Website style for common brand
+Summary(pl.UTF-8):	Styl strony WWW dla ogólnego szablonu
+Group:          Documentation
+Requires:       %{name} = %{version}-%{release}
+
+%description common-web
+Website style for common brand.
+
+%description common-web -l pl.UTF-8
+Styl strony WWW dla ogólnego szablonu.
+
+%package -n bash-completion-publican
+Summary:	bash-completion for Publican
+Summary(pl.UTF-8):	Bashowe uzupełnianie parametrów dla programu Publican
+Group:		Applications/Shells
+Requires:	bash-completion
+
+%description -n bash-completion-publican
+bash-completion for Publican.
+
+%description -n bash-completion-publican -l pl.UTF-8
+Bashowe uzupełnianie parametrów dla programu Publican.
+
+%prep
+%setup -q -n Publican-v%{version}
+%patch0 -p1
+%patch1 -p1
+
+%build
+%{__perl} Build.PL \
+	installdirs=vendor \
+	--nocolours=1
+./Build
+
+%{?with_tests:./Build test}
+
+# publish Users_Guide
+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" \
+	--common_content="$dir/blib/datadir/Common_Content" \
+	--nocolours
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+./Build install \
+	destdir=$RPM_BUILD_ROOT
+
+for f in po/*.po ; do
+	lang=$(basename "$f" .po)
+	install -d $RPM_BUILD_ROOT%{_datadir}/locale/$lang/LC_MESSAGES
+	msgfmt -c -v -o $RPM_BUILD_ROOT%{_datadir}/locale/$lang/LC_MESSAGES/publican.mo "$f"
+done
+
+%if 0
+install -d $RPM_BUILD_ROOT%{wwwdir}/common
+dir=$(pwd)
+cd datadir/Common_Content/common
+%{__perl} -CA -I $dir/blib/lib $dir/blib/script/publican install_brand --web --path=$RPM_BUILD_ROOT%{wwwdir}/common
+%endif
+
+%find_lang %{name}
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files -f %{name}.lang
+%defattr(644,root,root,755)
+%doc CC0 Changes LICENSE README TODO
+%attr(755,root,root) %{_bindir}/db4-2-db5
+%attr(755,root,root) %{_bindir}/db5-valid
+%attr(755,root,root) %{_bindir}/publican
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/publican-website.cfg
+%{perl_vendorlib}/Publican.pm
+%{perl_vendorlib}/Publican
+%{_datadir}/publican
+%{_mandir}/man1/publican.1p*
+%{_mandir}/man3/Publican*.3pm*
+
+%files doc
+%defattr(644,root,root,755)
+%doc Users_Guide/publish/desktop/*
+
+%files -n bash-completion-publican
+%defattr(644,root,root,755)
+/etc/bash_completion.d/_publican
diff --git a/publican-spec.patch b/publican-spec.patch
new file mode 100644
index 0000000..d583d60
--- /dev/null
+++ b/publican-spec.patch
@@ -0,0 +1,11 @@
+--- Publican-2.8/datadir/xsl/web-spec.xsl.orig	2011-09-22 04:02:20.000000000 +0200
++++ Publican-2.8/datadir/xsl/web-spec.xsl	2012-10-31 20:48:04.972635095 +0100
+@@ -62,6 +62,8 @@
+ <xsl:if test="$translation = '1'"><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>
++<xsl:if test="$translation != '1'"><xsl:text>
++</xsl:text></xsl:if>
+ <xsl:value-of select="$abstract" />
+ 
+ %prep
diff --git a/publican-test.patch b/publican-test.patch
new file mode 100644
index 0000000..7660102
--- /dev/null
+++ b/publican-test.patch
@@ -0,0 +1,18 @@
+--- Publican-v3.0.0/t/110.CreateBrand.t.orig	2012-10-31 03:09:22.000000000 +0100
++++ Publican-v3.0.0/t/110.CreateBrand.t	2012-11-01 13:03:58.576844498 +0100
+@@ -3,6 +3,7 @@
+ 
+ use Test::More tests => 5;
+ use File::Path;
++use Cwd qw(abs_path);
+ 
+ BEGIN {
+     use_ok('Publican');
+@@ -21,6 +22,7 @@
+         = Publican::CreateBrand->new(
+         { name => 'Test_Brand', lang => 'en-US' } );
+ };
++$creator->{config}->param('common_content', abs_path("blib/datadir/Common_Content"));
+ 
+ isa_ok( $creator, 'Publican::CreateBrand',
+     'creating a Publican::CreateBrand' );
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/publican.git/commitdiff/42d3ece6ff2361a57acb7dfdd9016bc49c733926



More information about the pld-cvs-commit mailing list