File: rules

package info (click to toggle)
hfsutils 3.1-4
  • links: PTS
  • area: main
  • in suites: slink
  • size: 1,408 kB
  • ctags: 1,340
  • sloc: ansic: 12,976; tcl: 1,894; makefile: 595; sh: 152; perl: 29
file content (110 lines) | stat: -rwxr-xr-x 3,289 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
108
109
110
#!/usr/bin/make -f
# debian/rules file for hfsutils

# Modified from the hello package rules file which was Copyright
# 1994,1995 by Ian Jackson.

# There used to be `source' and `diff' targets in this file, and many
# packages also had `changes' and `dist' targets.  These functions
# have been taken over by dpkg-source, dpkg-genchanges and
# dpkg-buildpackage in a package-independent way, and so these targets
# are obsolete.

build:
	$(checkdir)
	./configure --prefix=/usr --with-tk --with-tcl
	${MAKE}
	touch build

clean:
	$(checkdir)
	-rm -f build
	-[ ! -e Makefile ] && ./configure --prefix=/usr --with-tk --with-tcl
	-make distclean
	-rm -f `find . -name "*~"`
	-rm -rf debian/tmp debian/tmp-tcltk debian/files* core debian/substvars

binary-indep:	checkroot build
	$(checkdir)
# There are no architecture-independent files to be uploaded
# generated by this package.  If there were any they would be
# made here.

binary-arch:	checkroot build
	$(checkdir)
	-rm -rf debian/tmp debian/tmp-tcltk

	install -d debian/tmp debian/tmp/DEBIAN
	install -d debian/tmp/usr debian/tmp/usr/bin
	install -d debian/tmp/usr/man debian/tmp/usr/man/man1

	make prefix=`pwd`/debian/tmp/usr exec_prefix=`pwd`/debian/tmp/usr install

	strip `find debian/tmp/usr/bin -type f | grep -v usr/bin/hfs`

	install -d debian/tmp/usr/doc/hfsutils

	install CHANGES debian/tmp/usr/doc/hfsutils/changelog
	install CREDITS debian/tmp/usr/doc/hfsutils
	install README debian/tmp/usr/doc/hfsutils
	install TODO debian/tmp/usr/doc/hfsutils
	install debian/changelog debian/tmp/usr/doc/hfsutils/changelog.Debian
	find debian/tmp/usr/doc/hfsutils -type f | xargs gzip -9v

	install debian/copyright debian/tmp/usr/doc/hfsutils

	find debian/tmp/usr/man -type f | xargs gzip -9v

	install -d debian/tmp debian/tmp-tcltk/DEBIAN

	install -d debian/tmp-tcltk/usr/X11R6/bin
	mv debian/tmp/usr/bin/xhfs debian/tmp-tcltk/usr/X11R6/bin
	install -d debian/tmp-tcltk/usr/bin
	mv debian/tmp/usr/bin/hfssh debian/tmp-tcltk/usr/bin
	strip debian/tmp-tcltk/usr/bin/hfssh

	install -d debian/tmp-tcltk/usr/man/man1
	install -d debian/tmp-tcltk/usr/X11R6/man/man1
	mv debian/tmp/usr/man/man1/xhfs.1.gz debian/tmp-tcltk/usr/X11R6/man/man1
	mv debian/tmp/usr/man/man1/hfssh.1.gz debian/tmp-tcltk/usr/man/man1

	install -d debian/tmp-tcltk/usr/doc/
	(cd debian/tmp-tcltk/usr/doc && ln -s hfsutils hfsutils-tcltk)

	dpkg-shlibdeps debian/tmp/usr/bin/* \
    -dDepends-tcltk debian/tmp-tcltk/usr/X11R6/bin/*

	chown -R root.root debian/tmp debian/tmp-tcltk
	find debian/tmp debian/tmp-tcltk -type f | xargs chmod 644
	find debian/tmp debian/tmp-tcltk -type d | xargs chmod 755
	chmod 755 debian/tmp/usr/bin/*
	chmod 755 debian/tmp-tcltk/usr/bin/* debian/tmp-tcltk/usr/X11R6/bin/*
	chmod -R g-ws debian/tmp debian/tmp-tcltk

	dpkg-gencontrol -phfsutils
	dpkg-gencontrol -phfsutils-tcltk -Pdebian/tmp-tcltk

	dpkg --build debian/tmp ..
	dpkg --build debian/tmp-tcltk ..

define checkdir
	test -f debian/rules
endef

# Below here is fairly generic really

binary:		binary-indep binary-arch

source diff:
	@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false

checkroot:
	$(checkdir)
	test root = "`whoami`"

.PHONY: binary binary-arch binary-indep clean checkroot

# Local variables:
# mode: makefile
# tab-width: 2
# End: