1 # Copyright (c) 2015 Cisco and/or its affiliates.
2 # Licensed under the Apache License, Version 2.0 (the "License");
3 # you may not use this file except in compliance with the License.
4 # You may obtain a copy of the License at:
6 # http://www.apache.org/licenses/LICENSE-2.0
8 # Unless required by applicable law or agreed to in writing, software
9 # distributed under the License is distributed on an "AS IS" BASIS,
10 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 # See the License for the specific language governing permissions and
12 # limitations under the License.
14 # Pick up per-platform makefile fragments
15 $(foreach d,$(SOURCE_PATH_BUILD_DATA_DIRS), \
16 $(eval -include $(d)/platforms/*.mk))
19 install-deb: $(patsubst %,%-find-source,$(ROOT_PACKAGES))
21 set -eu$(BUILD_DEBUG) ; \
22 $(MAKE) -C $(MU_BUILD_ROOT_DIR) \
23 $(patsubst %,%-install, \
24 $(ROOT_PACKAGES)) || exit 1; \
26 : generate file manifests ; \
27 find $(INSTALL_PREFIX)$(ARCH)/*/bin -type f -print \
28 | sed -e 's:.*:../& /usr/bin:' | grep -v vppapigen \
29 > deb/debian/vpp.install ; \
31 : core api definitions ; \
32 ./scripts/find-api-core-contents $(INSTALL_PREFIX)$(ARCH) \
33 deb/debian/vpp.install ; \
35 : need symbolic links in the lib pkg ; \
36 find $(INSTALL_PREFIX)$(ARCH)/*/lib* \( -type f -o -type l \) \
37 -print | egrep -e '*\.so\.*\.*\.*' \
39 | sed -e 's:.*:../& /usr/lib/$(MACHINE)-linux-gnu:' \
40 > deb/debian/vpp-lib.install ; \
42 : vnet api definitions ; \
43 ./scripts/find-api-lib-contents $(INSTALL_PREFIX)$(ARCH) \
44 deb/debian/vpp-lib.install ; \
47 ./scripts/find-dev-contents $(INSTALL_PREFIX)$(ARCH) \
48 deb/debian/vpp-dev.install ; \
51 ./scripts/find-plugins-contents $(INSTALL_PREFIX)$(ARCH) \
52 deb/debian/vpp-plugins.install ; \
54 : vpp-api-lua package ; \
55 ./scripts/find-vpp-api-lua-contents $(INSTALL_PREFIX)$(ARCH) \
56 deb/debian/vpp-api-lua.install ; \
58 : vpp-api-java package ; \
59 ./scripts/find-vpp-api-java-contents $(INSTALL_PREFIX)$(ARCH) \
60 deb/debian/vpp-api-java.install ; \
62 : bin package needs startup config ; \
63 echo ../../src/vpp/conf/startup.conf /etc/vpp \
64 >> deb/debian/vpp.install ; \
66 : and sysctl config ; \
67 echo ../../src/vpp/conf/80-vpp.conf /etc/sysctl.d \
68 >> deb/debian/vpp.install ; \
70 : bash completion for vppctl ; \
71 echo ../../src/scripts/vppctl_completion /etc/bash_completion.d \
72 >> deb/debian/vpp.install ; \
74 : move dictionary of vppctl commands ; \
75 echo ../../src/scripts/vppctl-cmd-list /usr/share/vpp \
76 >> deb/debian/vpp.install ; \
78 : add log directory ; \
80 >> deb/debian/vpp.dirs ; \
82 : dev package needs a couple of additions ; \
83 echo ../$(INSTALL_PREFIX)$(ARCH)/vpp/bin/vppapigen /usr/bin \
84 >> deb/debian/vpp-dev.install ; \
85 echo ../$(INSTALL_PREFIX)$(ARCH)/vpp/share/vpp/C.py /usr/share/vpp \
86 >> deb/debian/vpp-dev.install ; \
87 echo ../$(INSTALL_PREFIX)$(ARCH)/vpp/share/vpp/JSON.py /usr/share/vpp \
88 >> deb/debian/vpp-dev.install ; \
89 echo ../../src/vpp-api/java/jvpp/gen/jvpp_gen.py /usr/bin \
90 >> deb/debian/vpp-dev.install ; \
91 for i in $$(ls ../src/vpp-api/java/jvpp/gen/jvppgen/*.py); do \
92 echo ../$${i} /usr/lib/python2.7/dist-packages/jvppgen \
93 >> deb/debian/vpp-dev.install; \
96 : generate changelog; \
97 ./scripts/generate-deb-changelog \
99 : Go fabricate the actual Debian packages ; \
102 dpkg-buildpackage -us -uc -b \