build: remove unnecessary executable bits
[vpp.git] / src / pkg / debian / rules.in
1 #!/usr/bin/make -f
2 # See debhelper(7) (uncomment to enable)
3 # output every command that modifies files on the build system.
4 DH_VERBOSE = 1
5
6 # see EXAMPLES in dpkg-buildflags(1) and read /usr/share/dpkg/*
7 DPKG_EXPORT_BUILDFLAGS = 1
8 include /usr/share/dpkg/default.mk
9
10 export PYBUILD_NAME = vpp-api
11 export PYBUILD_DIR = @CMAKE_SOURCE_DIR@/vpp-api/python
12 export PYBUILD_DESTDIR_python3=debian/python3-vpp-api/
13 export PYBUILD_DISABLE_python3=test
14 export PYBUILD_SYSTEM=distutils
15 DH_WITH = systemd,python3
16
17 build3vers := $(shell py3versions -sv)
18
19 # main packaging script based on dh7 syntax
20 %:
21         dh $@ --with $(DH_WITH) --buildsystem=pybuild
22
23 override_dh_strip:
24         dh_strip --dbg-package=vpp-dbg
25
26 override_dh_install:
27         @for c in @VPP_COMPONENTS@; do \
28           @CMAKE_COMMAND@ \
29             -D CMAKE_INSTALL_CONFIG_NAME=@CMAKE_BUILD_TYPE@ \
30             -D CMAKE_INSTALL_COMPONENT=$$c \
31             -D CMAKE_INSTALL_PREFIX=@VPP_BINARY_DIR@/debian/$$c \
32             -P @CMAKE_BINARY_DIR@/cmake_install.cmake 2>&1 \
33             | grep -v 'Set runtime path of' ; \
34           for d in bin include share lib ; do \
35             if [ -d debian/$$c/$$d ] ; then \
36               mkdir -p debian/$$c/usr ; \
37               mv debian/$$c/$$d debian/$$c/usr/$$d ; \
38             fi ; \
39           done ; \
40           if [ -d debian/$$c ] ; then \
41             @CMAKE_SOURCE_DIR@/scripts/remove-rpath debian/$$c ; \
42           fi ; \
43         done