File: rules

package info (click to toggle)
cunit 2.1-3-dfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid, stretch
  • size: 4,196 kB
  • sloc: sh: 9,860; ansic: 9,503; cpp: 1,270; makefile: 380; perl: 45
file content (55 lines) | stat: -rwxr-xr-x 1,629 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
# -*- makefile -*-

# Uncomment this to turn on verbose mode.
export DH_VERBOSE=1

# hardening flags
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/default.mk

export DEB_CFLAGS_MAINT_APPEND = -Wall -g
export DEB_LDFLAGS_MAINT_APPEND = -Wl,-z,defs

%:
	dh $@ --with autoreconf

override_dh_auto_configure:
	mkdir -p debian/build debian/build-ncurses
	tar -cf - --exclude=debian/build* --exclude=.pc . | tar -xf - -C debian/build
	cd debian/build && dh_auto_configure -- --disable-curses
	tar -cf - --exclude=debian/build* --exclude=.pc . | tar -xf - -C debian/build-ncurses
	cd debian/build-ncurses && dh_auto_configure -- --enable-curses LDFLAGS="-lncurses"

override_dh_auto_build:
	cd debian/build && dh_auto_build
	cd debian/build-ncurses && dh_auto_build

override_dh_auto_test:
	cd debian/build && dh_auto_test
	cd debian/build-ncurses && dh_auto_test

override_dh_install:
	${MAKE} -C debian/build					\
		DESTDIR=$(shell pwd)/debian/tmp install
	${MAKE} -C debian/build-ncurses				\
		DESTDIR=$(shell pwd)/debian/tmp-ncurses install
	dh_install -plibcunit1 -plibcunit1-dev		\
		--sourcedir=debian/tmp
	dh_install -plibcunit1-ncurses -plibcunit1-ncurses-dev		\
		--sourcedir=debian/tmp-ncurses
	dh_install -plibcunit1-doc		\
		--sourcedir=debian/tmp-ncurses

override_dh_installman:
	dh_installman -plibcunit1-dev
	dh_installman -plibcunit1-ncurses-dev

override_dh_installexamples:
	dh_installexamples
	find debian/libcunit1-doc/usr/share/doc/libcunit1-doc/examples -type f | xargs -r chmod u=rw,g=r,o=r

override_dh_strip:
	dh_strip -plibcunit1 -plibcunit1-ncurses
	dh_strip --remaining-packages