File: rules

package info (click to toggle)
asclock 2.0.12-29
  • links: PTS
  • area: main
  • in suites: buster
  • size: 1,420 kB
  • sloc: ansic: 1,205; sh: 179; makefile: 74
file content (97 lines) | stat: -rwxr-xr-x 2,488 bytes parent folder | download | duplicates (4)
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
#!/usr/bin/make -f
# this is a -*- Makefile -*-, believe it or not
# Based on sample debhelper debian/rules. GNU copyright 1997 by Joey Hess.
# GNU copyright 1998-2001 Marcelo Magallon
# (C) 2008-2012 Helge Kreutzmann
# (C) 2018 Helmut Grohne <helmut@subdivi.de>

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

CDEBUGFLAGS=-Wall

MANDIR=debian/manpage

ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
    CDEBUGFLAGS += -g
endif

dpkg_buildflags = DEB_CFLAGS_MAINT_APPEND="$(CDEBUGFLAGS)" \
		  DEB_BUILD_MAINT_OPTIONS="hardening=+all" \
		  dpkg-buildflags

build: build-arch build-indep
build-arch: build-stamp
build-indep:

#build: build-stamp
build-stamp:
	dh_testdir
	( echo classic ; echo ) | ./configure
	# Choose classic theme
#	make $(shell $(dpkg_buildflags) --export=configure) \ 
	dh_auto_build --buildsystem=makefile -- \
	    $(shell $(dpkg_buildflags) --export=configure) \
	    EXTRA_LDOPTIONS="$(shell $(dpkg_buildflags) --get LDFLAGS)"
	cp -ivp asclock.man $(MANDIR)
	touch $(MANDIR)/asclock.pot
	po4a -v -f debian/po4a.cfg

	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	-rm -r build-stamp default_theme configure-stamp
	[ ! -f Makefile ] || $(MAKE) clean
	-rm -f Makefile
	-rm -f default.h
	-rm -f $(MANDIR)/asclock.*man
	-rm -f $(MANDIR)/asclock.pot
	dh_clean

binary-indep: DH_OPTIONS=-i
binary-indep:
	dh_testdir
	dh_testroot
	dh_prep
	dh_installdirs usr/share/asclock
	( cd themes && tar cf - $$(find \( -name CVS -o -name themes \) -prune -o \! -type d -print) ) | ( cd debian/asclock-themes/usr/share/asclock && tar xf - )
# The upstream tarball contains some cruft.
	find debian/asclock-themes/usr/share/asclock -type f -name classic | xargs rm
	find debian/asclock-themes/usr/share/asclock -type f -name "Makefile*" | xargs rm
	chmod +x debian/install-i18n
	debian/install-i18n
	dh_installdocs
	dh_installchangelogs
	dh_strip
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary-arch: DH_OPTIONS=-a
binary-arch: build
	dh_testdir
	dh_testroot
	dh_prep
	dh_installdirs usr/bin
	install -m 0755 asclock debian/asclock/usr/bin/asclock
	dh_installdocs
	#dh_installmenu
	dh_installman asclock.man $(MANDIR)/asclock.de.man $(MANDIR)/asclock.pt.man $(MANDIR)/asclock.sv.man
	dh_installchangelogs
	dh_strip
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

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