r2081: *** 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         := $(prefix)
20 HELPDIR         := $(prefix-help)/usr/share/ctsim
21 DOCDIR          := $(prefix-doc)/usr/share/doc/$(pkg-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)
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         $(INSTALL) $(INSTALLFLAGS) $(shell echo docs/html/*) $(DOCDIR)/html
62         ln -sf $(pkg)_contents.html $(DOCDIR)/html/index.html
63         $(INSTALL) $(INSTALLFLAGS) docs/ctsim.pdf $(DOCDIR)
64         GZIP=-9 gzip $(DOCDIR)/ctsim.pdf
65
66 # Build architecture-independent files here.
67 binary-indep: build install
68
69
70 # Build architecture-dependent files here.
71 binary-arch: build install
72         dh_testdir
73         dh_testroot
74 #       dh_installdebconf       
75         dh_installdocs docs/html
76         dh_installexamples tools/sample-ctsim.sh helical/sample-helical.sh
77         dh_installmenu
78 #       dh_installlogrotate
79 #       dh_installemacsen
80 #       dh_installpam
81 #       dh_installmime
82 #       dh_installinit
83 #       dh_installcron
84 #       dh_installman
85 #       dh_installinfo
86 #       dh_undocumented
87         dh_installchangelogs ChangeLog
88 #       dh_link
89         dh_strip
90         dh_compress
91         dh_fixperms
92 #       dh_makeshlibs
93         dh_installdeb
94 #       dh_perl
95 #       dh_shlibdeps
96         dh_gencontrol
97         dh_md5sums
98         dh_builddeb
99
100 binary: binary-indep binary-arch
101 .PHONY: build clean binary-indep binary-arch binary install configure
102