#!/usr/bin/make -f # debian/rules that uses debhelper. # GNU copyright 1997 to 1999 by Joey Hess. # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 v = $(shell grep 'variable VERSION' tkcon.tcl | grep -o '[0-9.]\+') destdir = `pwd`/debian/tkcon build-arch: # Nothing here build-indep: build-stamp build-stamp: touch build-stamp build: build-indep clean: dh_testdir dh_testroot dh_clean build-stamp \ debian/*.1 \ debian/*.3tk \ debian/*.5 install: build-stamp dh_testdir dh_testroot dh_prep dh_installdirs # Install the package into debian/tkcon install -m 755 -d $(destdir)/usr/share/tcltk/tkcon$(v) install -m 755 tkcon.tcl $(destdir)/usr/share/tcltk/tkcon$(v)/tkcon.tcl install -m 644 pkgIndex.tcl $(destdir)/usr/share/tcltk/tkcon$(v)/pkgIndex.tcl sed -i -e's/tkcon [0-9.]\+/tkcon $(v)/' $(destdir)/usr/share/tcltk/tkcon$(v)/pkgIndex.tcl # Create symlinks (not using dh_link because of $(v)) ln -s ../share/tcltk/tkcon$(v)/tkcon.tcl $(destdir)/usr/bin/tkcon # Install manpages for f in docs/*.man ; do \ mpexpand nroff $$f - | \ sed -e 's/^\.TH \(.\+\) n /.TH \1 3tk /' \ -e 's/(n)/(3tk)/g' >debian/`basename $$f .man` || exit 1 ; \ done for f in debian/*.n ; do \ mv $$f debian/`basename $$f .n`.3tk ; \ done binary-arch: # Nothing to do # Build architecture-independent files here binary-indep: install dh_testdir dh_testroot dh_installchangelogs ChangeLog dh_installdocs # Moving old changelog from docs directory mv $(destdir)/usr/share/doc/tkcon/docs/changes.txt \ $(destdir)/usr/share/doc/tkcon/changelog.1999 # Remove extra license file (it is referenced in HTML docs, # so, we'll link it to debian/copyright by dh_link) rm -f $(destdir)/usr/share/doc/tkcon/docs/license.terms # Remove manual pages from docs directory rm -f $(destdir)/usr/share/doc/tkcon/docs/*.man # Remove links to an external sourceforge logo for f in $(destdir)/usr/share/doc/tkcon/index.html \ $(destdir)/usr/share/doc/tkcon/docs/*.html ; do \ sed -i -e '/