File: rules

package info (click to toggle)
sysstat 11.4.3-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 3,916 kB
  • ctags: 2,690
  • sloc: ansic: 25,138; sh: 1,094; tcl: 756; makefile: 559; perl: 257; python: 202
file content (76 lines) | stat: -rwxr-xr-x 2,676 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS=hardening=+pie,+bindnow
DH_AUTO_OPTIONS := -v -Sautoconf --parallel
DESTDIR         := $(CURDIR)/debian/tmp
CFLAGS          := $(shell dpkg-buildflags --get CPPFLAGS) $(shell dpkg-buildflags --get CFLAGS) $(shell getconf LFS_CFLAGS)
LDFLAGS         := $(shell dpkg-buildflags --get LDFLAGS)

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

binary binary-arch binary-indep build build-arch build-indep clean:
	dh ${@}

override_dh_auto_configure: debian/configure.stamp

override_dh_auto_clean:
	rm -f debian/*.stamp config.log
	[ ! -f Makefile ] || dh_auto_clean $(DH_AUTO_OPTIONS)

override_dh_installchangelogs-arch:
	dh_installchangelogs -a CHANGES

override_dh_installchangelogs-indep:
	dh_installchangelogs -i

override_dh_installinit:
	dh_installinit --no-start

override_dh_installexamples-arch:
	dh_installexamples -a
	cd debian/sysstat/usr/share/doc/sysstat/examples && mv README.md README.irqstat

override_dh_compress:
	set -ex; for p in $(shell dh_listpackages) ; do sh debian/fix.sh $$p; done
	dh_compress

debian/configure.stamp:
	dh_auto_configure $(DH_AUTO_OPTIONS) --         \
	            --disable-stripping                 \
	            --disable-file-attr                 \
	            --disable-compress-manpg            \
	            --enable-copy-only                  \
	            sa_lib_dir=/usr/lib/sysstat         \
	            sa_dir=/var/log/sysstat             \
	            conf_dir=/etc/sysstat               \
	            CC="$(CC)"                          \
	            CFLAGS="$(CFLAGS)"                  \
	            LDFLAGS="$(LDFLAGS)"
	touch "$@"

override_dh_auto_build-arch:
	dh_auto_build $(DH_AUTO_OPTIONS)

override_dh_auto_build-indep:
	dh_auto_build $(DH_AUTO_OPTIONS) -- contrib/isag/isag

override_dh_auto_install-arch:
	dh_auto_install $(DH_AUTO_OPTIONS) --destdir="$(DESTDIR)"
	
	mv $(DESTDIR)/usr/bin/sar $(DESTDIR)/usr/bin/sar.sysstat
	mv $(DESTDIR)/usr/share/man/man1/sar.1 $(DESTDIR)/usr/share/man/man1/sar.sysstat.1
	rm -rf $(DESTDIR)/usr/doc

override_dh_auto_install-indep:
	$(MAKE) DESTDIR="$(DESTDIR)" install_isag

.PHONY: binary binary-arch binary-indep build build-arch build-indep clean     \
        override_dh_auto_configure override_dh_auto_clean override_dh_compress \
        override_dh_installchangelogs-arch override_dh_installchangelogs-indep \
        override_dh_installinit override_dh_installexamples-arch               \
        override_dh_auto_build-arch override_dh_auto_build-indep               \
        override_dh_auto_install-arch override_dh_auto_install-indep