-
Notifications
You must be signed in to change notification settings - Fork 18
/
Makefile
64 lines (48 loc) · 1.88 KB
/
Makefile
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
CURDIR ?= $(PWD)
#An empty string for DSTDIR will install OpenVNet under /opt/axsh/openvnet
DSTDIR ?= ""
all: install-bundle
dev: install-bundle-dev update-config
install-bundle:
(cd $(CURDIR)/vnet; bundle install --path vendor/bundle --without development test --standalone)
(cd $(CURDIR)/client/vnctl; bundle install --path vendor/bundle --without development test --standalone)
clean-bundle:
(cd $(CURDIR)/vnet; bundle clean)
(cd $(CURDIR)/client/vnctl; bundle clean)
install-bundle-dev:
(cd $(CURDIR)/vnet; bundle install --path vendor/bundle)
(cd $(CURDIR)/client/vnctl; bundle install --path vendor/bundle)
install: update-config
mkdir -p $(DSTDIR)/opt/axsh/openvnet
cp -r vnet client/vnctl deployment $(DSTDIR)/opt/axsh/openvnet
uninstall: remove-config
rm -rf $(DSTDIR)/opt/axsh/openvnet
rm -rf $(DSTDIR)/var/run/openvnet
reinstall: uninstall install
update-config:
mkdir -p $(DSTDIR)/etc/openvnet
cp -r deployment/conf_files/etc/openvnet $(DSTDIR)/etc/
cp -r deployment/conf_files/etc/default $(DSTDIR)/etc
cp -r deployment/conf_files/etc/init $(DSTDIR)/etc
remove-config:
rm -rf $(DSTDIR)/etc/openvnet
rm $(DSTDIR)/etc/default/vnet-vna
rm $(DSTDIR)/etc/default/vnet-vnmgr
rm $(DSTDIR)/etc/default/vnet-webapi
rm $(DSTDIR)/etc/default/openvnet
rm $(DSTDIR)/etc/init/vnet-vna.conf
rm $(DSTDIR)/etc/init/vnet-vnmgr.conf
rm $(DSTDIR)/etc/init/vnet-webapi.conf
clean:
rm -rf $(CURDIR)/vnet/vendor
rm -rf $(CURDIR)/vnet/.bundle
rm -rf $(CURDIR)/client/vnctl/vendor
rm -rf $(CURDIR)/client/vnctl/.bundle
build-rpm: build-rpm-third-party build-rpm-vnet
build-rpm-vnet:
$(CURDIR)/deployment/packagebuild/build_packages_vnet.sh
build-rpm-third-party:
(cd $(CURDIR)/deployment/packagebuild; bundle install --path vendor/bundle --binstubs)
$(CURDIR)/deployment/packagebuild/build_packages_third_party.sh
test-rpm-install:
$(CURDIR)/deployment/packagebuild/test-rpm-install.sh