File: rules

package info (click to toggle)
donkey 0.5-18
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 252 kB
  • ctags: 365
  • sloc: ansic: 1,963; makefile: 54; sh: 29
file content (45 lines) | stat: -rwxr-xr-x 1,042 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
#!/usr/bin/make -f
# debhelper rules file for donkey, the One-Time-Password calculator

CFLAGS_ADD=	-Wall -W -Wextra
ifneq (,$(filter werror,$(DEB_BUILD_OPTIONS)))
	CFLAGS_ADD+=	-Werror
endif
ifneq (,$(filter hardening,$(DEB_BUILD_OPTIONS)))
export DEB_BUILD_HARDENING=1
# Work around PIE breakage on mips/mipsel (#532821, #526961)
ifeq ($(findstring mips,$(DEB_BUILD_ARCH)),mips)
export DEB_BUILD_HARDENING_PIE=0
endif
else
export DEB_BUILD_HARDENING=0
endif

pkgname=donkey
sysname=$(shell uname -s| sed -e 's/\///')
revname=$(shell uname -r)
objdir=obj/$(sysname).$(revname)
instdir=$(CURDIR)/debian/$(pkgname)

patch unpatch:
	$(MAKE) -f /usr/share/quilt/quilt.make $@

override_dh_auto_configure:
	mkdir obj
	./setup
	cd $(objdir) && sh ./configure

override_dh_auto_build:
	$(MAKE) -C $(objdir) CFLAGS="$(CFLAGS) $(CFLAGS_ADD)"

override_dh_auto_clean:
	rm -rf obj

override_dh_auto_install:
	$(MAKE) -C $(objdir) install BINDIR=$(instdir)/usr/bin

override_dh_installchangelogs:
	dh_installchangelogs 00changes

%:
	dh --with quilt $@