File: rules

package info (click to toggle)
tkcon 2%3A2.7~20151021-2
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 776 kB
  • ctags: 290
  • sloc: tcl: 5,071; perl: 81; makefile: 72; exp: 23; sh: 13
file content (107 lines) | stat: -rwxr-xr-x 2,791 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
#!/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

version = 2.7
cvsdate = 20151021

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$(version)
	install -m 755 tkcon.tcl $(destdir)/usr/share/tcltk/tkcon$(version)/tkcon.tcl
	install -m 644 pkgIndex.tcl $(destdir)/usr/share/tcltk/tkcon$(version)/pkgIndex.tcl

	# Create symlinks (not using dh_link because of $(version))
	ln -s ../share/tcltk/tkcon$(version)/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 '/<IMG src="http:/{N;s/<[^>]*>/<B>TkCon Homepage<\/B>/}' $$f || exit 1 ; \
	done
	dh_installmenu
	dh_installman
	dh_link
	dh_compress
	dh_fixperms
	dh_installdeb
	tcltk-depends
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary: binary-indep

get-orig-source: get-orig-source-cvs

get-orig-source-cvs:
	CURDIR=`pwd` && \
	TMPDIR=`mktemp -d /tmp/tkcon.XXXXXX` && \
	SCRDIR=`dirname $(MAKEFILE_LIST)` && \
	expect $$SCRDIR/checkout $$TMPDIR $(cvsdate) && \
	rm -rf $$TMPDIR/tkcon/extra/ && \
	find $$TMPDIR -name CVS -print | xargs rm -rf && \
	cd $$TMPDIR && \
	tar -zcf $$CURDIR/tkcon_$(version)~$(cvsdate).orig.tar.gz . && \
	rm -rf $$TMPDIR

get-orig-source-release:
	wget -O tkcon_$(version).orig.tar.gz \
		http://heanet.dl.sourceforge.net/sourceforge/tkcon/tkcon-$(version).tar.gz 

.PHONY: build clean binary-indep binary-arch binary install