aboutsummaryrefslogtreecommitdiffstats
path: root/debian/rules
blob: 69709166bdf359c7e03545ec0690ad34d38e939a (plain) (blame)
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#!/usr/bin/make -f

include /usr/share/quilt/quilt.make

# These are used for cross-compiling and for saving the configure script
# from having to guess our platform (since we know it already)
DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
DEB_HOST_ARCH_OS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)

ifeq (linux,$(DEB_HOST_ARCH_OS))
	ARCH_DEPENDENT_CONFIGURE_PARAMS = --enable-native-affinity
else
	ARCH_DEPENDENT_CONFIGURE_PARAMS = --enable-hwloc
endif

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

config.status: configure $(QUILT_STAMPFN)
	dh_testdir
	
	[ -r config.sub.orig ] || \
		cp -f config.sub config.sub.orig
	[ -r config.guess.orig ] || \
		cp -f config.guess config.guess.orig
	
	[ ! -r /usr/share/misc/config.sub ] || \
		cp -f /usr/share/misc/config.sub config.sub
	[ ! -r /usr/share/misc/config.guess ] || \
		cp -f /usr/share/misc/config.guess config.guess
	
	CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS) $(INSTALL_PROGRAM)" ./configure \
		   --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \
		   --prefix=/usr --mandir=\$${prefix}/share/man \
		   --infodir=\$${prefix}/share/info \
		   --enable-taskstats --enable-openvz --enable-vserver \
		   --enable-cgroup $(ARCH_DEPENDENT_CONFIGURE_PARAMS)

build: build-stamp
build-arch: build
build-indep: build
build-stamp: config.status
	scripts/MakeHeader.py Process.c
	scripts/MakeHeader.py TraceScreen.c
	dh build --before dh_auto_configure
	dh build --after dh_auto_configure
	touch build-stamp

clean: unpatch
	dh_testdir
	dh_testroot
	rm -f build-stamp 
	
	([ -f Makefile ] && $(MAKE) distclean) || true
	[ ! -r config.guess.orig ] || \
		mv -f config.guess.orig config.guess || :
	[ ! -r config.sub.orig ] || \
		mv -f config.sub.orig config.sub || :
	
	dh_clean

install: build
	dh install --before dh_auto_install
	$(MAKE) install DESTDIR=$(CURDIR)/debian/htop
	find $(CURDIR)/debian/htop -type d -empty -delete
	dh install --after dh_auto_install

binary-indep:
binary-arch: install
	dh binary-arch

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install 

© 2014-2024 Faster IT GmbH | imprint | privacy policy