Fix pdf build on jessie
[carnet-upgrade.git] / debian / rules
1 #!/usr/bin/make -f
2 # -*- makefile -*-
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.
8
9 # Uncomment this to turn on verbose mode.
10 #export DH_VERBOSE=1
11
12 PKG_VERSION = $(shell dpkg-parsechangelog|sed -n 's/^Version: \(.*:\|\)//p')
13
14 build: build-arch build-indep
15 build-arch: build-stamp
16 build-indep: build-stamp
17
18 build-stamp: doc/carnet-upgrade-src.sgml
19         dh_testdir
20
21         # Update package version in documentation
22         sed -e 's/%PKG_VERSION%/$(PKG_VERSION)/g' doc/carnet-upgrade-src.sgml \
23                 > doc/carnet-upgrade.sgml
24
25         # Build txt docs
26         (cd doc; debiandoc2text -l hr_HR.UTF-8 carnet-upgrade.sgml)
27
28         # Build one page html docs
29         rm -rf doc/carnet-upgrade.html
30         (cd doc; debiandoc2html -l hr_HR.UTF-8 -1 carnet-upgrade.sgml)
31         mv doc/carnet-upgrade.html/index.html doc/index.html
32         rmdir doc/carnet-upgrade.html
33         mv doc/index.html doc/carnet-upgrade.html
34
35         # Build pdf docs
36         (cd doc; debiandoc2pdf -l hr_HR.UTF-8 carnet-upgrade.sgml)
37         rm doc/carnet-upgrade.tpt
38
39         touch $@
40
41 clean:
42         dh_testdir
43         dh_testroot
44         rm -f build-stamp
45
46         # Clean up after the build process.
47         rm -rf doc/carnet-upgrade.{txt,html,pdf,tpt,sgml}
48
49         dh_clean 
50
51 install: build
52         dh_testdir
53         dh_testroot
54         dh_clean
55         dh_installdirs
56
57         # Install the package.
58
59 # Build architecture-independent files here.
60 binary-indep: build install
61         dh_testdir
62         dh_testroot
63         dh_installchangelogs 
64         dh_installdocs
65         dh_installexamples
66         dh_install
67         # Update package version in source
68         sed -i -e 's/%PKG_VERSION%/$(PKG_VERSION)/g' \
69                 debian/carnet-upgrade/usr/share/carnet-upgrade/cn-upgrade
70         # Remove documentation template
71         rm -f debian/carnet-upgrade/usr/share/doc/carnet-upgrade/carnet-upgrade-src.sgml
72 #       dh_installmenu
73         dh_installdebconf       
74 #       dh_installlogrotate
75 #       dh_installemacsen
76 #       dh_installpam
77 #       dh_installmime
78 #       dh_python
79 #       dh_installinit
80 #       dh_installcron
81 #       dh_installinfo
82         dh_installman
83         dh_link
84         dh_strip
85         dh_compress
86         dh_fixperms
87 #       dh_perl
88 #       dh_makeshlibs
89         dh_installdeb
90         dh_shlibdeps
91         dh_gencontrol
92         dh_md5sums
93         dh_builddeb
94
95 # Build architecture-dependent files here.
96 binary-arch: build install
97 # We have nothing to do here.
98
99 binary: binary-indep
100 .PHONY: build clean binary-indep binary-arch binary install