2 # See debhelper(7) (uncomment to enable)
3 # output every command that modifies files on the build system.
7 # see FEATURE AREAS in dpkg-buildflags(1)
8 #export DEB_BUILD_MAINT_OPTIONS = hardening=+all
10 # see ENVIRONMENT in dpkg-buildflags(1)
11 # package maintainers to append CFLAGS
12 #export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
13 # package maintainers to append LDFLAGS
14 #export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
16 ROOT_DIR:=$(shell pwd)
17 export NPU_TRINITY_INSTALL_PREFIX=/opt/trinity
23 override_dh_auto_clean:
27 override_dh_auto_configure:
28 PKG_CONFIG_PATH=${NPU_TRINITY_INSTALL_PREFIX}/lib/pkgconfig meson --buildtype=plain --prefix=$(NPU_TRINITY_INSTALL_PREFIX) --sysconfdir=$(NPU_TRINITY_INSTALL_PREFIX)/etc --libdir=lib --bindir=bin --includedir=include build -Dtarget_platform=debian -Denable_npu_emul=true -Denable_data_manip=true
30 override_dh_auto_build:
33 override_dh_auto_test:
34 cd build/tests/unittests && find . -maxdepth 1 -type f -exec basename {} \; |\
35 xargs -I{} sh -c 'NE_MUTE_STDOUT=1 ./{} --gtest_output="xml:{}.xml"'
37 cd build/tests/apptests && find . -maxdepth 1 -type f -exec basename {} \; |\
38 xargs -I{} sh -c 'NE_MUTE_STDOUT=1 ./{}'
40 python3 tests/count_test_cases.py build/tests/unittests
42 override_dh_auto_install:
43 DESTDIR=$(CURDIR)/debian/tmp ninja -C build install
46 dh_install --sourcedir=debian/tmp --list-missing
47 # Add --fail-missing option after adding *.install files for all subpackages.