#!/usr/bin/make -f # See debhelper(7) (uncomment to enable) # output every command that modifies files on the build system. #export DH_VERBOSE = 1 %: dh $@ PKG_VERSION = $(shell dpkg-parsechangelog|sed -n 's/^Version: \(.*:\|\)//p') override_dh_auto_build: # Update package version in documentation sed -e 's/%PKG_VERSION%/$(PKG_VERSION)/g' doc/carnet-upgrade-src.sgml \ > doc/carnet-upgrade.sgml # Build txt docs (cd doc; debiandoc2text -l hr_HR.UTF-8 carnet-upgrade.sgml) # Build one page html docs rm -rf doc/carnet-upgrade.html (cd doc; debiandoc2html -l hr_HR.UTF-8 -1 carnet-upgrade.sgml) mv doc/carnet-upgrade.html/index.html doc/index.html rmdir doc/carnet-upgrade.html mv doc/index.html doc/carnet-upgrade.html # Build pdf docs (cd doc; debiandoc2pdf -l hr_HR.UTF-8 -s ../debian/fix_latex carnet-upgrade.sgml) rm doc/carnet-upgrade.tpt override_dh_install: dh_install # Update package version in source sed -i -e 's/%PKG_VERSION%/$(PKG_VERSION)/g' \ debian/carnet-upgrade/usr/share/carnet-upgrade/cn-upgrade # Remove documentation template rm -f debian/carnet-upgrade/usr/share/doc/carnet-upgrade/carnet-upgrade-src.sgml