File: rules

package info (click to toggle)
xtide 2.13.2-1
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd, stretch
  • size: 3,348 kB
  • ctags: 2,350
  • sloc: cpp: 23,919; sh: 1,319; makefile: 224; yacc: 114; lex: 58; xml: 2
file content (77 lines) | stat: -rwxr-xr-x 1,917 bytes parent folder | download | duplicates (3)
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
#!/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
	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/bin usr/sbin usr/share/$(package) etc/logrotate.d
	install -m 755 xtide tide debian/xtide/usr/bin
	install -m 755 xttpd debian/xtide/usr/sbin
# 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`"

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