blob: 0351ee503e6abdef098aee5ceeada75005d80dc5 [file] [log] [blame]
Damjan Marion4d2f86a2019-01-18 13:28:22 +01001#!/usr/bin/make -f
2# See debhelper(7) (uncomment to enable)
3# output every command that modifies files on the build system.
4DH_VERBOSE = 1
5
6# see EXAMPLES in dpkg-buildflags(1) and read /usr/share/dpkg/*
7DPKG_EXPORT_BUILDFLAGS = 1
8include /usr/share/dpkg/default.mk
9
10export PYBUILD_NAME = vpp-api-python
11export PYBUILD_DIR = @CMAKE_SOURCE_DIR@/vpp-api/python
12export PYBUILD_DESTDIR_python2=debian/vpp-api-python/
13export PYBUILD_DISABLE_python2=test
14export PYBUILD_SYSTEM=distutils
15
16# main packaging script based on dh7 syntax
17%:
18 dh $@ --with systemd,python2 --buildsystem=pybuild
19
Damjan Marion4d2f86a2019-01-18 13:28:22 +010020override_dh_strip:
21 dh_strip --dbg-package=vpp-dbg
22
23DEB_HOST_MULTIARCH = $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
24
25override_dh_install:
Damjan Marion4686d392019-01-22 10:28:29 +010026 @for c in @VPP_COMPONENTS@; do \
Damjan Marion4d2f86a2019-01-18 13:28:22 +010027 @CMAKE_COMMAND@ \
28 -D CMAKE_INSTALL_CONFIG_NAME=@CMAKE_BUILD_TYPE@ \
29 -D CMAKE_INSTALL_COMPONENT=$$c \
30 -D CMAKE_INSTALL_PREFIX=@CMAKE_BINARY_DIR@/debian/$$c \
Damjan Mariond734b8d2019-01-22 11:14:46 +010031 -P @CMAKE_BINARY_DIR@/cmake_install.cmake 2>&1 \
32 | grep -v 'Set runtime path of' ; \
Damjan Marion4d2f86a2019-01-18 13:28:22 +010033 if [ -d debian/$$c/lib ] ; then \
34 mv debian/$$c/lib debian/$$c/$(DEB_HOST_MULTIARCH) ; \
35 mkdir -p debian/$$c/usr/lib ; \
36 mv debian/$$c/$(DEB_HOST_MULTIARCH) debian/$$c/usr/lib ; \
37 fi ; \
Damjan Marion4686d392019-01-22 10:28:29 +010038 for d in bin include share ; do \
39 if [ -d debian/$$c/$$d ] ; then \
40 mkdir -p debian/$$c/usr ; \
41 mv debian/$$c/$$d debian/$$c/usr/$$d ; \
42 fi ; \
43 done ; \
44 if [ -d debian/$$c ] ; then \
45 @CMAKE_SOURCE_DIR@/scripts/remove-rpath debian/$$c ; \
Damjan Marion4d2f86a2019-01-18 13:28:22 +010046 fi ; \
Damjan Marion4d2f86a2019-01-18 13:28:22 +010047 done