r3234: *** empty log message ***
[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
71 # Build architecture-independent files here.
72 # Pass -i to all debhelper commands in this target to reduce clutter.
73 binary-indep: build install
74         dh_testdir -i
75         dh_testroot -i
76 #       dh_installdebconf -i
77         dh_installdocs -i
78         dh_installexamples -i
79         dh_installmenu -i
80 #       dh_installlogrotate -i
81 #       dh_installemacsen -i
82 #       dh_installpam -i
83 #       dh_installmime -i
84 #       dh_installinit -i
85         dh_installcron -i
86 #       dh_installman -i
87         dh_installinfo -i
88 #       dh_undocumented -i
89         dh_installchangelogs ChangeLog -i
90         dh_link -i
91         dh_compress -i
92         dh_fixperms -i
93         dh_installdeb -i
94 #       dh_perl -i
95         dh_gencontrol -i
96         dh_md5sums -i
97         dh_builddeb -i
98
99 # Build architecture-dependent files here.
100 binary-arch: build install
101         dh_testdir -a
102         dh_testroot -a
103 #       dh_installdebconf -a
104         dh_installdocs -a
105         dh_installexamples -a tools/sample-ctsim.sh helical/sample-helical.sh
106         dh_installmenu -a
107 #       dh_installlogrotate -a
108 #       dh_installemacsen -a
109 #       dh_installpam -a
110 #       dh_installmime -a
111 #       dh_installinit -a
112         dh_installcron -a
113 #       dh_installman -a
114         dh_installinfo -a
115 #       dh_undocumented -a
116         dh_installchangelogs ChangeLog -a
117         dh_strip -a
118         dh_link -a
119         dh_compress -a
120         dh_fixperms -a
121 #       dh_makeshlibs -a
122         dh_installdeb -a
123 #       dh_perl -a
124         dh_shlibdeps -a
125         dh_gencontrol -a
126         dh_md5sums -a
127         dh_builddeb -a
128
129 binary: binary-indep binary-arch
130
131 .PHONY: build clean binary-indep binary-arch binary install configure
132