-
Notifications
You must be signed in to change notification settings - Fork 45
/
rules
executable file
·36 lines (32 loc) · 1.51 KB
/
rules
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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 $@
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)
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