-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy pathMakefile
More file actions
176 lines (159 loc) · 5.49 KB
/
Copy pathMakefile
File metadata and controls
176 lines (159 loc) · 5.49 KB
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
COLTE_LIGHT_VERSION=0.10.0
COLTE_FULL_VERSION=0.10.0
COLTE_VERSION=0.9.11
CONF_VERSION=0.9.13
WEBSERVICES_VERSION=0.9.10
WEBGUI_VERSION=0.9.10
WEBADMIN_VERSION=0.9.1
YOUTUBE_VERSION=0.9
TARGET_DIR=./BUILD/
build_deps:
sudo apt-get install ruby ruby-dev rubygems build-essential
sudo gem install --no-ri --no-rdoc fpm
web_deps_ubuntu:
sudo apt-get install npm nodejs
web_deps_debian:
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
sudo apt-get install nodejs
.PHONY: webadmin webgui
target:
mkdir -p $(TARGET_DIR)
light: target
fpm --input-type empty \
--output-type deb \
--force \
--vendor uw-ictd \
--maintainer sevilla@cs.washington.edu \
--description "The Community LTE Project - Light Version (EPC and Conf-tools Only)" \
--url "https://github.com/uw-ictd/colte" \
--deb-compression xz \
--name colte-light \
--version $(COLTE_LIGHT_VERSION) \
--package $(TARGET_DIR) \
--depends 'colte-epc (>= 0.9.3), colte-conf'
full: target
fpm --input-type dir \
--output-type deb \
--force \
--vendor uw-ictd \
--maintainer sevilla@cs.washington.edu \
--description "The Community LTE Project - Full Version (inc. Haulage and Webtools)" \
--url "https://github.com/uw-ictd/colte" \
--deb-compression xz \
--name colte-full \
--version $(COLTE_FULL_VERSION) \
--package $(TARGET_DIR) \
--depends 'colte-epc, colte-webservices, haulage, colte-conf' \
./package/colte/haulage.yml=/usr/local/etc/colte/haulage.yml
# deprecate this target?!?!?!?
colte: target
fpm --input-type dir \
--output-type deb \
--force \
--vendor uw-ictd \
--maintainer sevilla@cs.washington.edu \
--description "The Community LTE Project" \
--url "https://github.com/uw-ictd/colte" \
--deb-compression xz \
--name colte \
--version $(COLTE_VERSION) \
--package $(TARGET_DIR) \
--depends 'colte-epc (>= 0.9.3), colte-webservices, haulage, colte-conf' \
./package/colte/haulage.yml=/usr/local/etc/colte/haulage.yml
conf: target
fpm --input-type dir \
--output-type deb \
--force \
--vendor uw-ictd \
--config-files /usr/bin/colte/roles/configure/vars/main.yml \
--maintainer sevilla@cs.washington.edu \
--description "Configuration Tools for CoLTE" \
--url "https://github.com/uw-ictd/colte" \
--deb-compression xz \
--name colte-conf \
--version $(CONF_VERSION) \
--package $(TARGET_DIR) \
--depends 'ansible, python-mysqldb, colte-db' \
--after-install ./conf/postinst \
--after-remove ./conf/postrm \
./conf/colteconf=/usr/bin/ \
./conf/coltedb=/usr/bin/ \
./conf/colte=/usr/bin/ \
./conf/colte-tcpdump.service=/etc/systemd/system/colte-tcpdump.service \
./conf/config.yml=/usr/local/etc/colte/config.yml
webservices: target
fpm --input-type empty \
--output-type deb \
--force \
--vendor uw-ictd \
--maintainer sevilla@cs.washington.edu \
--description "CoLTE Locally-Hosted Webservices" \
--url "https://github.com/uw-ictd/colte" \
--deb-compression xz \
--name colte-webservices \
--version $(WEBSERVICES_VERSION) \
--package $(TARGET_DIR) \
--depends 'colte-webgui, colte-webadmin'
webgui: target
cd webgui; npm install
cd webgui; cp production.env .env
fpm --input-type dir \
--output-type deb \
--force \
--vendor uw-ictd \
--config-files /usr/bin/colte-webgui/.env \
--maintainer sevilla@cs.washington.edu \
--description "WebGUI for CoLTE users to check balance, buy/sell data, etc." \
--url "https://github.com/uw-ictd/colte" \
--deb-compression xz \
--name colte-webgui \
--version $(WEBGUI_VERSION) \
--package $(TARGET_DIR) \
--depends 'nodejs, colte-db (>= 0.9.2)' \
--after-install ./package/webgui/postinst \
--after-remove ./package/webgui/postrm \
./webgui/=/usr/bin/colte-webgui \
./package/webgui/colte-webgui.service=/etc/systemd/system/colte-webgui.service \
./package/webgui/webgui.env=/usr/local/etc/colte/webgui.env \
./package/webgui/pricing.json=/usr/local/etc/colte/pricing.json
webadmin: target
cd webadmin; npm install
cd webadmin; cp production.env .env
fpm --input-type dir \
--output-type deb \
--force \
--vendor uw-ictd \
--config-files /usr/bin/colte-webadmin/.env \
--maintainer sevilla@cs.washington.edu \
--description "Web-based tool for CoLTE network administrators." \
--url "https://github.com/uw-ictd/colte" \
--deb-compression xz \
--name colte-webadmin \
--version $(WEBADMIN_VERSION) \
--package $(TARGET_DIR) \
--depends 'nodejs (>= 8.0.0), colte-db (>= 0.9.11), colte-conf' \
--after-install ./package/webadmin/postinst \
--after-remove ./package/webadmin/postrm \
./webadmin/=/usr/bin/colte-webadmin \
./package/webadmin/colte-webadmin.service=/etc/systemd/system/colte-webadmin.service \
./package/webadmin/webadmin.env=/usr/local/etc/colte/webadmin.env
### Locally-Hosted Webservices Start Here ###
ourtube: target
fpm --input-type dir \
--output-type deb \
--force \
--vendor uw-ictd \
--config-files /usr/bin/ourtube_data/conf/ourtube.config \
--maintainer durandn@cs.washington.edu \
--description "Locally-Hosted Open Source Video Sharing App" \
--url "https://github.com/uw-ictd/colte" \
--name ourtube \
--version $(YOUTUBE_VERSION) \
--package $(TARGET_DIR) \
--depends 'python3, python3-pip' \
--after-install ./package/ourtube/postinst \
--after-remove ./package/ourtube/postrm \
./lte_extras/ourtube/=/usr/bin/ourtube_data \
./package/ourtube/ourtube=/usr/bin/ourtube \
./package/ourtube/ourtube.service=/etc/systemd/system/ourtube.service \
./package/ourtube/ourtube.config=/usr/local/etc/ourtube.config