forked from nnstreamer/nnstreamer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rules
executable file
·69 lines (56 loc) · 2.82 KB
/
rules
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
#!/usr/bin/make -f
# See debhelper(7) (uncomment to enable)
# output every command that modifies files on the build system.
#export DH_VERBOSE = 1
# see FEATURE AREAS in dpkg-buildflags(1)
#export DEB_BUILD_MAINT_OPTIONS = hardening=+all
# see ENVIRONMENT in dpkg-buildflags(1)
# package maintainers to append CFLAGS
#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
# package maintainers to append LDFLAGS
#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
ROOT_DIR:=$(shell pwd)
export DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
export DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
export BUILDDIR=build
export NNSTREAMER_SOURCE_ROOT_PATH=$(ROOT_DIR)
export NNSTREAMER_BUILD_ROOT_PATH=${NNSTREAMER_SOURCE_ROOT_PATH}/${BUILDDIR}
export GST_PLUGIN_PATH=${NNSTREAMER_BUILD_ROOT_PATH}/gst/nnstreamer
export NNSTREAMER_CONF=${NNSTREAMER_BUILD_ROOT_PATH}/nnstreamer-test.ini
export NNSTREAMER_FILTERS=${NNSTREAMER_BUILD_ROOT_PATH}/ext/nnstreamer/tensor_filter
export NNSTREAMER_DECODERS=${NNSTREAMER_BUILD_ROOT_PATH}/ext/nnstreamer/tensor_decoder
export NNSTREAMER_CONVERTERS=${NNSTREAMER_BUILD_ROOT_PATH}/ext/nnstreamer/tensor_converter
export PYTHONIOENCODING=utf-8
ifneq ($(filter $(DEB_HOST_ARCH),amd64),)
enable_tf=enabled
else
enable_tf=disabled
endif
%:
dh $@ --parallel
override_dh_auto_clean:
rm -rf ${BUILDDIR}
rm -rf tools/development/confchk/${BUILDDIR}
override_dh_auto_configure:
mkdir -p ${BUILDDIR}
meson --buildtype=plain --prefix=/usr --sysconfdir=/etc --libdir=lib/$(DEB_HOST_MULTIARCH) --bindir=lib/nnstreamer/bin --includedir=include \
-Dtf-support=$(enable_tf) -Dtflite-support=enabled -Dpytorch-support=enabled -Dcaffe2-support=enabled \
-Dpython2-support=enabled -Dpython3-support=enabled -Denable-capi=true -Denable-edgetpu=true -Denable-tizen=false \
-Denable-openvino=true ${BUILDDIR}
cd tools/development/confchk && meson --prefix=/usr --bindir=bin ${BUILDDIR} && cd ../../..
override_dh_auto_build:
ninja -C ${BUILDDIR}
cd tools/development/confchk && ninja -C ${BUILDDIR} && cd ../../..
override_dh_auto_test:
./packaging/run_unittests_binaries.sh ./tests
# SKIP CAPI-UnitTest until we fix it. In Launchpad emulator, capi_src.dummy01 and single_invoke01/02 makes errors due to the slugghish issue.
# cd build && ./tests/tizen_capi/unittest_tizen_capi --gst-plugin-path=. && cd ..
cd tests && ssat -n && cd ..
override_dh_link:
dh_link /usr/lib/$(DEB_HOST_MULTIARCH)/gstreamer-1.0/libnnstreamer.so /usr/lib/$(DEB_HOST_MULTIARCH)/libnnstreamer.so
override_dh_auto_install:
DESTDIR=$(CURDIR)/debian/tmp ninja -C ${BUILDDIR} install
cd tools/development/confchk && DESTDIR=$(CURDIR)/debian/tmp ninja -C ${BUILDDIR} install && cd ../../..
override_dh_install:
dh_install --sourcedir=debian/tmp --list-missing
# Add --fail-missing option after adding *.install files for all subpackages.