File: rules

package info (click to toggle)
sysrepo 4.5.3-1
  • links: PTS
  • area: main
  • in suites: experimental
  • size: 6,816 kB
  • sloc: ansic: 86,783; sh: 145; makefile: 29
file content (26 lines) | stat: -rwxr-xr-x 746 bytes parent folder | download | duplicates (4)
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
#!/usr/bin/make -f
#export DH_VERBOSE=1
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

include /usr/share/dpkg/default.mk

# determine number of processors to enable parallel tests
NPROCS:=$(shell grep -c ^processor /proc/cpuinfo)

# Use the build directory to set LD_LIBRARY_PATH for tests
SR_BUILD_DIR:=$(shell pwd)/obj-$(DEB_HOST_GNU_TYPE)

%:
	dh $@ -j

override_dh_auto_configure:
	dh_auto_configure -- \
		-DCMAKE_BUILD_TYPE:String="RelWithDebInfo" \
		-DCMAKE_BUILD_WITH_INSTALL_RPATH=ON \
		-DSYSREPO_UMASK=007 \
		-DSYSREPO_GROUP=sysrepo \
		-DNACM_SRMON_DATA_PERM=660

override_dh_auto_test:
	LD_LIBRARY_PATH="$(SR_BUILD_DIR)" make -C obj-$(DEB_HOST_GNU_TYPE) test ARGS=' -j $(NPROCS) -V'
	make -C obj-$(DEB_HOST_GNU_TYPE) test_clean