File: rules

package info (click to toggle)
blktrace 1.2.0-5
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, buster, sid, trixie
  • size: 7,220 kB
  • sloc: ansic: 16,704; python: 355; makefile: 215; sh: 31
file content (55 lines) | stat: -rwxr-xr-x 1,551 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
#!/usr/bin/make -f

#export DH_VERBOSE=1

include /usr/share/dpkg/architecture.mk
include /usr/share/dpkg/pkg-info.mk

CFLAGS += -Wall -Wextra -Wno-shadow -Werror -g

export DEB_BUILD_MAINT_OPTIONS = hardening=+all future=+all qa=+all reproducible=+all
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed

# make sure TeX/dvipdfm generates reproducable builds
export FORCE_SOURCE_DATE=1

%:
	dh $@ --no-parallel

override_dh_auto_build:
ifeq ($(DEB_HOST_ARCH_OS),linux)
	# Building for a Linux-type OS, everything's fine
	#
	# variables are:
	# Package name      $(DEB_SOURCE)
	# Full version      $(FULLVERSION)
	# Upstream version  $(DEB_VERSION_UPSTREAM)
else
	####################################################
	## Oops, it seems you are trying to build blkutils
	## for a non-Linux OS `$(DEB_HOST_ARCH_OS)'.
	## This is not supported.
	## Please file a bug if you think this is wrong.
	####################################################
	false
endif
	dh_auto_build --no-parallel -- CFLAGS="$(CPPFLAGS) $(CFLAGS) $(LDFLAGS)" all docs

override_dh_auto_install:
	$(MAKE) install \
		prefix=/usr \
		mandir=\$${prefix}/share/man \
		DESTDIR=$(CURDIR)/debian/$(DEB_SOURCE)
	# move admin-only stuff to /usr/sbin
	cd $(CURDIR)/debian/$(DEB_SOURCE) && \
		mv usr/bin/btrace    usr/sbin/ && \
		mv usr/bin/blktrace  usr/sbin/ && \
		mv usr/bin/btreplay  usr/sbin/ && \
		mv usr/bin/btrecord  usr/sbin/
	# fix name of bno_plot
	cd $(CURDIR)/debian/$(DEB_SOURCE) && \
		mv usr/bin/bno_plot.py usr/bin/bno_plot

override_dh_compress:
	dh_compress -X.pdf