#!/usr/bin/make -f
MANDIR=debian/manpage
%:
dh $@
override_dh_auto_build:
dh_auto_build
docbook-to-man $(MANDIR)/goobox.en.sgml > $(MANDIR)/goobox.1
po4a -v -f debian/po4a.cfg
# po4a-translate is broken, c.f. #280882
recode utf8..latin1 $(MANDIR)/goobox.de.sgml
perl -i -p -e 's# \&dhucpackage;#\&dhucpackage;#ms' $(MANDIR)/goobox.de.sgml
perl -i -p -e 's#^\s*##' $(MANDIR)/goobox.de.sgml
recode utf8..latin1 $(MANDIR)/goobox.pt.sgml
perl -i -p -e 's# \&dhucpackage;#\&dhucpackage;#ms' $(MANDIR)/goobox.pt.sgml
perl -i -p -e 's#^\s*##' $(MANDIR)/goobox.pt.sgml
recode utf8..latin1 $(MANDIR)/goobox.fr.sgml
perl -i -p -e 's# \&dhucpackage;#\&dhucpackage;#ms' $(MANDIR)/goobox.fr.sgml
perl -i -p -e 's#^\s*##' $(MANDIR)/goobox.fr.sgml
perl -i -p -e 's# \&dhucpackage;#\&dhucpackage;#ms' $(MANDIR)/goobox.ja.sgml
perl -i -p -e 's#^\s*##' $(MANDIR)/goobox.ja.sgml
docbook-to-man $(MANDIR)/goobox.de.sgml > $(MANDIR)/goobox.de.1
docbook-to-man $(MANDIR)/goobox.pt.sgml > $(MANDIR)/goobox.pt.1
docbook-to-man $(MANDIR)/goobox.fr.sgml > $(MANDIR)/goobox.fr.1
# Call to docbook-to-man fails, but calling the programs directly suceeds, strange
# (discard the errors, they only clutter the build without use)
#docbook-to-man $(MANDIR)/goobox.ja.sgml > $(MANDIR)/goobox.ja.1
/usr/bin/onsgmls -gl -E0 -m/usr/share/sgml/docbook/dtd/4.1/docbook.cat /usr/share/sgml/docbook/dtd/4.1/docbook.dcl debian/manpage/goobox.ja.sgml 2> /dev/null | /usr/bin/instant -croff.cmap -sroff.sdata -tdocbook-to-man.ts > $(MANDIR)/goobox.ja.1
recode latin1..utf8 $(MANDIR)/goobox.de.1
recode latin1..utf8 $(MANDIR)/goobox.pt.1
recode latin1..utf8 $(MANDIR)/goobox.fr.1
# cf. #562722
#perl -i -p -e 's#SYNOPSIS#ÜBERSICHT#' debian/goobox/usr/share/man/de/man1/goobox.1
perl -i -p -e 's#SYNOPSIS#ÜBERSICHT#' $(MANDIR)/goobox.de.1
override_dh_auto_install:
dh_auto_install
# Installing pixmap
install -D -m 0644 debian/pixmap/goobox.xpm debian/goobox/usr/share/pixmaps/goobox.xpm
# Install logcheck pattern
install -D -m 0644 debian/logcheck debian/goobox/etc/logcheck/ignore.d.workstation/goobox