File: rules

package info (click to toggle)
pcmciautils 018-8
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd, stretch, wheezy
  • size: 448 kB
  • ctags: 1,014
  • sloc: ansic: 3,901; makefile: 230; lex: 222; sh: 169; yacc: 105
file content (41 lines) | stat: -rwxr-xr-x 1,061 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
#! /usr/bin/make -f

export V := true

%:
	dh $@

DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)

ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
CROSS :=
else
CROSS := CROSS=$(DEB_HOST_GNU_TYPE)-
endif

CPPFLAGS := $(shell dpkg-buildflags --get CPPFLAGS)
CFLAGS := $(shell dpkg-buildflags --get CFLAGS)
LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS)
BUILDFLAGS := CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"

override_dh_auto_build:
	$(BUILDFLAGS) $(MAKE) $(CROSS) STRIPCMD=true

override_dh_auto_install:
	dh_auto_install --destdir=debian/pcmciautils -- \
		pcmciaconfdir=/usr/lib/pcmciautils

override_dh_install:
	dh_install --sourcedir=debian/pcmciautils

# You only need to run this immediately after checking out the package from
# revision control.
quilt-setup:
	[ ! -d .pc ]
	set -e; for patch in $$(quilt series | tac); do \
		patch -p1 -R --no-backup-if-mismatch <"debian/patches/$$patch"; \
	done
	quilt push -a

.PHONY: quilt-setup