daps/daps.spec

143 lines
4.9 KiB
RPMSpec

Name: daps
Version: 3.0.0
Release: 1mamba
Summary: DocBook Authoring and Publishing Suite
Group: Applications/Publishing
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: https://daps.sourceforge.net/
Source: https://github.com/openSUSE/daps.git/%{version}/daps-%{version}.tar.bz2
License: GPL
## AUTOBUILDREQ-BEGIN
BuildRequires: libperl
BuildRequires: perl-Config-IniFiles
BuildRequires: perl-File-Copy-Recursive
BuildRequires: perl-File-Rsync
BuildRequires: perl-devel
## AUTOBUILDREQ-END
Requires(post): libxml2-utils
Requires(post): xml-common
Requires(post): docbook-xsl
Requires(post): docbook-dtds
Requires: apache-fop
Requires: perl-Image-ExifTool
%description
A DocBook Authoring and Publishing Suite.
%prep
%setup -q
%build
%configure \
--disable-edit-rootcatalog
%make
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%makeinstall
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%post
if [ $1 -ge 1 ]; then
{ sed '/<\/catalog>/d' /etc/xml/catalog; \
/usr/bin/xmllint --nocatalogs --format %{_sysconfdir}/xml/for-catalog-daps.xml | \
awk '/<\/catalog>/{next} s == 1 {print} /<catalog/{s=1} \
END{print "</catalog>"}'; } > %{_sysconfdir}/xml/catalog.2t9kL
chmod --reference=%{_sysconfdir}/xml/catalog %{_sysconfdir}/xml/catalog.2t9kL
mv %{_sysconfdir}/xml/catalog.2t9kL %{_sysconfdir}/xml/catalog
# From docbook-xsl post script
CATALOG=/etc/xml/catalog
[ -e $CATALOG ] || /usr/bin/xmlcatalog --noout --create $CATALOG
/usr/bin/xmlcatalog --noout --add "rewriteSystem" \
"http://docbook.sourceforge.net/release/xsl/1.78.1" \
"file:///usr/share/sgml/docbook/xsl-stylesheets-1.78.1" $CATALOG
/usr/bin/xmlcatalog --noout --add "rewriteURI" \
"http://docbook.sourceforge.net/release/xsl/1.78.1" \
"file:///usr/share/sgml/docbook/xsl-stylesheets-1.78.1" $CATALOG
/usr/bin/xmlcatalog --noout --add "rewriteSystem" \
"http://docbook.sourceforge.net/release/xsl/current" \
"file:///usr/share/sgml/docbook/xsl-stylesheets-1.78.1" $CATALOG
/usr/bin/xmlcatalog --noout --add "rewriteURI" \
"http://docbook.sourceforge.net/release/xsl/current" \
"file:///usr/share/sgml/docbook/xsl-stylesheets-1.78.1" $CATALOG
fi
:
%postun
if [ $1 -eq 0 ]; then
/usr/bin/xmllint --nocatalogs --format %{_sysconfdir}/xml/catalog | \
awk "/<\/group>/ && s == 1 {s=0;next} s == 1 {next} /<group id=\"daps\">/{s=1;next} {print}" > %{_sysconfdir}/xml/catalog.1CGk0
chmod --reference=%{_sysconfdir}/xml/catalog %{_sysconfdir}/xml/catalog.1CGk0
mv %{_sysconfdir}/xml/catalog.1CGk0 %{_sysconfdir}/xml/catalog
# From docbook-xsl post script
CATALOG=/etc/xml/catalog
[ -e $CATALOG ] || /usr/bin/xmlcatalog --noout --create $CATALOG
/usr/bin/xmlcatalog --noout --add "rewriteSystem" \
"http://docbook.sourceforge.net/release/xsl/1.78.1" \
"file:///usr/share/sgml/docbook/xsl-stylesheets-1.78.1" $CATALOG
/usr/bin/xmlcatalog --noout --add "rewriteURI" \
"http://docbook.sourceforge.net/release/xsl/1.78.1" \
"file:///usr/share/sgml/docbook/xsl-stylesheets-1.78.1" $CATALOG
/usr/bin/xmlcatalog --noout --add "rewriteSystem" \
"http://docbook.sourceforge.net/release/xsl/current" \
"file:///usr/share/sgml/docbook/xsl-stylesheets-1.78.1" $CATALOG
/usr/bin/xmlcatalog --noout --add "rewriteURI" \
"http://docbook.sourceforge.net/release/xsl/current" \
"file:///usr/share/sgml/docbook/xsl-stylesheets-1.78.1" $CATALOG
fi
:
%files
%defattr(-,root,root)
%dir %{_sysconfdir}/daps
%config(noreplace) %{_sysconfdir}/daps/config
%{_sysconfdir}/daps/CatalogManager.properties
%{_sysconfdir}/daps/docbook-xmlformat.conf
%dir %{_sysconfdir}/daps/fop
%{_sysconfdir}/daps/fop/fop-daps.xml
%dir %{_sysconfdir}/daps/xep
%dir %{_sysconfdir}/daps/xep/hyphen
%{_sysconfdir}/daps/xep/hyphen/*
%{_sysconfdir}/daps/xep/xep-daps.xml
%{_sysconfdir}/xml/catalog.d/daps.xml
%{_bindir}/ccecho
%{_bindir}/daps*
%{_datadir}/xml/daps/schema/daps-autobuild.rnc
%dir %{_datadir}/daps
%dir %{_datadir}/daps/daps-xslt
%{_datadir}/daps/daps-xslt/*
%dir %{_datadir}/daps/init_templates
%{_datadir}/daps/init_templates/*
%dir %{_datadir}/daps/lib
%{_datadir}/daps/lib/*
%dir %{_datadir}/daps/libexec
%{_datadir}/daps/libexec/*
%dir %{_datadir}/daps/make
%{_datadir}/daps/make/*.mk
%dir %{_datadir}/doc/daps/
%{_datadir}/doc/daps/*
%{_datadir}/bash-completion/completions/daps
%{_datadir}/emacs/site-lisp/docbook_macros.el
%{_mandir}/man1/ccecho.1*
%{_mandir}/man1/daps*.1*
%doc AUTHORS COPYING
%changelog
* Wed Feb 10 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 3.0.0-1mamba
- update to 3.0.0
* Fri May 02 2014 Silvan Calarco <silvan.calarco@mambasoft.it> 1.1.5-2mamba
- require exiftool (from perl-Image-ExifTool)
* Wed Apr 30 2014 Silvan Calarco <silvan.calarco@mambasoft.it> 1.1.5-1mamba
- package created using the webbuild interface