File: rules

package info (click to toggle)
eject 2.1.5+deb1+cvs20081104-14
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 2,120 kB
  • sloc: sh: 3,299; ansic: 1,354; makefile: 92
file content (61 lines) | stat: -rwxr-xr-x 1,539 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
58
59
60
61
#!/usr/bin/make -f
#export DH_VERBOSE=1

DEB_HOST_ARCH_CPU  ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU)
DEB_HOST_ARCH_OS   ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk

ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
CC := $(DEB_HOST_GNU_TYPE)-gcc
endif

ifeq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
ifeq ($(DEB_HOST_ARCH_CPU),m68k)
CFLAGS += -Os
else
CFLAGS += -Os -fomit-frame-pointer
endif
endif

ifeq ($(DEB_HOST_ARCH_OS), kfreebsd)
cdrom		=	--enable-default-device=acd0
nodevmapper	=	1
endif

deb_dir		=	debian/eject
udeb_dir	=	debian/eject-udeb

%:
	dh $@ --with=autotools-dev,autoreconf

override_dh_auto_build:
	dh_auto_build
ifeq (,$(nodevmapper))
	$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) dmcrypt-get-device.c -o dmcrypt-get-device -ldevmapper
endif

override_dh_auto_configure:
	dh_auto_configure -- $(cdrom)

override_dh_clean:
	dh_clean dmcrypt-get-device

override_dh_auto_install:
	$(MAKE) install mandir=/usr/share/man DESTDIR=$(CURDIR)/$(deb_dir)
	[ -d $(udeb_dir) ] || mkdir $(udeb_dir)
	cp -a $(deb_dir)/usr $(udeb_dir)/
	rm -fr $(udeb_dir)/usr/share/man

ifeq (,$(nodevmapper))
	install -D -m 4755 dmcrypt-get-device $(deb_dir)/usr/lib/eject/dmcrypt-get-device
endif

override_dh_fixperms:
	dh_fixperms -a -Xdmcrypt-get-device

override_dh_auto_test: