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