r1889: *** 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=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) all
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         $(INSTALL) $(INSTALLFLAGS) doc/ctsim.pdf $(SHAREDOCDIR)
57         GZIP=-9 gzip $(SHAREDOCDIR)/ctsim.pdf
58
59 # Build architecture-independent files here.
60 binary-indep: build install
61
62
63 # Build architecture-dependent files here.
64 binary-arch: build install
65         dh_testdir
66         dh_testroot
67 #       dh_installdebconf       
68         dh_installdocs doc/html
69         dh_installexamples tools/sample-ctsim.sh helical/sample-helical.sh
70 #       dh_installmenu
71 #       dh_installlogrotate
72 #       dh_installemacsen
73 #       dh_installpam
74 #       dh_installmime
75 #       dh_installinit
76 #       dh_installcron
77 #       dh_installman
78 #       dh_installinfo
79 #       dh_undocumented
80         dh_installchangelogs ChangeLog
81 #       dh_link
82         dh_strip
83         dh_compress
84         dh_fixperms
85 #       dh_makeshlibs
86         dh_installdeb
87 #       dh_perl
88 #       dh_shlibdeps
89         dh_gencontrol
90         dh_md5sums
91         dh_builddeb
92
93 binary: binary-indep binary-arch
94 .PHONY: build clean binary-indep binary-arch binary install configure
95