File: rules

package info (click to toggle)
libsmbios 2.3.1-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 5,900 kB
  • ctags: 3,973
  • sloc: cpp: 13,037; ansic: 7,658; xml: 4,318; python: 4,197; makefile: 515; sh: 421
file content (102 lines) | stat: -rwxr-xr-x 2,558 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f


CFLAGS += -Wall -g -O$(if $(findstring noopt,$(DEB_BUILD_OPTIONS)),0,2)
CXXFLAGS += -Wno-error
LDFLAGS += -Wl,-z,defs -Wl,--as-needed

configure_flags += \
	--prefix=/usr \
	--with-cppunit-prefix=/usr \
	--with-gnu-ld \
	--sysconfdir=/etc

ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
	configure_flags += --build=$(DEB_BUILD_GNU_TYPE)
else
	configure_flags += --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE)
endif

config.status:
	dh_testdir
	[ ! -e build/config.sub ] || cp -f /usr/share/misc/config.sub build
	[ ! -e build/config.guess ] || cp -f /usr/share/misc/config.guess build
	autoreconf --verbose --force --install
	./configure \
		CFLAGS="$(CFLAGS)"  LDFLAGS="$(LDFLAGS)" \
		$(configure_flags)

build: build-arch build-indep
build-arch: build-stamp
build-indep: build-stamp
build-stamp: config.status
	dh_testdir
	$(MAKE)
#ifeq ($(findstring nocheck,$(DEB_BUILD_OPTIONS)),)
#	$(MAKE) check
#endif
	touch $@

clean:
	dh_testdir
	dh_testroot
	[ ! -f Makefile ] || $(MAKE) distclean
	$(RM) -vf config.log Makefile
	dh_clean build-stamp

install: build
	dh_testdir
	dh_testroot
	dh_prep
	$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
	# get rid of RPATH on 64-bits arches (usually caused by broken upstream
	# libtool)
	# only the old legacy C++ binaries need this
	cd debian/tmp/usr/sbin; ls | grep -v '\.sh$$' | grep dell | xargs chrpath -d

binary-indep: build install
	dh_testdir
	dh_testroot
	dh_install -i
	dh_installchangelogs -i
	dh_installexamples -i
	dh_installdocs -i
	dh_install -i
	$(RM) -vf debian/libsmbios-doc/usr/share/doc/libsmbios-doc/getopt/LICENSE
	dh_python2
	dh_compress -i
	dh_fixperms -i
	dh_installdeb -i
	dh_gencontrol -i
	dh_md5sums -i
	dh_builddeb -i

binary-arch: build install
	dh_testdir
	dh_testroot
	dh_installchangelogs  -s
	dh_installdocs -s
	dh_install -s
	$(RM) -vf debian/libsmbios-dev/usr/include/smbios/config/boost_LICENSE_1_0_txt
	$(RM) -v debian/smbios-utils/usr/share/smbios-utils/cli.pyc
	$(RM) -v debian/smbios-utils/usr/share/smbios-utils/cli.pyo
	#$(RM) -v debian/smbios-utils/usr/share/smbios-utils/cli.py
	dh_python2
	dh_installman -s
# manpage currently disabled, see #394898
#	cd $(CURDIR)/debian/libsmbios-bin; for f in usr/sbin/*; do \
#	    ln -s smbios-bin.1 usr/share/man/man1/$$(basename $$f).1; \
	done
	dh_strip -s
	dh_compress -s
	dh_fixperms -s
	dh_makeshlibs -s
	dh_link -s
	dh_installdeb -s
	dh_shlibdeps -s
	dh_gencontrol -s
	dh_md5sums -s
	dh_builddeb -s

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