File: rules

package info (click to toggle)
gup 0.5.15
  • links: PTS
  • area: main
  • in suites: bullseye, buster, jessie, jessie-kfreebsd, stretch
  • size: 196 kB
  • ctags: 172
  • sloc: ansic: 1,609; sh: 216; makefile: 67
file content (57 lines) | stat: -rwxr-xr-x 1,055 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
#!/usr/bin/make -f
SHELL+= -e

DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
  CROSS := CC=$(DEB_HOST_GNU_TYPE)-gcc
endif

CFLAGS=-g -O2
-include /usr/share/dpkg/buildflags.mk

D := $(CURDIR)/debian/gup

build:
	dh_testdir
	$(MAKE) $(CROSS) P_CFLAGS="$(CFLAGS) $(CPPFLAGS)" P_LDFLAGS="$(LDFLAGS)"
	touch $@

clean:
	dh_testdir
	-rm -f build
	$(MAKE) clean
	dh_clean

binary-arch: checkroot build
	dh_testdir
	dh_prep

	dh_installchangelogs
	dh_installdocs README INSTALL
	dh_installdirs /usr/lib/gup
	install --mode=755 gup scripts/* $D/usr/lib/gup
	dh_installman gup.8
	dh_installlogrotate
	dh_installcron

	dh_strip
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb -- -Zxz

binary-indep:

build-arch: build
build-indep: build

binary: binary-arch

checkroot:
	test root = "`whoami`"

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