r2213: *** empty log message ***
[ctsim.git] / debian / rules
1 #!/usr/bin/make -f
2 # Sample debian/rules that uses debhelper.
3 # GNU copyright 1997 to 1999 by Joey Hess.
4
5 # Uncomment this to turn on verbose mode.
6 # export DH_VERBOSE=1
7
8 # This is the debhelper compatibility version to use.
9 export DH_COMPAT=4
10
11 pkg             := ctsim
12 pkg-help        := ctsim-help
13 pkg-doc         := ctsim-doc
14
15 prefix          := debian/$(pkg)
16 prefix-help     := debian/$(pkg-help)
17 prefix-doc      := debian/$(pkg-doc)
18
19 DESTDIR         := `pwd`/$(prefix)
20 HELPDIR         := `pwd`/$(prefix-help)/usr/share/ctsim
21 doc-dir         := usr/share/doc/$(pkg-doc)
22 pixmap-dir      := usr/X11R6/include/X11/pixmaps
23
24 configure: configure-stamp
25 configure-stamp:
26         dh_testdir
27         # Add here commands to configure the package.
28         ./configure --prefix=$(DESTDIR)/usr --mandir=$(DESTDIR)/usr/share/man --datadir=$(HELPDIR) --with-ctn
29         touch configure-stamp
30
31
32 build: build-stamp
33
34 build-stamp: configure-stamp 
35         dh_testdir
36         # Add here commands to compile the package.
37         $(MAKE) all
38         touch build-stamp
39
40 clean:
41         dh_testdir
42         dh_testroot
43         rm -f build-stamp configure-stamp
44         # Add here commands to clean up after the build process.
45         -$(MAKE) distclean
46         find . -type f -and -name \*~ -or -name .\*~ -exec rm -f {} \;
47         rm -f debian/ctsim.postinst.* debian/ctsim.prerm.*
48         dh_clean
49
50 install: build
51         dh_testdir
52         dh_testroot
53         dh_clean -k
54         dh_installdirs
55         # Below command also installs helpfile, man pages
56         ${MAKE} install
57         dh_installdirs -p $(pkg) $(pixmap-dir)
58         dh_install -p $(pkg) debian/ctsim.xpm $(pixmap-dir)
59
60         dh_install -p $(pkg-doc) docs/html $(doc-dir)
61         dh_link -p $(pkg-doc) $(doc-dir)/html/$(pkg)_contents.html $(doc-dir)/html/index.html
62         gzip -9 docs/ctsim.pdf
63         dh_install -p $(pkg-doc) docs/ctsim.pdf.gz $(doc-dir)
64
65 # Build architecture-independent files here.
66 binary-indep: build install
67
68
69 # Build architecture-dependent files here.
70 binary-arch: build install
71         dh_testdir
72         dh_testroot
73         dh_installdebconf       
74         dh_installdocs -A 
75         dh_installexamples tools/sample-ctsim.sh helical/sample-helical.sh
76         dh_installmenu
77 #       dh_installlogrotate
78 #       dh_installemacsen
79 #       dh_installpam
80 #       dh_installmime
81 #       dh_installinit
82 #       dh_installcron
83 #       dh_installman
84 #       dh_installinfo
85 #       dh_undocumented
86         dh_installchangelogs ChangeLog
87 #       dh_link
88         dh_strip
89         dh_compress
90         dh_fixperms
91 #       dh_makeshlibs
92         dh_installdeb
93 #       dh_perl
94         dh_shlibdeps
95         dh_gencontrol
96         dh_md5sums
97         dh_builddeb
98
99 binary: binary-indep binary-arch
100 .PHONY: build clean binary-indep binary-arch binary install configure
101