File: rules

package info (click to toggle)
xtide 2.15.2-1.1
  • links: PTS
  • area: main
  • in suites: sid
  • size: 4,596 kB
  • sloc: cpp: 24,409; sh: 4,702; makefile: 325; yacc: 115; lex: 59; ansic: 46; xml: 2
file content (81 lines) | stat: -rwxr-xr-x 2,030 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
#!/usr/bin/make -f

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

package=xtide

build:
	$(checkdir)
#ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
#	extracxxflags=-g ./configure --with-xttpd-group=nogroup
#else
#	./configure --with-xttpd-group=nogroup
#endif
	dh_autoreconf
	dh_auto_configure -- --with-xttpd-group=nogroup
	make
#ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
#	CFLAGS = -O2 -g -I$(LIBTCD_DIR)
#endif
	build_tide_db harmonics-initial.tcd debian/harmonics-initial.txt 
	uudecode < debian/icons.tar.uu 

clean:
	$(checkdir)
	rm -f build
	[ ! -f Makefile ] || $(MAKE) distclean
	rm -f Makefile Makefile.bak
	rm -f config.log config.status config.cache
	rm -f harmonics.tcd harmonics-initial.tcd
	rm -fR .deps
	rm -f icons.tar
	dh_clean

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/xtide
	dh_installdirs usr/lib/x86_64-linux-gnu usr/bin usr/sbin usr/share/$(package) etc/logrotate.d
	make DESTDIR=`pwd`/debian/xtide install
# Need to build harmonics-initial.tcd first...
	install -m 644 harmonics-initial.tcd debian/xtide/usr/share/$(package)
	install -m 644 debian/xtide.conf  debian/xtide/etc/xtide.conf
	install -m 644 debian/logrotate   debian/xtide/etc/logrotate.d/xttpd
	tar -xf icons.tar -C debian/xtide
	dh_installdocs
	dh_installchangelogs
	dh_installmenu
	dh_installman -pxtide tide.1 xtide.1 xttpd.8
	dh_installinit  -pxtide  --init-script=xttpd 
	dh_install debian/xtide.desktop usr/share/applications
	dh_icons
	dh_installcron
	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`"

build-arch: build
build-indep: build

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