summaryrefslogtreecommitdiffstats
path: root/src/pkg/debian/rules.in
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2019-01-18 13:28:22 +0100
committerDamjan Marion <dmarion@me.com>2019-01-20 16:14:24 +0000
commit4d2f86a1ebcfc952080386603354c4767d2c8825 (patch)
treed20ed373877bfbf145d3b7ed0773a0cdbfaee32e /src/pkg/debian/rules.in
parente67c1d8242fec255e7449fedcbdec5c66bb3f7b2 (diff)
Rework of debian packaging
Change-Id: Ifede85d3af36f3ee6c6f8f92dcf5db0ed8f1bfeb Signed-off-by: Damjan Marion <damarion@cisco.com> Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'src/pkg/debian/rules.in')
-rwxr-xr-xsrc/pkg/debian/rules.in45
1 files changed, 45 insertions, 0 deletions
diff --git a/src/pkg/debian/rules.in b/src/pkg/debian/rules.in
new file mode 100755
index 00000000000..4d2bb408116
--- /dev/null
+++ b/src/pkg/debian/rules.in
@@ -0,0 +1,45 @@
+#!/usr/bin/make -f
+# See debhelper(7) (uncomment to enable)
+# output every command that modifies files on the build system.
+DH_VERBOSE = 1
+
+# see EXAMPLES in dpkg-buildflags(1) and read /usr/share/dpkg/*
+DPKG_EXPORT_BUILDFLAGS = 1
+include /usr/share/dpkg/default.mk
+
+export PYBUILD_NAME = vpp-api-python
+export PYBUILD_DIR = @CMAKE_SOURCE_DIR@/vpp-api/python
+export PYBUILD_DESTDIR_python2=debian/vpp-api-python/
+export PYBUILD_DISABLE_python2=test
+export PYBUILD_SYSTEM=distutils
+
+# main packaging script based on dh7 syntax
+%:
+ dh $@ --with systemd,python2 --buildsystem=pybuild
+
+override_dh_shlibdeps:
+ @dh_shlibdeps -X_plugin 2>&1 \
+ | { grep -v -e "probably a plugin" || true; }
+
+override_dh_strip:
+ dh_strip --dbg-package=vpp-dbg
+
+DEB_HOST_MULTIARCH = $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
+
+override_dh_install:
+ for c in @VPP_COMPONENTS@; do \
+ @CMAKE_COMMAND@ \
+ -D CMAKE_INSTALL_CONFIG_NAME=@CMAKE_BUILD_TYPE@ \
+ -D CMAKE_INSTALL_COMPONENT=$$c \
+ -D CMAKE_INSTALL_PREFIX=@CMAKE_BINARY_DIR@/debian/$$c \
+ -P @CMAKE_BINARY_DIR@/cmake_install.cmake ; \
+ if [ -d debian/$$c/lib ] ; then \
+ mv debian/$$c/lib debian/$$c/$(DEB_HOST_MULTIARCH) ; \
+ mkdir -p debian/$$c/usr/lib ; \
+ mv debian/$$c/$(DEB_HOST_MULTIARCH) debian/$$c/usr/lib ; \
+ fi ; \
+ if [ -d debian/$$c/bin ] ; then \
+ mv debian/$$c/bin debian/$$c/usr/bin ; \
+ fi ; \
+ @CMAKE_SOURCE_DIR@/scripts/remove-rpath debian/$$c ; \
+ done