From 58b24d70d44ecdd36242d731df408e119f3a363e Mon Sep 17 00:00:00 2001 From: MyungJoo Ham Date: Thu, 13 Jun 2019 20:28:37 +0900 Subject: [PATCH] [Dist/Debian] Add libnpuhost pkging for Ubuntu/Debian To prepare CI system, we need build/pkging services. Signed-off-by: MyungJoo Ham --- debian/changelog | 5 +++++ debian/compat | 1 + debian/control | 17 ++++------------- debian/copyright | 3 +++ debian/libnpuhost-dev.install | 2 ++ debian/libnpuhost.install | 1 + debian/rules | 41 +++++++++++++++++++++++++++++++++++++++++ 7 files changed, 57 insertions(+), 13 deletions(-) create mode 100644 debian/changelog create mode 100644 debian/compat create mode 100644 debian/copyright create mode 100644 debian/libnpuhost-dev.install create mode 100644 debian/libnpuhost.install create mode 100755 debian/rules diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..eebedba --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +libnpuhost (0.0.1.0) unstable xenial bionic; urgency=medium + + * 0.0.1 RC development started + + -- MyungJoo Ham Thu, 13 Jun 2019 20:25:00 +0900 diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..ec63514 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +9 diff --git a/debian/control b/debian/control index 8a6a70e..22454f3 100644 --- a/debian/control +++ b/debian/control @@ -1,4 +1,4 @@ -Source: npuruntime-core +Source: libnpuhost Section: libs Priority: optional Maintainer: MyungJoo Ham @@ -6,21 +6,12 @@ Build-Depends: gcc (>=0) Standards-Version: 3.9.6 Homepage: https://research.samsung.com -Package: libnpuhost-usb +Package: libnpuhost Architecture: any Multi-Arch: same -Provides: libnpuhost Depends: ${shlibs:Depends}, ${misc:Depends} -Description: Host library for NPU USB Device. - This allows to interact with NPU-USB device from host computer. - -Package: libnpuhost-ip -Architecture: any -Multi-Arch: same -Provides: libnpuhost -Depends: ${shlibs:Depends}, ${misc:Depends} -Description: Host library for NPU SoC-IP Device. - This allows to interact with NPU SoC-IP device from host computer. +Description: Host library for NPU Device. + This allows to interact with NPU device from host computer. Package: libnpuhost-dev Architecture: any diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..2e4e761 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,3 @@ +Files: * +License: Proprietary +Copyright(C) Samsung Electonics 2019 diff --git a/debian/libnpuhost-dev.install b/debian/libnpuhost-dev.install new file mode 100644 index 0000000..11d7a2b --- /dev/null +++ b/debian/libnpuhost-dev.install @@ -0,0 +1,2 @@ +/usr/include/npuhost/*.h +/usr/lib/*/pkgconfig/*.pc diff --git a/debian/libnpuhost.install b/debian/libnpuhost.install new file mode 100644 index 0000000..fdffd49 --- /dev/null +++ b/debian/libnpuhost.install @@ -0,0 +1 @@ +/usr/lib/*/*.so diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..af99f07 --- /dev/null +++ b/debian/rules @@ -0,0 +1,41 @@ +#!/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) + +%: + dh $@ --parallel + +override_dh_auto_clean: + rm -rf build + +override_dh_auto_configure: + mkdir -p build + meson --buildtype=plain --prefix=/usr --sysconfdir=/etc --libdir=lib/$(DEB_HOST_MULTIARCH) --bindir=bin --includedir=include build + +override_dh_auto_build: + ninja -C build + +override_dh_auto_test: + echo "NO UNIT TEST AVAILABLE YET" + +override_dh_auto_install: + DESTDIR=$(CURDIR)/debian/tmp ninja -C build install + +override_dh_install: + dh_install --sourcedir=debian/tmp --list-missing +# Add --fail-missing option after adding *.install files for all subpackages. -- 2.7.4