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