[Dist/Debian] Add libnpuhost pkging for Ubuntu/Debian
authorMyungJoo Ham <myungjoo.ham@samsung.com>
Thu, 13 Jun 2019 11:28:37 +0000 (20:28 +0900)
committer함명주/On-Device Lab(SR)/Principal Engineer/삼성전자 <myungjoo.ham@samsung.com>
Mon, 17 Jun 2019 01:15:44 +0000 (10:15 +0900)
To prepare CI system, we need build/pkging services.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
debian/changelog [new file with mode: 0644]
debian/compat [new file with mode: 0644]
debian/control
debian/copyright [new file with mode: 0644]
debian/libnpuhost-dev.install [new file with mode: 0644]
debian/libnpuhost.install [new file with mode: 0644]
debian/rules [new file with mode: 0755]

diff --git a/debian/changelog b/debian/changelog
new file mode 100644 (file)
index 0000000..eebedba
--- /dev/null
@@ -0,0 +1,5 @@
+libnpuhost (0.0.1.0) unstable xenial bionic; urgency=medium
+
+  * 0.0.1 RC development started
+
+ -- MyungJoo Ham <myungjoo.ham@samsung.com>  Thu, 13 Jun 2019 20:25:00 +0900
diff --git a/debian/compat b/debian/compat
new file mode 100644 (file)
index 0000000..ec63514
--- /dev/null
@@ -0,0 +1 @@
+9
index 8a6a70e..22454f3 100644 (file)
@@ -1,4 +1,4 @@
-Source: npuruntime-core
+Source: libnpuhost
 Section: libs
 Priority: optional
 Maintainer: MyungJoo Ham <myungjoo.ham@samsung.com>
@@ -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 (file)
index 0000000..2e4e761
--- /dev/null
@@ -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 (file)
index 0000000..11d7a2b
--- /dev/null
@@ -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 (file)
index 0000000..fdffd49
--- /dev/null
@@ -0,0 +1 @@
+/usr/lib/*/*.so
diff --git a/debian/rules b/debian/rules
new file mode 100755 (executable)
index 0000000..af99f07
--- /dev/null
@@ -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.