3 # Sample debian/rules that uses debhelper.
4 # This file was originally written by Joey Hess and Craig Small.
5 # As a special exception, when this file is copied by dh-make into a
6 # dh-make output file, you may use that output file without restriction.
7 # This special exception was added by Craig Small in version 0.37 of dh-make.
9 # Uncomment this to turn on verbose mode.
12 # check if locale is available or use a local copy
13 ifeq ($(wildcard /usr/share/perl5/DebianDoc_SGML/Locale/hr_HR.UTF-8),)
14 perlenv = PERL5LIB=../debian/perl5
17 PKG_VERSION = $(shell dpkg-parsechangelog|sed -n 's/^Version: \(.*:\|\)//p')
21 build-stamp: doc/carnet-upgrade-src.sgml
24 # Update package version in documentation
25 sed -e 's/%PKG_VERSION%/$(PKG_VERSION)/g' doc/carnet-upgrade-src.sgml \
26 > doc/carnet-upgrade.sgml
29 (cd doc; $(perlenv) debiandoc2text -l hr_HR.UTF-8 carnet-upgrade.sgml)
31 # Build one page html docs
32 rm -rf doc/carnet-upgrade.html
33 (cd doc; $(perlenv) debiandoc2html -l hr_HR.UTF-8 \
34 -1 carnet-upgrade.sgml)
35 mv doc/carnet-upgrade.html/index.html doc/index.html
36 rmdir doc/carnet-upgrade.html
37 mv doc/index.html doc/carnet-upgrade.html
40 (cd doc; $(perlenv) debiandoc2pdf -l hr_HR.UTF-8 \
41 -s ../debian/fix_latex carnet-upgrade.sgml)
42 rm doc/carnet-upgrade.tpt
51 # Clean up after the build process.
52 rm -rf doc/carnet-upgrade.{txt,html,pdf,tpt,sgml}
62 # Install the package.
64 # Build architecture-independent files here.
65 binary-indep: build install
72 # Update package version in source
73 sed -i -e 's/%PKG_VERSION%/$(PKG_VERSION)/g' \
74 debian/carnet-upgrade/usr/share/carnet-upgrade/cn-upgrade
75 # Remove documentation template
76 rm -f debian/carnet-upgrade/usr/share/doc/carnet-upgrade/carnet-upgrade-src.sgml
100 # Build architecture-dependent files here.
101 binary-arch: build install
102 # We have nothing to do here.
105 .PHONY: build clean binary-indep binary-arch binary install