File: rules

package info (click to toggle)
xwatch 2.11-16
  • links: PTS
  • area: main
  • in suites: bullseye
  • size: 472 kB
  • sloc: ansic: 864; makefile: 112
file content (93 lines) | stat: -rwxr-xr-x 3,040 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
#!/usr/bin/make -f
# Made with the aid of debmake, by Christoph Lameter,
# based on the sample debian/rules file for GNU hello by Ian Jackson.

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

package=xwatch
prefix=usr/share
docprefix=${prefix}/doc/${package}
htmlprefix=${prefix}/doc/${package}/html

build:
	$(checkdir) 
	dh_auto_build --sourcedirectory=src -- final "STDLFLAGS=-L/usr/lib" "RGB_FILEFLAG = -DRGB_FILE=\\\"/usr/share/xwatch/rgb.txt\\\""
	cd src; touch build

clean:
	$(checkdir)
	cd src; rm -f build
	cd src; make clean
#	-rm -f `find . -name "*~"`
#	-rm -rf debian/xwatch debian/files* core debian/substvars
# dh_clean wants to remove src/*.orig files
	-mv src/addline.c.orig src/addline.c-orig
	-mv src/.makedist.orig src/.makedist-orig
	dh_clean
	-mv src/addline.c-orig src/addline.c.orig 
	-mv src/.makedist-orig src/.makedist.orig
	-rm -rf doc/tmp

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/xwatch
	install -d debian/xwatch/etc/X11/app-defaults
	install -d debian/xwatch/usr/bin
	install -d debian/xwatch/usr/share/man/man1
	install -m 755 src/xwatch `pwd`/debian/xwatch/usr/bin
	install -m 644 XWatch.ap `pwd`/debian/xwatch/etc/X11/app-defaults/XWatch
	install -d doc/tmp
	-cp doc/xwatch.yo doc/tmp
	(cd doc/tmp/; patch < ../../debian/xwatch.yo.debian-patch; yodl2html xwatch && yodl2txt xwatch && yodl2man xwatch )

	install -d debian/xwatch/${htmlprefix}
	install -m 644 doc/tmp/xwatch.txt `pwd`/debian/xwatch/${docprefix}/
	install -m 644 doc/tmp/xwatch.html `pwd`/debian/xwatch/${htmlprefix}/
	install -m 644 doc/tmp/xwatch01.html `pwd`/debian/xwatch/${htmlprefix}/
	install -m 644 doc/tmp/xwatch02.html `pwd`/debian/xwatch/${htmlprefix}/
	install -m 644 doc/tmp/xwatch03.html `pwd`/debian/xwatch/${htmlprefix}/
	install -m 644 doc/tmp/xwatch04.html `pwd`/debian/xwatch/${htmlprefix}/
	install -m 644 doc/tmp/xwatch05.html `pwd`/debian/xwatch/${htmlprefix}/
	(cd debian/xwatch/${htmlprefix} ; ln -s xwatch.html index.html)
	install -m 644 doc/tmp/xwatch.man `pwd`/debian/xwatch/usr/share/man/man1/xwatch.1
	rm doc/tmp/*
	rmdir doc/tmp
# Eventually remove this when rgb.txt is included in a smaller client X	file.
	install -d debian/xwatch/usr/share/xwatch
	install -m 644 debian/rgb.txt debian/xwatch/usr/share/xwatch/
	dh_installdirs
	install -m 644 ChangeLog `pwd`/debian/xwatch/${docprefix}/changelog
	gzip --best `pwd`/debian/xwatch/${docprefix}/changelog
	dh_installdocs MAINTAINER.README xwatch.README
	dh_installexamples
	dh_installchangelogs
	dh_installmenu
	dh_installcron
#	dh_installmanpages -pxwatch
	dh_strip
	dh_compress
	dh_fixperms
	dh_shlibdeps
	dh_gencontrol
	dh_installdeb
	dh_md5sums
	dh_builddeb

define checkdir
	test -f debian/rules
endef

binary: binary-indep binary-arch

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

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