Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge "Fix build of contrail-web-core and contrail-web-controller"
- Loading branch information
Showing
10 changed files
with
81 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,23 @@ | ||
#!/usr/bin/make -f | ||
|
||
SB_TOP := $(shell pwd | sed -re "s/(.*)\/build\/packages(.*)/\1/") | ||
INSTALL_ROOT := $(shell pwd) | ||
export REPO=${SB_TOP}/contrail-web-controller,webController | ||
|
||
%: | ||
dh $@ | ||
|
||
override_dh_installinit: | ||
dh_installinit | ||
dh_installinit --name=contrail-webui-jobserver | ||
dh_installinit --name=contrail-webui-webserver | ||
|
||
#BRANCH=--branch R1.06 | ||
#TAGS=tags/v1.06 | ||
SRC_PACKAGE = contrail-web-controller | ||
SRC_VERSION := $(shell dpkg-parsechangelog | sed -ne 's/^Version: \(\([0-9]\+\):\)\?\(.*\)/\3/p') | ||
TARBALL = $(SRC_PACKAGE)_$(SRC_VERSION).orig.tar.gz | ||
DEB_DIR := $(shell pwd) | ||
|
||
get-orig-source: | ||
if [ "$(BRANCH)x" != "x" ] ; then \ | ||
echo "Building $(BRANCH)... "; \ | ||
else \ | ||
echo "Building mainline... "; \ | ||
fi | ||
rm -rf get-orig-source ../$(TARBALL) | ||
mkdir get-orig-source | ||
cd get-orig-source;git clone $(BRANCH) git@github.com:Juniper/contrail-webui-third-party | ||
if [ "$(TAGS)x" != "x" ] ; then \ | ||
cd get-orig-source/contrail-webui-third-party;git checkout $(TAGS); \ | ||
fi | ||
cd get-orig-source/contrail-webui-third-party;python ./fetch_packages.py | ||
cd get-orig-source;git clone $(BRANCH) git@github.com:Juniper/contrail-web-core.git; | ||
if [ "$(TAGS)x" != "x" ] ; then \ | ||
cd get-orig-source/contrail-web-core;git checkout $(TAGS); \ | ||
fi | ||
cd get-orig-source;git clone $(BRANCH) git@github.com:Juniper/contrail-web-controller.git; | ||
if [ "$(TAGS)x" != "x" ] ; then \ | ||
cd get-orig-source/contrail-web-controller;git checkout $(TAGS); \ | ||
fi | ||
cd get-orig-source/contrail-web-core;make package REPO=$(DEB_DIR)/get-orig-source/contrail-web-controller,webController | ||
GZIP=--best tar czf ../$(TARBALL) -C get-orig-source/$(SRC_PACKAGE) . | ||
ls get-orig-source/$(SRC_PACKAGE) | xargs -n 1 -I'{}' mv get-orig-source/$(SRC_PACKAGE)/'{}' . | ||
rm -rf get-orig-source | ||
echo "../$(TARBALL) created" | ||
override_dh_auto_build: | ||
# We can't use make package directly because it tries to fetch third party | ||
# from network which is not available during build | ||
(cd ${SB_TOP}/contrail-web-core; \ | ||
./generate-files.sh 'prod-env' $(REPO)) | ||
|
||
.PHONY: get-orig-source | ||
override_dh_install: | ||
cp -r -a contrail-web-controller/webroot ${INSTALL_ROOT} | ||
dh_install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
etc/contrail/config.global.js var/lib/contrail-webui/contrail-web-core/config/config.global.js | ||
etc/contrail/contrail-webui-userauth.js var/lib/contrail-webui/contrail-web-core/config/userAuth.js | ||
var/lib/contrail-webui/node_modules var/lib/contrail-webui/contrail-web-core/node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,36 @@ | ||
#!/usr/bin/make -f | ||
|
||
SB_TOP := $(shell pwd | sed -re "s/(.*)\/build\/packages(.*)/\1/") | ||
INSTALL_ROOT := $(shell pwd) | ||
export REPO=${SB_TOP}/contrail-web-core | ||
|
||
%: | ||
dh $@ | ||
|
||
#BRANCH=--branch R1.06 | ||
#TAGS=tags/v1.06 | ||
SRC_PACKAGE = contrail-web-core | ||
SRC_VERSION := $(shell dpkg-parsechangelog | sed -ne 's/^Version: \(\([0-9]\+\):\)\?\(.*\)/\3/p') | ||
TARBALL = $(SRC_PACKAGE)_$(SRC_VERSION).orig.tar.gz | ||
DEB_DIR := $(shell pwd) | ||
|
||
get-orig-source: | ||
if [ "$(BRANCH)x" != "x" ] ; then \ | ||
echo "Building $(BRANCH)... "; \ | ||
else \ | ||
echo "Building mainline... "; \ | ||
fi | ||
rm -rf get-orig-source ../$(TARBALL) | ||
mkdir get-orig-source | ||
cd get-orig-source;git clone $(BRANCH) git@github.com:Juniper/$(SRC_PACKAGE).git | ||
if [ "$(TAGS)x" != "x" ] ; then \ | ||
cd get-orig-source/$(SRC_PACKAGE);git checkout $(TAGS); \ | ||
fi | ||
cd get-orig-source;git clone $(BRANCH) git@github.com:Juniper/contrail-webui-third-party.git | ||
if [ "$(TAGS)x" != "x" ] ; then \ | ||
cd get-orig-source/contrail-webui-third-party;git checkout $(TAGS); \ | ||
fi | ||
cd get-orig-source/contrail-webui-third-party;python ./fetch_packages.py | ||
cd get-orig-source/$(SRC_PACKAGE);make package REPO=$(DEB_DIR)/get-orig-source/contrail-web-core | ||
cd get-orig-source/$(SRC_PACKAGE); rm -rf Makefile | ||
GZIP=--best tar czf ../$(TARBALL) -C get-orig-source/$(SRC_PACKAGE) . | ||
ls get-orig-source/$(SRC_PACKAGE) | xargs -n 1 -I'{}' mv get-orig-source/$(SRC_PACKAGE)/'{}' . | ||
rm -rf get-orig-source | ||
echo "../$(TARBALL) created" | ||
override_dh_auto_build: | ||
# We can't use make package directly because it tries to fetch third party | ||
# from network which is not available during build | ||
(cd ${SB_TOP}/contrail-web-core; \ | ||
rm -f webroot/html/dashboard.html; \ | ||
rm -f webroot/html/login.html; \ | ||
rm -f webroot/html/login-error.html; \ | ||
cp -a webroot/html/dashboard.tmpl webroot/html/dashboard.html; \ | ||
cp -a webroot/html/login.tmpl webroot/html/login.html; \ | ||
cp -a webroot/html/login-error.tmpl webroot/html/login-error.html; \ | ||
./generate-files.sh 'prod-env' $(REPO); \ | ||
./dev-install.sh; \ | ||
./prod-dev.sh webroot/html/dashboard.html prod_env dev_env true; \ | ||
./prod-dev.sh webroot/html/login.html prod_env dev_env true; \ | ||
./prod-dev.sh webroot/html/login-error.html prod_env dev_env true) | ||
|
||
.PHONY: get-orig-source | ||
override_dh_install: | ||
cp -r -a ${SB_TOP}/contrail-web-core/Gruntfile.js ${INSTALL_ROOT} | ||
cp -r -a ${SB_TOP}/contrail-web-core/keys ${INSTALL_ROOT} | ||
cp -r -a ${SB_TOP}/contrail-web-core/package.json ${INSTALL_ROOT} | ||
cp -r -a ${SB_TOP}/contrail-web-core/webroot ${INSTALL_ROOT} | ||
cp -r -a ${SB_TOP}/contrail-web-core/jobServerStart.js ${INSTALL_ROOT} | ||
cp -r -a ${SB_TOP}/contrail-web-core/node_modules ${INSTALL_ROOT} | ||
cp -r -a ${SB_TOP}/contrail-web-core/src ${INSTALL_ROOT} | ||
cp -r -a ${SB_TOP}/contrail-web-core/webServerStart.js ${INSTALL_ROOT} | ||
cp -r -a ${SB_TOP}/contrail-web-core/config ${INSTALL_ROOT} | ||
dh_install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters