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
33 ./configure --prefix=$(DESTDIR)/usr --mandir=$(DESTDIR)/usr/share/man --datadir=$(HELPDIR) --with-ctn -with-x --without-lam
37 build-arch: configure-stamp build-arch-stamp
40 # Add here commands to compile the package.
42 touch build-arch-stamp
44 build-indep: configure-stamp build-indep-stamp
47 # Add here command to compile/build the arch indep package.
48 # It's ok not to do anything here, if you don't need to build
49 # anything for this package.
50 #/usr/bin/docbook-to-man debian/#PACKAGE#.sgml > #PACKAGE#.1
51 (cd docs; tar xzf html.tar.gz)
52 touch build-indep-stamp
54 build: build-arch build-indep
59 rm -f build-arch-stamp build-indep-stamp configure-stamp
60 if [ -f Makefile -a -f config.status ]; then $(MAKE) clean; fi
61 find . -type f -and -name \*~ -or -name .\*~ -exec rm -f {} \;
62 rm -f debian/ctsim.postinst.* debian/ctsim.prerm.*
63 # Ensure up-to-date versions of config.sub and config.guess
64 -test -r /usr/share/misc/config.sub && cp -f /usr/share/misc/config.sub config.sub
65 -test -r /usr/share/misc/config.guess && cp -f /usr/share/misc/config.guess config.guess
66 -rm -f configure-stamp build-indep-stamp build-arch-stamp
67 -test -r Makefile && $(MAKE) clean
77 dh_installdirs -p $(pkg-help) $(ctsim-shared)
79 dh_installdirs -p $(pkg) $(pixmap-dir)
80 dh_installdirs -p $(pkg) $(desktop-dir)
81 dh_install -p $(pkg) debian/ctsim.xpm $(pixmap-dir)
82 dh_install -p $(pkg) debian/ctsim.desktop $(desktop-dir)
83 dh_install -p $(pkg-help) docs/ctsim.htb $(ctsim-shared)
84 dh_install -p $(pkg-doc) docs/html $(doc-dir)
85 dh_link -p $(pkg-doc) $(doc-dir)/html/$(pkg)_contents.html $(doc-dir)/html/index.html
86 gzip -9 docs/ctsim.pdf
87 dh_install -p $(pkg-doc) docs/ctsim.pdf.gz $(doc-dir)
88 gunzip docs/ctsim.pdf.gz
89 chmod +x helical/*.sh tools/*.sh
91 # Pass -i to all debhelper commands in this target to reduce clutter.
92 binary-indep: build install
100 dh_installchangelogs ChangeLog -i
109 # Build architecture-dependent files here.
110 binary-arch: build install
114 dh_installexamples -p $(pkg) tools/sample-ctsim.sh helical/sample-helical.sh
115 dh_installchangelogs ChangeLog -a
127 binary: binary-indep binary-arch
129 .PHONY: build clean binary-indep binary-arch binary install configure