publican/publican.spec

214 lines
7.4 KiB
RPMSpec
Raw Permalink Normal View History

%define with_test 0
%define DBPATH %(find /usr/share/sgml/docbook/xml-dtd-4.5*/dbcentx.mod)
%define wwwdir /var/www/html/docs
Name: publican
Version: 4.3.2
Release: 1mamba
Summary: Common files and scripts for publishing with DocBook XML
Group: Applications/Text
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: https://sourceware.org/publican/
Source: https://sourceware.org/publican/releases/Publican-v%{version}.tar.gz
Patch0: publican-2.8-fix-test-suite-perl-CA.patch
License: Artistic, Creative Commons License, GPL
## AUTOBUILDREQ-BEGIN
BuildRequires: libperl
BuildRequires: perl-Archive-Zip
BuildRequires: perl-Config-Simple
BuildRequires: perl-DBD-SQLite
BuildRequires: perl-DBI
BuildRequires: perl-DateTime
BuildRequires: perl-DateTime-Format-DateParse
BuildRequires: perl-File-Copy-Recursive
BuildRequires: perl-File-Find-Rule
BuildRequires: perl-File-Inplace
BuildRequires: perl-File-Slurp
BuildRequires: perl-File-Which
BuildRequires: perl-File-pushd
BuildRequires: perl-HTML-FormatText-WithLinks
BuildRequires: perl-HTML-FormatText-WithLinks-AndTables
BuildRequires: perl-HTML-Formatter
BuildRequires: perl-HTML-Tree
BuildRequires: perl-HTML-WikiConverter
BuildRequires: perl-IO-String
BuildRequires: perl-Locale-Maketext-Gettext
BuildRequires: perl-Locale-PO
BuildRequires: perl-Sort-Versions
BuildRequires: perl-String-Similarity
BuildRequires: perl-Syntax-Highlight-Engine-Kate
BuildRequires: perl-Template-Toolkit
BuildRequires: perl-Text-CSV_XS
BuildRequires: perl-XML-LibXML
BuildRequires: perl-XML-LibXSLT
BuildRequires: perl-XML-Simple
BuildRequires: perl-XML-TreeBuilder
BuildRequires: perl-devel
## AUTOBUILDREQ-END
BuildRequires: perl(HTML::WikiConverter::Markdown)
BuildRequires: perl(Lingua::EN::Fathom)
BuildRequires: perl(Locale::Msgfmt)
BuildRequires: desktop-file-utils
BuildRequires: perl-devel
BuildRequires: docbook-xsl
BuildRequires: docbook5-xsl
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
BuildRequires: apache-fop
BuildRequires: apache-batik
BuildRequires: jakarta-commons-logging
BuildRequires: jakarta-commons-io
BuildRequires: java-excalibur-avalon-framework
BuildRequires: java-xmlgraphics-commons
BuildRequires: docbook5-xsl
Requires: apache-batik
Requires: apache-fop
Requires: cvs
Requires: docbook-xsl
Requires: docbook5-xsl
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
%setup -q -n Publican-v%{version}
%build
# 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
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
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
dir=`pwd`
XML_CATALOG_FILES=$dir/catalog ./Build install destdir=%{buildroot} create_packlist=0
find %{buildroot} -depth -type d -exec rmdir {} 2>/dev/null \;
%{_fixperms} %{buildroot}/*
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
desktop-file-install --vendor="openmamba" --dir=%{buildroot}%{_datadir}/applications %{name}.desktop
desktop-file-install --vendor="openmamba" --dir=%{buildroot}%{_datadir}/applications %{name}-releasenotes.desktop
%find_lang %{name} --with-man
# 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 -
%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
%{_bindir}/db4-2-db5
%{_bindir}/db5-valid
%{_bindir}/publican
%dir %{_datadir}/publican
%config(noreplace) %{_datadir}/publican/default.db
%{_datadir}/publican/rpmlint.cfg
%{_datadir}/publican/Common_Content
%{_datadir}/publican/book_templates
%{_datadir}/publican/fop
%{_datadir}/publican/rpm_templates
%{_datadir}/publican/sitetemplate
%{_datadir}/publican/templates
%{_datadir}/publican/xsl
%{perl_vendorlib}/Publican.pm
%{perl_vendorlib}/Publican/*
%{_datadir}/applications/openmamba-publican-releasenotes.desktop
%{_datadir}/applications/openmamba-publican.desktop
%{_mandir}/man3/*.3pm.gz
%{_mandir}/man1/publican.1*
%doc Artistic COPYING LICENSE
%files doc
%defattr(-,root,root)
/%{wwwdir}/common
/%{wwwdir}/common-db5
%doc fdl.txt Users_Guide/publish/desktop/*
%doc README
%changelog
* Wed May 19 2021 Automatic Build System <autodist@mambasoft.it> 4.3.2-1mamba
- automatic version update by autodist
* 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