2 # Sample debian/rules that uses debhelper.
3 # GNU copyright 1997 to 1999 by Joey Hess.
5 # Uncomment this to turn on verbose mode.
8 # This is the debhelper compatibility version to use.
12 pkg-help := ctsim-help
14 pkg-doc-pdf := ctsim-doc-pdf
16 prefix := debian/$(pkg)
17 prefix-help := debian/$(pkg-help)
18 prefix-doc := debian/$(pkg-doc)
19 prefix-doc-pdf := debian/$(pkg-doc-pdf)
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
27 INSTALLFLAGS := -g root -o root -m 0644
28 INSTALLDIRFLAGS := -d -g root -o root -m 0755
30 configure: configure-stamp
33 # Add here commands to configure the package.
34 ./configure --prefix=$(DESTDIR)/usr --mandir=$(DESTDIR)/usr/share/man --datadir=$(HELPDIR)
40 build-stamp: configure-stamp
42 # Add here commands to compile the package.
49 rm -f build-stamp configure-stamp
50 # Add here commands to clean up after the build process.
52 find . -type f -and -name \*~ -or -name .\*~ -exec rm -f {} \;
53 rm -f debian/ctsim.postinst.* debian/ctsim.prerm.*
61 # Below command also installs helpfile
63 $(INSTALL) $(INSTALLFLAGS) debian/ctsim.xpm $(prefix)/usr/X11R6/include/X11/pixmaps
65 $(INSTALL) $(INSTALLFLAGS) $(shell echo docs/html/*) $(DOCDIR)/html
66 ln -sf $(pkg)_contents.html $(DOCDIR)/html/index.html
68 $(INSTALL) $(INSTALLFLAGS) docs/ctsim.pdf $(PDFDIR)
69 GZIP=-9 gzip $(PDFDIR)/ctsim.pdf
71 # Build architecture-independent files here.
72 binary-indep: build install
75 # Build architecture-dependent files here.
76 binary-arch: build install
81 dh_installexamples tools/sample-ctsim.sh helical/sample-helical.sh
92 dh_installchangelogs ChangeLog
105 binary: binary-indep binary-arch
106 .PHONY: build clean binary-indep binary-arch binary install configure