r3857: Automatic commit for debian_version_4_0_0-1
[ctsim.git] / debian / rules
1 #!/usr/bin/make -f
2
3 export DH_COMPAT=4
4
5 pkg             := ctsim
6 pkg-help        := ctsim-help
7 pkg-doc         := ctsim-doc
8
9 prefix          := debian/$(pkg)
10 prefix-help     := debian/$(pkg-help)
11 prefix-doc      := debian/$(pkg-doc)
12
13 DESTDIR         := `pwd`/$(prefix)
14 HELPDIR         := `pwd`/$(prefix-help)/usr/share/ctsim
15 doc-dir         := usr/share/doc/$(pkg-doc)
16 pixmap-dir      := usr/X11R6/include/X11/pixmaps
17
18 configure: configure-stamp
19 configure-stamp:
20         dh_testdir
21         # Add here commands to configure the package.
22         ./configure --prefix=$(DESTDIR)/usr --mandir=$(DESTDIR)/usr/share/man --datadir=$(HELPDIR) --with-ctn
23         touch configure-stamp
24
25
26 build-arch: configure-stamp build-arch-stamp
27 build-arch-stamp:
28         dh_testdir
29         # Add here commands to compile the package.
30         $(MAKE) all
31         touch build-arch-stamp
32
33 build-indep: configure-stamp  build-indep-stamp
34 build-indep-stamp:
35         dh_testdir
36         # Add here command to compile/build the arch indep package.
37         # It's ok not to do anything here, if you don't need to build
38         #  anything for this package.
39         #/usr/bin/docbook-to-man debian/#PACKAGE#.sgml > #PACKAGE#.1
40         (cd docs; tar xzf html.tar.gz)
41         touch build-indep-stamp
42
43 build: build-arch build-indep
44
45 clean:
46         dh_testdir
47         dh_testroot
48         rm -f build-arch-stamp build-indep-stamp configure-stamp
49         # Add here commands to clean up after the build process.
50         -$(MAKE) distclean
51         find . -type f -and -name \*~ -or -name .\*~ -exec rm -f {} \;
52         rm -f debian/ctsim.postinst.* debian/ctsim.prerm.*
53         dh_clean
54
55 install: DH_OPTIONS=
56 install: build
57         dh_testdir
58         dh_testroot
59         dh_clean -k
60         dh_installdirs
61         # Add here commands to install the package into debian/uffi.
62         ${MAKE} install
63         dh_installdirs -p $(pkg) $(pixmap-dir)
64         dh_install -p $(pkg) debian/ctsim.xpm $(pixmap-dir)
65         dh_install -p $(pkg-doc) docs/html $(doc-dir)
66         dh_link -p $(pkg-doc) $(doc-dir)/html/$(pkg)_contents.html $(doc-dir)/html/index.html
67         gzip -9 docs/ctsim.pdf
68         dh_install -p $(pkg-doc) docs/ctsim.pdf.gz $(doc-dir)
69         gunzip docs/ctsim.pdf.gz
70         chmod +x helical/*.sh tools/*.sh
71
72 # Build architecture-independent files here.
73 # Pass -i to all debhelper commands in this target to reduce clutter.
74 binary-indep: build install
75         dh_testdir -i
76         dh_testroot -i
77 #       dh_installdebconf -i
78         dh_installdocs -i
79         dh_installexamples -i
80         dh_installmenu -i
81 #       dh_installlogrotate -i
82 #       dh_installemacsen -i
83 #       dh_installpam -i
84 #       dh_installmime -i
85 #       dh_installinit -i
86         dh_installcron -i
87 #       dh_installman -i
88         dh_installinfo -i
89 #       dh_undocumented -i
90         dh_installchangelogs ChangeLog -i
91         dh_link -i
92         dh_compress -i
93         dh_fixperms -i
94         dh_installdeb -i
95 #       dh_perl -i
96         dh_gencontrol -i
97         dh_md5sums -i
98         dh_builddeb -i
99
100 # Build architecture-dependent files here.
101 binary-arch: build install
102         dh_testdir -a
103         dh_testroot -a
104 #       dh_installdebconf -a
105         dh_installdocs -a
106         dh_installexamples -a tools/sample-ctsim.sh helical/sample-helical.sh
107         dh_installmenu -a
108 #       dh_installlogrotate -a
109 #       dh_installemacsen -a
110 #       dh_installpam -a
111 #       dh_installmime -a
112 #       dh_installinit -a
113         dh_installcron -a
114 #       dh_installman -a
115         dh_installinfo -a
116 #       dh_undocumented -a
117         dh_installchangelogs ChangeLog -a
118         dh_strip -a
119         dh_link -a
120         dh_compress -a
121         dh_fixperms -a
122 #       dh_makeshlibs -a
123         dh_installdeb -a
124 #       dh_perl -a
125         dh_shlibdeps -a
126         dh_gencontrol -a
127         dh_md5sums -a
128         dh_builddeb -a
129
130 binary: binary-indep binary-arch
131
132 .PHONY: build clean binary-indep binary-arch binary install configure
133