Debian Codegraph @

debian/rules

raw symbols SCIP
1 #!/usr/bin/make -f
2
3 # Uncomment this to turn on verbose mode.
4 #export DH_VERBOSE=1
5
6 PACKAGE="procps"
7 DEBROOT=$(CURDIR)/debian/tmp
8
9 DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
10 DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
11 DEB_HOST_ARCH_OS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
12 DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
13 DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
14 ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
15 configure_flags += --host=$(DEB_HOST_GNU_TYPE)
16 CROSS = PKG_CONFIG=$(DEB_HOST_GNU_TYPE)-pkg-config \
17 ac_cv_func_malloc_0_nonnull=yes \
18 ac_cv_func_realloc_0_nonnull=yes
19 else
20 CROSS=
21 endif
22
23 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
24
25 ifeq ($(DEB_HOST_ARCH_OS),linux)
26 LINUX_CONFIGURE_EXTRA_FLAGS = --with-systemd --enable-libselinux
27 endif
28
29 ifeq ($(DEB_HOST_ARCH_OS), hurd)
30 HURD_CONFIGURE_EXTRA_FLAGS = --disable-pidwait
31 endif
32
33 %:
34 dh $@
35
36 override_dh_auto_configure:
37 $(CROSS) ./configure \
38 $(configure_flags) \
39 --build=$(DEB_BUILD_GNU_TYPE) \
40 --disable-silent-rules \
41 --enable-watch8bit --enable-colorwatch \
42 --enable-w-from \
43 --enable-skill ${LINUX_CONFIGURE_EXTRA_FLAGS} \
44 --disable-pidof ${HURD_CONFIGURE_EXTRA_FLAGS} \
45 --disable-modern-top \
46 --prefix=/usr \
47 --libdir=/usr/lib/$(DEB_HOST_MULTIARCH) \
48 --build=$(DEB_BUILD_GNU_TYPE) \
49 --host=$(DEB_HOST_GNU_TYPE) \
50
51
52 override_dh_auto_install: $(autogen-files)
53 dh_auto_install
54
55 ifneq ($(DEB_HOST_ARCH_OS), linux)
56 rm -f \
57 $(DEBROOT)/usr/bin/slabtop \
58 $(DEBROOT)/usr/share/man/man1/slabtop.1 \
59 $(DEBROOT)/usr/sbin/sysctl \
60 $(DEBROOT)/usr/share/man/man8/sysctl.8 \
61 $(DEBROOT)/usr/share/man/man5/sysctl.conf.5 \
62 $(NULL)
63 endif
64 ifeq ($(DEB_HOST_ARCH_OS), hurd)
65 rm -f \
66 $(DEBROOT)/usr/bin/pmap \
67 $(DEBROOT)/usr/share/man/man1/pmap.1 \
68 $(NULL)
69
70 # Rename vmstat as there are two of them
71 (cd $(DEBROOT)/usr/bin && mv vmstat vmstat.procps )
72 (cd $(DEBROOT)/usr/share/man/man8 && mv vmstat.8 vmstat.procps.8 )
73
74 # Rename w as there are two of them
75 (cd $(DEBROOT)/usr/bin && mv w w.procps )
76 (cd $(DEBROOT)/usr/share/man/man1 && mv w.1 w.procps.1 )
77
78 # Rename uptime as there are two of them
79 (cd $(DEBROOT)/usr/bin && mv uptime uptime.procps )
80 (cd $(DEBROOT)/usr/share/man/man1 && mv uptime.1 uptime.procps.1 )
81
82 # Rename ps as there are two of them
83 (cd $(DEBROOT)/usr/bin && mv ps ps.procps )
84 (cd $(DEBROOT)/usr/share/man/man1 && mv ps.1 ps.procps.1 )
85 endif
86
87 override_dh_installchangelogs:
88 dh_installchangelogs NEWS
89
90 override_dh_installinit:
91 ifeq ($(DEB_HOST_ARCH_OS), linux)
92 dh_installinit --no-start
93 endif
94