r2108: *** 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=0
7
8 # This is the debhelper compatibility version to use.
9 export DH_COMPAT=3
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 DOCDIR          := $(prefix-doc)/usr/share/doc/ctsim-doc
22
23 INSTALL         := install
24 INSTALLFLAGS    := -g root -o root -m 0644
25 INSTALLDIRFLAGS := -d -g root -o root -m 0755
26
27 configure: configure-stamp
28 configure-stamp:
29         dh_testdir
30         # Add here commands to configure the package.
31         ./configure --prefix=$(DESTDIR)/usr --mandir=$(DESTDIR)/usr/share/man --datadir=$(HELPDIR) --with-ctn
32         touch configure-stamp
33
34
35 build: build-stamp
36
37 build-stamp: configure-stamp 
38         dh_testdir
39         # Add here commands to compile the package.
40         $(MAKE) all
41         touch build-stamp
42
43 clean:
44         dh_testdir
45         dh_testroot
46         rm -f build-stamp configure-stamp
47         # Add here commands to clean up after the build process.
48         -$(MAKE) distclean
49         find . -type f -and -name \*~ -or -name .\*~ -exec rm -f {} \;
50         rm -f debian/ctsim.postinst.* debian/ctsim.prerm.*
51         dh_clean
52
53 install: build
54         dh_testdir
55         dh_testroot
56         dh_clean -k
57         dh_installdirs
58         # Below command also installs helpfile
59         ${MAKE} install
60         $(INSTALL) $(INSTALLFLAGS) debian/ctsim.xpm $(prefix)/usr/X11R6/include/X11/pixmaps
61
62         $(INSTALL) $(INSTALLFLAGS) $(shell echo docs/html/*) $(DOCDIR)/html
63         ln -sf $(pkg)_contents.html $(DOCDIR)/html/index.html
64
65         $(INSTALL) $(INSTALLFLAGS) docs/ctsim.pdf $(DOCDIR)
66         gzip -9 $(DOCDIR)/ctsim.pdf
67
68 # Build architecture-independent files here.
69 binary-indep: build install
70
71
72 # Build architecture-dependent files here.
73 binary-arch: build install
74         dh_testdir
75         dh_testroot
76 #       dh_installdebconf       
77         dh_installdocs -A 
78         dh_installexamples tools/sample-ctsim.sh helical/sample-helical.sh
79         dh_installmenu
80 #       dh_installlogrotate
81 #       dh_installemacsen
82 #       dh_installpam
83 #       dh_installmime
84 #       dh_installinit
85 #       dh_installcron
86 #       dh_installman
87 #       dh_installinfo
88 #       dh_undocumented
89         dh_installchangelogs ChangeLog
90 #       dh_link
91         dh_strip
92         dh_compress
93         dh_fixperms
94 #       dh_makeshlibs
95         dh_installdeb
96 #       dh_perl
97 #       dh_shlibdeps
98         dh_gencontrol
99         dh_md5sums
100         dh_builddeb
101
102 binary: binary-indep binary-arch
103 .PHONY: build clean binary-indep binary-arch binary install configure
104