2024-01-06 10:34:51 +01:00
|
|
|
%define with_test 0
|
2024-01-06 10:34:51 +01:00
|
|
|
%define DBPATH %(find /usr/share/sgml/docbook/xml-dtd-4.5*/dbcentx.mod)
|
|
|
|
%define wwwdir /var/www/html/docs
|
|
|
|
|
2024-01-06 10:34:51 +01:00
|
|
|
Name: publican
|
2024-01-06 10:34:51 +01:00
|
|
|
Version: 4.3.2
|
|
|
|
Release: 1mamba
|
2024-01-06 10:34:51 +01:00
|
|
|
Summary: Common files and scripts for publishing with DocBook XML
|
|
|
|
Group: Applications/Text
|
|
|
|
Vendor: openmamba
|
|
|
|
Distribution: openmamba
|
|
|
|
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
|
2024-01-06 10:34:51 +01:00
|
|
|
URL: https://sourceware.org/publican/
|
|
|
|
Source: https://sourceware.org/publican/releases/Publican-v%{version}.tar.gz
|
2024-01-06 10:34:51 +01:00
|
|
|
Patch0: publican-2.8-fix-test-suite-perl-CA.patch
|
|
|
|
License: Artistic, Creative Commons License, GPL
|
|
|
|
## AUTOBUILDREQ-BEGIN
|
2024-01-06 10:34:51 +01:00
|
|
|
BuildRequires: libperl
|
2024-01-06 10:34:51 +01:00
|
|
|
BuildRequires: perl-Archive-Zip
|
|
|
|
BuildRequires: perl-Config-Simple
|
|
|
|
BuildRequires: perl-DBD-SQLite
|
|
|
|
BuildRequires: perl-DBI
|
2024-01-06 10:34:51 +01:00
|
|
|
BuildRequires: perl-DateTime
|
|
|
|
BuildRequires: perl-DateTime-Format-DateParse
|
2024-01-06 10:34:51 +01:00
|
|
|
BuildRequires: perl-File-Copy-Recursive
|
|
|
|
BuildRequires: perl-File-Find-Rule
|
2024-01-06 10:34:51 +01:00
|
|
|
BuildRequires: perl-File-Inplace
|
|
|
|
BuildRequires: perl-File-Slurp
|
2024-01-06 10:34:51 +01:00
|
|
|
BuildRequires: perl-File-Which
|
2024-01-06 10:34:51 +01:00
|
|
|
BuildRequires: perl-File-pushd
|
|
|
|
BuildRequires: perl-HTML-FormatText-WithLinks
|
|
|
|
BuildRequires: perl-HTML-FormatText-WithLinks-AndTables
|
|
|
|
BuildRequires: perl-HTML-Formatter
|
2024-01-06 10:34:51 +01:00
|
|
|
BuildRequires: perl-HTML-Tree
|
2024-01-06 10:34:51 +01:00
|
|
|
BuildRequires: perl-HTML-WikiConverter
|
2024-01-06 10:34:51 +01:00
|
|
|
BuildRequires: perl-IO-String
|
|
|
|
BuildRequires: perl-Locale-Maketext-Gettext
|
|
|
|
BuildRequires: perl-Locale-PO
|
2024-01-06 10:34:51 +01:00
|
|
|
BuildRequires: perl-Sort-Versions
|
|
|
|
BuildRequires: perl-String-Similarity
|
2024-01-06 10:34:51 +01:00
|
|
|
BuildRequires: perl-Syntax-Highlight-Engine-Kate
|
|
|
|
BuildRequires: perl-Template-Toolkit
|
2024-01-06 10:34:51 +01:00
|
|
|
BuildRequires: perl-Text-CSV_XS
|
2024-01-06 10:34:51 +01:00
|
|
|
BuildRequires: perl-XML-LibXML
|
|
|
|
BuildRequires: perl-XML-LibXSLT
|
|
|
|
BuildRequires: perl-XML-Simple
|
|
|
|
BuildRequires: perl-XML-TreeBuilder
|
2024-01-06 10:34:51 +01:00
|
|
|
BuildRequires: perl-devel
|
2024-01-06 10:34:51 +01:00
|
|
|
## AUTOBUILDREQ-END
|
2024-01-06 10:34:51 +01:00
|
|
|
BuildRequires: perl(HTML::WikiConverter::Markdown)
|
|
|
|
BuildRequires: perl(Lingua::EN::Fathom)
|
|
|
|
BuildRequires: perl(Locale::Msgfmt)
|
2024-01-06 10:34:51 +01:00
|
|
|
BuildRequires: desktop-file-utils
|
|
|
|
BuildRequires: perl-devel
|
|
|
|
BuildRequires: docbook-xsl
|
2024-01-06 10:34:51 +01:00
|
|
|
BuildRequires: docbook5-xsl
|
2024-01-06 10:34:51 +01:00
|
|
|
BuildRequires: gettext-devel
|
|
|
|
# fonts
|
|
|
|
BuildRequires: baekmuk-ttf-fonts
|
|
|
|
BuildRequires: cjkuni-ukai-ttf-fonts
|
|
|
|
BuildRequires: cjkuni-uming-ttf-fonts
|
|
|
|
BuildRequires: ipa-gothic-fonts
|
|
|
|
BuildRequires: ipa-pgothic-fonts
|
|
|
|
BuildRequires: liberation-fonts
|
|
|
|
BuildRequires: lklug-fonts
|
|
|
|
BuildRequires: sazanami-fonts
|
|
|
|
# java
|
2024-01-06 10:34:51 +01:00
|
|
|
BuildRequires: apache-fop
|
2024-01-06 10:34:51 +01:00
|
|
|
BuildRequires: apache-batik
|
|
|
|
BuildRequires: jakarta-commons-logging
|
|
|
|
BuildRequires: jakarta-commons-io
|
|
|
|
BuildRequires: java-excalibur-avalon-framework
|
2024-01-06 10:34:51 +01:00
|
|
|
BuildRequires: java-xmlgraphics-commons
|
|
|
|
BuildRequires: docbook5-xsl
|
2024-01-06 10:34:51 +01:00
|
|
|
Requires: apache-batik
|
2024-01-06 10:34:51 +01:00
|
|
|
Requires: apache-fop
|
2024-01-06 10:34:51 +01:00
|
|
|
Requires: cvs
|
|
|
|
Requires: docbook-xsl
|
2024-01-06 10:34:51 +01:00
|
|
|
Requires: docbook5-xsl
|
2024-01-06 10:34:51 +01:00
|
|
|
Requires: gettext
|
|
|
|
Requires: perl
|
|
|
|
Requires: baekmuk-ttf-fonts
|
|
|
|
Requires: cjkuni-ukai-ttf-fonts
|
|
|
|
Requires: cjkuni-uming-ttf-fonts
|
|
|
|
Requires: ipa-gothic-fonts
|
|
|
|
Requires: ipa-pgothic-fonts
|
|
|
|
Requires: liberation-fonts
|
|
|
|
Requires: lklug-fonts
|
|
|
|
Requires: sazanami-fonts
|
|
|
|
|
|
|
|
%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.
|
|
|
|
|
|
|
|
%package doc
|
|
|
|
Summary: Documentation for the Publican package
|
|
|
|
Group: Documentation
|
|
|
|
Requires: xdg-utils
|
|
|
|
|
|
|
|
%description doc
|
|
|
|
Publican is a tool for publishing material authored in DocBook XML.
|
|
|
|
This guide explains how to to create and build books and articles using publican. It is not a DocBook XML tutorial and concentrates solely on using the publican tools.
|
|
|
|
|
|
|
|
%prep
|
2024-01-06 10:34:51 +01:00
|
|
|
%setup -q -n Publican-v%{version}
|
2024-01-06 10:34:51 +01:00
|
|
|
|
|
|
|
%build
|
2024-01-06 10:34:51 +01:00
|
|
|
# From internal spec file
|
|
|
|
sed -i -e 's,PATH,%{DBPATH},g' catalog
|
|
|
|
XML_CATALOG_FILES=$dir/catalog %{__perl} Build.PL installdirs=vendor --nocolours=1
|
|
|
|
|
|
|
|
XML_CATALOG_FILES=$dir/catalog ./Build --nocolours=1
|
|
|
|
dir=`pwd`
|
|
|
|
|
|
|
|
cd Users_Guide && XML_CATALOG_FILES=$dir/catalog %{__perl} -CDAS -I $dir/blib/lib $dir/blib/script/publican build \
|
|
|
|
--formats=html-desktop --publish --langs=en-US \
|
|
|
|
--common_config="$dir/blib/datadir" \
|
|
|
|
--common_content="$dir/blib/datadir/Common_Content" --nocolours
|
2024-01-06 10:34:51 +01:00
|
|
|
|
2024-01-06 10:34:51 +01:00
|
|
|
cd $dir
|
|
|
|
|
|
|
|
cd Release_Notes && XML_CATALOG_FILES=$dir/catalog %{__perl} -CDAS -I $dir/blib/lib $dir/blib/script/publican build \
|
|
|
|
--formats=html-desktop --publish --langs=en-US \
|
|
|
|
--common_config="$dir/blib/datadir" \
|
|
|
|
--common_content="$dir/blib/datadir/Common_Content" --nocolours
|
2024-01-06 10:34:51 +01:00
|
|
|
|
|
|
|
%install
|
|
|
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
2024-01-06 10:34:51 +01:00
|
|
|
dir=`pwd`
|
2024-01-06 10:34:51 +01:00
|
|
|
|
2024-01-06 10:34:51 +01:00
|
|
|
XML_CATALOG_FILES=$dir/catalog ./Build install destdir=%{buildroot} create_packlist=0
|
2024-01-06 10:34:51 +01:00
|
|
|
find %{buildroot} -depth -type d -exec rmdir {} 2>/dev/null \;
|
|
|
|
|
2024-01-06 10:34:51 +01:00
|
|
|
%{_fixperms} %{buildroot}/*
|
2024-01-06 10:34:51 +01:00
|
|
|
|
2024-01-06 10:34:51 +01:00
|
|
|
sed -i -e 's|@@FILE@@|%{_docdir}/%{name}-doc%{!?_docdir_fmt:-%{version}}/en-US/index.html|' %{name}.desktop
|
|
|
|
sed -i -e 's|@@ICON@@|%{_docdir}/%{name}-doc%{!?_docdir_fmt:-%{version}}/en-US/images/icon.svg|' %{name}.desktop
|
|
|
|
sed -i -e 's|@@FILE@@|%{_docdir}/%{name}-releasenotes%{!?_docdir_fmt:-%{version}}/en-US/index.html|' %{name}-releasenotes.desktop
|
|
|
|
sed -i -e 's|@@ICON@@|%{_docdir}/%{name}-releasenotes%{!?_docdir_fmt:-%{version}}/en-US/images/icon.svg|' %{name}-releasenotes.desktop
|
2024-01-06 10:34:51 +01:00
|
|
|
|
2024-01-06 10:34:51 +01:00
|
|
|
desktop-file-install --vendor="openmamba" --dir=%{buildroot}%{_datadir}/applications %{name}.desktop
|
|
|
|
desktop-file-install --vendor="openmamba" --dir=%{buildroot}%{_datadir}/applications %{name}-releasenotes.desktop
|
2024-01-06 10:34:51 +01:00
|
|
|
|
2024-01-06 10:34:51 +01:00
|
|
|
%find_lang %{name} --with-man
|
2024-01-06 10:34:51 +01:00
|
|
|
|
2024-01-06 10:34:51 +01:00
|
|
|
# Package web common files
|
|
|
|
mkdir -p -m755 %{buildroot}/%{wwwdir}/common
|
|
|
|
dir=`pwd`
|
|
|
|
cd datadir/Common_Content/common
|
|
|
|
XML_CATALOG_FILES=$dir/catalog %{__perl} -CDAS -I $dir/blib/lib $dir/blib/script/publican install_brand --web --path=%{buildroot}/%{wwwdir}/common
|
|
|
|
cd -
|
|
|
|
mkdir -p -m755 %{buildroot}/%{wwwdir}/common-db5
|
|
|
|
cd datadir/Common_Content/common-db5
|
|
|
|
XML_CATALOG_FILES=$dir/catalog %{__perl} -CDAS -I $dir/blib/lib $dir/blib/script/publican install_brand --web --path=%{buildroot}/%{wwwdir}/common-db5
|
|
|
|
cd -
|
2024-01-06 10:34:51 +01:00
|
|
|
|
|
|
|
%find_lang %{name}
|
|
|
|
|
|
|
|
%if %with_test
|
|
|
|
%check
|
|
|
|
./Build test
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%clean
|
|
|
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
|
|
|
|
|
|
|
%files -f %{name}.lang
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/publican-website.cfg
|
|
|
|
%config(noreplace) %{_sysconfdir}/bash_completion.d/_publican
|
2024-01-06 10:34:51 +01:00
|
|
|
%{_bindir}/db4-2-db5
|
|
|
|
%{_bindir}/db5-valid
|
2024-01-06 10:34:51 +01:00
|
|
|
%{_bindir}/publican
|
|
|
|
%dir %{_datadir}/publican
|
|
|
|
%config(noreplace) %{_datadir}/publican/default.db
|
2024-01-06 10:34:51 +01:00
|
|
|
%{_datadir}/publican/rpmlint.cfg
|
2024-01-06 10:34:51 +01:00
|
|
|
%{_datadir}/publican/Common_Content
|
2024-01-06 10:34:51 +01:00
|
|
|
%{_datadir}/publican/book_templates
|
2024-01-06 10:34:51 +01:00
|
|
|
%{_datadir}/publican/fop
|
2024-01-06 10:34:51 +01:00
|
|
|
%{_datadir}/publican/rpm_templates
|
2024-01-06 10:34:51 +01:00
|
|
|
%{_datadir}/publican/sitetemplate
|
|
|
|
%{_datadir}/publican/templates
|
|
|
|
%{_datadir}/publican/xsl
|
|
|
|
%{perl_vendorlib}/Publican.pm
|
|
|
|
%{perl_vendorlib}/Publican/*
|
2024-01-06 10:34:51 +01:00
|
|
|
%{_datadir}/applications/openmamba-publican-releasenotes.desktop
|
|
|
|
%{_datadir}/applications/openmamba-publican.desktop
|
2024-01-06 10:34:51 +01:00
|
|
|
%{_mandir}/man3/*.3pm.gz
|
2024-01-06 10:34:51 +01:00
|
|
|
%{_mandir}/man1/publican.1*
|
2024-01-06 10:34:51 +01:00
|
|
|
%doc Artistic COPYING LICENSE
|
|
|
|
|
|
|
|
%files doc
|
|
|
|
%defattr(-,root,root)
|
2024-01-06 10:34:51 +01:00
|
|
|
/%{wwwdir}/common
|
|
|
|
/%{wwwdir}/common-db5
|
2024-01-06 10:34:51 +01:00
|
|
|
%doc fdl.txt Users_Guide/publish/desktop/*
|
2024-01-06 10:34:51 +01:00
|
|
|
%doc README
|
2024-01-06 10:34:51 +01:00
|
|
|
|
|
|
|
%changelog
|
2024-01-06 10:34:51 +01:00
|
|
|
* Wed May 19 2021 Automatic Build System <autodist@mambasoft.it> 4.3.2-1mamba
|
|
|
|
- automatic version update by autodist
|
|
|
|
|
2024-01-06 10:34:51 +01:00
|
|
|
* Sat Mar 30 2013 Silvan Calarco <silvan.calarco@mambasoft.it> 2.8-3mamba
|
|
|
|
- don't depend on perl minor release; call /usr/bin/perl
|
|
|
|
|
|
|
|
* Thu Jan 24 2013 Silvan Calarco <silvan.calarco@mambasoft.it> 2.8-2mamba
|
|
|
|
- rebuilt with apache-fop 0.95
|
|
|
|
|
|
|
|
* Wed Jan 23 2013 Automatic Build System <autodist@mambasoft.it> 2.8-1mamba
|
|
|
|
- automatic version update by autodist
|
|
|
|
|
|
|
|
* Wed Feb 16 2011 gil <puntogil@libero.it> 2.5-1mamba
|
|
|
|
- package created by autospec
|