blob: 45bd3a1b8a10afa9843c04071c3af66c89a37531 [file] [log] [blame]
Ed Warnickecb9cada2015-12-08 15:45:58 -07001# 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:
5#
6# http://www.apache.org/licenses/LICENSE-2.0
7#
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.
13
14# Pick up per-platform makefile fragments
15$(foreach d,$(SOURCE_PATH_BUILD_DATA_DIRS), \
16 $(eval -include $(d)/platforms/*.mk))
17
18.PHONY: install-deb
19install-deb: $(patsubst %,%-find-source,$(ROOT_PACKAGES))
20 @$(BUILD_ENV) ; \
21 set -eu$(BUILD_DEBUG) ; \
22 $(MAKE) -C $(MU_BUILD_ROOT_DIR) \
23 $(patsubst %,%-install, \
24 $(ROOT_PACKAGES)) || exit 1; \
25 \
26 : generate file manifests ; \
27 find $(INSTALL_PREFIX)$(ARCH)/*/bin -type f -print \
Damjan Marioncb034b92016-12-28 18:38:59 +010028 | sed -e 's:.*:../& /usr/bin:' | grep -v vppapigen \
Ed Warnickecb9cada2015-12-08 15:45:58 -070029 > deb/debian/vpp.install ; \
Dave Barach1c113112016-02-03 12:59:38 -050030 \
Ole Troanf14e3bf2016-12-01 21:49:03 +010031 : core api definitions ; \
32 ./scripts/find-api-core-contents $(INSTALL_PREFIX)$(ARCH) \
33 deb/debian/vpp.install ; \
34 \
Dave Barach1c113112016-02-03 12:59:38 -050035 : need symbolic links in the lib pkg ; \
36 find $(INSTALL_PREFIX)$(ARCH)/*/lib* \( -type f -o -type l \) \
37 -print | egrep -e '*\.so\.*\.*\.*' \
Damjan Marionad476c72016-07-13 13:42:33 +020038 | grep -v plugins\/ \
Nitin Saxena9cfb1172017-12-27 10:31:41 +000039 | sed -e 's:.*:../& /usr/lib/$(MACHINE)-linux-gnu:' \
Ed Warnickecb9cada2015-12-08 15:45:58 -070040 > deb/debian/vpp-lib.install ; \
41 \
Ole Troanf14e3bf2016-12-01 21:49:03 +010042 : vnet api definitions ; \
43 ./scripts/find-api-lib-contents $(INSTALL_PREFIX)$(ARCH) \
44 deb/debian/vpp-lib.install ; \
45 \
Ed Warnickecb9cada2015-12-08 15:45:58 -070046 : dev package ; \
47 ./scripts/find-dev-contents $(INSTALL_PREFIX)$(ARCH) \
48 deb/debian/vpp-dev.install ; \
49 \
Damjan Marionad476c72016-07-13 13:42:33 +020050 : plugins package ; \
51 ./scripts/find-plugins-contents $(INSTALL_PREFIX)$(ARCH) \
52 deb/debian/vpp-plugins.install ; \
53 \
Damjan Marioncb034b92016-12-28 18:38:59 +010054 : vpp-api-lua package ; \
55 ./scripts/find-vpp-api-lua-contents $(INSTALL_PREFIX)$(ARCH) \
56 deb/debian/vpp-api-lua.install ; \
57 \
58 : vpp-api-java package ; \
59 ./scripts/find-vpp-api-java-contents $(INSTALL_PREFIX)$(ARCH) \
60 deb/debian/vpp-api-java.install ; \
61 \
Ed Warnickecb9cada2015-12-08 15:45:58 -070062 : bin package needs startup config ; \
Damjan Marion7cd468a2016-12-19 23:05:39 +010063 echo ../../src/vpp/conf/startup.conf /etc/vpp \
Ed Warnickecb9cada2015-12-08 15:45:58 -070064 >> deb/debian/vpp.install ; \
65 \
66 : and sysctl config ; \
Damjan Marion7cd468a2016-12-19 23:05:39 +010067 echo ../../src/vpp/conf/80-vpp.conf /etc/sysctl.d \
Ed Warnickecb9cada2015-12-08 15:45:58 -070068 >> deb/debian/vpp.install ; \
69 \
Padraig Connolly69915cb2017-01-10 17:10:39 +000070 : bash completion for vppctl ; \
71 echo ../../src/scripts/vppctl_completion /etc/bash_completion.d \
72 >> deb/debian/vpp.install ; \
73 \
74 : move dictionary of vppctl commands ; \
75 echo ../../src/scripts/vppctl-cmd-list /usr/share/vpp \
76 >> deb/debian/vpp.install ; \
77 \
Ed Warnickecb9cada2015-12-08 15:45:58 -070078 : dev package needs a couple of additions ; \
Damjan Marion0be5ec32016-12-28 17:51:56 +010079 echo ../$(INSTALL_PREFIX)$(ARCH)/vpp/bin/vppapigen /usr/bin \
Ole Troan5f9dcff2016-08-01 04:59:13 +020080 >> deb/debian/vpp-dev.install ; \
Ole Troan9d420872017-10-12 13:06:35 +020081 echo ../$(INSTALL_PREFIX)$(ARCH)/vpp/share/vpp/C.py /usr/share/vpp \
82 >> deb/debian/vpp-dev.install ; \
83 echo ../$(INSTALL_PREFIX)$(ARCH)/vpp/share/vpp/JSON.py /usr/share/vpp \
84 >> deb/debian/vpp-dev.install ; \
Damjan Marioncb034b92016-12-28 18:38:59 +010085 echo ../../src/vpp-api/java/jvpp/gen/jvpp_gen.py /usr/bin \
Ole Troan5f9dcff2016-08-01 04:59:13 +020086 >> deb/debian/vpp-dev.install ; \
Damjan Marioncb034b92016-12-28 18:38:59 +010087 for i in $$(ls ../src/vpp-api/java/jvpp/gen/jvppgen/*.py); do \
Ole Troan5f9dcff2016-08-01 04:59:13 +020088 echo ../$${i} /usr/lib/python2.7/dist-packages/jvppgen \
89 >> deb/debian/vpp-dev.install; \
90 done; \
Ed Warnickecb9cada2015-12-08 15:45:58 -070091 \
92 : generate changelog; \
93 ./scripts/generate-deb-changelog \
94 \
95 : Go fabricate the actual Debian packages ; \
96 ( \
97 cd deb && \
98 dpkg-buildpackage -us -uc -b \
99 )
100