File: rules

package info (click to toggle)
check 0.10.0-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid, stretch
  • size: 4,172 kB
  • sloc: sh: 12,229; ansic: 9,044; makefile: 379
file content (43 lines) | stat: -rwxr-xr-x 1,599 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
#!/usr/bin/make -f

%:
	dh $@ --buildsystem=autoconf --with autoreconf

override_dh_auto_clean:
	dh_auto_clean --builddirectory build-standard
	dh_auto_clean --builddirectory build-pic

override_dh_auto_configure:
	dh_auto_configure --builddirectory build-standard -- --prefix=/usr \
		--libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH) \
		--host=$(DEB_HOST_GNU_TYPE) \
		--infodir=/usr/share/info --disable-shared --enable-subunit
	
	CFLAGS="-fPIC $(CFLAGS)" dh_auto_configure --builddirectory build-pic
		-- --prefix=/usr --host=$(DEB_HOST_GNU_TYPE) \
		--libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH) \
		--infodir=/usr/share/info --disable-shared --enable-subunit

override_dh_auto_build:
	dh_auto_build --builddirectory build-standard
	dh_auto_build --builddirectory build-pic

override_dh_auto_test:
ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))
	dh_auto_test --builddirectory build-standard --max-parallel=1 -- ARGS="--verbose"
	dh_auto_test --builddirectory build-pic --max-parallel=1 -- ARGS="--verbose"
endif

override_dh_auto_install:
	dh_auto_install --builddirectory build-standard
	
	# fix the installation / setup
	rm -f debian/check/usr/share/doc/check/COPYING*
	sed -i '/\/\* generated using gnu compiler .*/d' debian/check/usr/include/check_stdint.h
	rm -f debian/check/usr/share/doc/check/ChangeLog
	rm -f debian/check/usr/lib/$(DEB_HOST_MULTIARCH)/libcheck.la
	rm -f debian/check/usr/share/info/dir.gz
	rm -rf debian/check/usr/share/doc/check/example

	# install the pic library
	install build-pic/src/.libs/libcheck.a debian/check/usr/lib/$(DEB_HOST_MULTIARCH)/libcheck_pic.a