File: rules

package info (click to toggle)
openipmi 2.0.25-2.1
  • links: PTS
  • area: main
  • in suites: buster
  • size: 11,560 kB
  • sloc: ansic: 150,609; python: 8,801; sh: 5,752; perl: 1,356; makefile: 561
file content (109 lines) | stat: -rwxr-xr-x 2,653 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
#!/usr/bin/make -f

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

# This has to be exported to make some magic below work.
export DH_OPTIONS

# These are used for cross-compiling and for saving the configure script
# from having to guess our platform (since we know it already)
include /usr/share/dpkg/architecture.mk

DEB_BUILD_MAINT_OPTIONS = hardening=+all
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk

config.status:
	cp /usr/share/misc/config.sub /usr/share/misc/config.guess .
	dh_testdir
	dh_autoreconf
	# Add here commands to configure the package.
	CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) \
		--build=$(DEB_BUILD_GNU_TYPE) \
		--prefix=/usr \
		--libdir=/usr/lib/$(DEB_HOST_MULTIARCH) \
		--with-openssl \
		--mandir=\$${prefix}/share/man \
		--infodir=\$${prefix}/share/info \
		--disable-rpath

build: build-arch build-indep

build-arch: build-stamp

build-indep: build-stamp

build-stamp: config.status

	# Add here commands to compile the arch part of the package.
	$(MAKE)
	touch build-arch-stamp

clean:
	dh_testdir
	dh_testroot
	rm -f build-arch-stamp #CONFIGURE-STAMP#

	# Add here commands to clean up after the build process.
	[ ! -f Makefile ] || $(MAKE) distclean
	# generated file not removed by upstream Makefile
	rm -f swig/python/openipmigui/Makefile
	rm -f config.sub config.guess

	dh_autoreconf_clean
	dh_clean

install: install-arch

install-arch:
	dh_testdir
	dh_testroot
	dh_prep
	dh_installdirs -a

	# Add here commands to install the arch part of the package into
	# debian/tmp.
	mkdir -p $(CURDIR)/debian/tmp/usr/bin
	$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp

	# remove useless rpath from libOpenIPMIposix (which is built with
	# -R/usr/lib, whereas only -rpath=/usr/lib is disabled by
	# --disable-rpath)
	chrpath -d debian/tmp/usr/lib/*/libOpenIPMIposix.so.*.*

	dh_movefiles

	dh_install -s

# Must not depend on anything. This is to be called by
binary-indep:
# in another 'make' thread.

binary-common:
	dh_testdir
	dh_testroot
	dh_installchangelogs ChangeLog
	dh_installdocs
	dh_installexamples
	dh_installinit -p openipmi --name openipmi --no-start -- defaults 21 20
	mv ipmi.sysconf openipmi
	dh_install openipmi etc/default
	dh_installman
	dh_link
	dh_strip
	dh_compress
	dh_fixperms
	dh_makeshlibs
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

# Build architecture dependant packages using the common target.
binary-arch: build-arch install-arch
	$(MAKE) -f debian/rules DH_OPTIONS=-a binary-common

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