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')
19 build: build-arch build-indep
20 build-arch: build-stamp
21 build-indep: build-stamp
23 build-stamp: doc/carnet-upgrade-src.sgml
26 # Update package version in documentation
27 sed -e 's/%PKG_VERSION%/$(PKG_VERSION)/g' doc/carnet-upgrade-src.sgml \
28 > doc/carnet-upgrade.sgml
31 (cd doc; $(perlenv) debiandoc2text -l hr_HR.UTF-8 carnet-upgrade.sgml)
33 # Build one page html docs
34 rm -rf doc/carnet-upgrade.html
35 (cd doc; $(perlenv) debiandoc2html -l hr_HR.UTF-8 \
36 -1 carnet-upgrade.sgml)
37 mv doc/carnet-upgrade.html/index.html doc/index.html
38 rmdir doc/carnet-upgrade.html
39 mv doc/index.html doc/carnet-upgrade.html
42 (cd doc; $(perlenv) debiandoc2pdf -l hr_HR.UTF-8 \
43 -s ../debian/fix_latex carnet-upgrade.sgml)
44 rm doc/carnet-upgrade.tpt
53 # Clean up after the build process.
54 rm -rf doc/carnet-upgrade.{txt,html,pdf,tpt,sgml}
64 # Install the package.
66 # Build architecture-independent files here.
67 binary-indep: build install
74 # Update package version in source
75 sed -i -e 's/%PKG_VERSION%/$(PKG_VERSION)/g' \
76 debian/carnet-upgrade/usr/share/carnet-upgrade/cn-upgrade
77 # Remove documentation template
78 rm -f debian/carnet-upgrade/usr/share/doc/carnet-upgrade/carnet-upgrade-src.sgml
102 # Build architecture-dependent files here.
103 binary-arch: build install
104 # We have nothing to do here.
107 .PHONY: build clean binary-indep binary-arch binary install