3 ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
6 ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
10 host_arch := $(shell dpkg-architecture -qDEB_HOST_ARCH)
13 pkg-help := ctsim-help
16 ctsim-shared := usr/share/ctsim
18 prefix := debian/$(pkg)
19 prefix-help := debian/$(pkg-help)
20 prefix-doc := debian/$(pkg-doc)
22 DESTDIR := `pwd`/$(prefix)
23 HELPDIR := `pwd`/$(prefix-help)/$(ctsim-shared)
24 doc-dir := usr/share/doc/$(pkg-doc)
25 pixmap-dir := usr/share/pixmaps
26 desktop-dir := usr/share/applications
28 configure: configure-stamp
31 touch configure.in && touch aclocal.m4 && touch configure
32 ./configure --prefix=$(DESTDIR)/usr --mandir=$(DESTDIR)/usr/share/man --datadir=$(HELPDIR) --with-ctn -with-x --without-lam
36 build-arch: configure-stamp build-arch-stamp
39 # Add here commands to compile the package.
41 touch build-arch-stamp
43 build-indep: configure-stamp build-indep-stamp
46 # Add here command to compile/build the arch indep package.
47 # It's ok not to do anything here, if you don't need to build
48 # anything for this package.
49 #/usr/bin/docbook-to-man debian/#PACKAGE#.sgml > #PACKAGE#.1
50 (cd docs; tar xzf html.tar.gz)
51 touch build-indep-stamp
53 build: build-arch build-indep
58 rm -f build-arch-stamp build-indep-stamp configure-stamp
59 if [ -f Makefile -a -f config.status ]; then $(MAKE) clean; fi
60 find . -type f -and -name \*~ -or -name .\*~ -exec rm -f {} \;
61 rm -f debian/ctsim.postinst.* debian/ctsim.prerm.*
62 # Ensure up-to-date versions of config.sub and config.guess
63 -test -r /usr/share/misc/config.sub && cp -f /usr/share/misc/config.sub config.sub
64 -test -r /usr/share/misc/config.guess && cp -f /usr/share/misc/config.guess config.guess
65 -rm -f configure-stamp build-indep-stamp build-arch-stamp
66 -test -r Makefile && $(MAKE) clean
76 dh_installdirs -p $(pkg-help) $(ctsim-shared)
78 dh_installdirs -p $(pkg) $(pixmap-dir)
79 dh_installdirs -p $(pkg) $(desktop-dir)
80 dh_install -p $(pkg) debian/ctsim.xpm $(pixmap-dir)
81 dh_install -p $(pkg) debian/ctsim.desktop $(desktop-dir)
82 dh_install -p $(pkg-help) docs/ctsim.htb $(ctsim-shared)
83 dh_install -p $(pkg-doc) docs/html $(doc-dir)
84 dh_link -p $(pkg-doc) $(doc-dir)/html/$(pkg)_contents.html $(doc-dir)/html/index.html
85 gzip -9 docs/ctsim.pdf
86 dh_install -p $(pkg-doc) docs/ctsim.pdf.gz $(doc-dir)
87 gunzip docs/ctsim.pdf.gz
88 chmod +x helical/*.sh tools/*.sh
90 # Pass -i to all debhelper commands in this target to reduce clutter.
91 binary-indep: build install
99 dh_installchangelogs ChangeLog -i
108 # Build architecture-dependent files here.
109 binary-arch: build install
113 dh_installexamples -p $(pkg) tools/sample-ctsim.sh helical/sample-helical.sh
114 dh_installchangelogs ChangeLog -a
126 binary: binary-indep binary-arch
128 .PHONY: build clean binary-indep binary-arch binary install configure