forked from CanaimaKueka/tribus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
258 lines (146 loc) · 4.89 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
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
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
#!/usr/bin/make -f
# -*- makefile -*-
#
# Copyright (C) 2013 Desarrolladores de Tribus
#
# This file is part of Tribus.
#
# Tribus is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Tribus is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
SHELL = sh -e
PATH = "/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
FAB = fab
SU = su
APTITUDE = aptitude
FAB = $(shell which fab)
SU = $(shell which su)
APTITUDE = $(shell which aptitude)
# MAINTAINER TASKS ---------------------------------------------------------------------------------
checkpkg:
@printf "Checking if we have $(PACKAGE) ... "
@if [ -z $(shell which $(TESTBIN)) ]; then \
echo "[ABSENT]"; \
echo "Installing $(PACKAGE) ... "; \
echo "Enter your root password:"; \
$(SU) root -c 'DEBIAN_FRONTEND="noninteractive" $(APTITUDE) install --assume-yes --allow-untrusted -o DPkg::Options::="--force-confmiss" -o DPkg::Options::="--force-confnew" -o DPkg::Options::="--force-overwrite" $(PACKAGE)'; \
else \
echo "[OK]"; \
fi
@echo
fabric:
@$(MAKE) checkpkg PACKAGE=fabric TESTBIN=fab
@$(MAKE) checkpkg PACKAGE=openssh-server TESTBIN=sshd
runserver: fabric
@$(FAB) development runserver_django
runceleryworker: fabric
@$(FAB) development runcelery_worker
runcelerydaemon: fabric
@$(FAB) development runcelery_daemon
shell: fabric
@$(FAB) development shell_django
prepare: fabric
@$(FAB) development build_js
@$(FAB) development build_css
syncdb: fabric
@$(FAB) development syncdb_django
environment: fabric
@$(FAB) development environment
# REPOSITORY TASKS ------------------------------------------------------
create_test_repository: fabric
@$(FAB) development install_repository
@$(FAB) development select_sample_packages
@$(FAB) development get_sample_packages
@$(FAB) development index_sample_packages
install_repository: fabric
@$(FAB) development install_repository
select_samples: fabric
@$(FAB) development select_sample_packages
get_samples: fabric
@$(FAB) development get_sample_packages
get_selected: fabric
@$(FAB) development get_selected
index_selected: fabric
@$(FAB) development index_selected
index_samples: fabric
@$(FAB) development index_sample_packages
# -----------------------------------------------------------------------------
filldb_from_local: fabric
@$(FAB) development filldb_from_local
filldb_from_remote: fabric
@$(FAB) development filldb_from_remote
# INDEX TASKS -----------------------------------------------------------------
rebuild_index: fabric
@$(FAB) development rebuild_index
clean_tasks: fabric
@$(FAB) development clean_tasks
# -----------------------------------------------------------------------------
# TESTS TASKS -----------------------------------------------------------------
wipe_repo: fabric
@$(FAB) development wipe_repo
# -----------------------------------------------------------------------------
resetdb:
@$(FAB) development resetdb
update_virtualenv: fabric
@$(FAB) development update_virtualenv
update_catalog: fabric
@$(FAB) development update_catalog
compile_catalog: fabric
@$(FAB) development compile_catalog
init_catalog: fabric
@$(FAB) development init_catalog
extract_messages: fabric
@$(FAB) development extract_messages
tx_push: fabric
@$(FAB) development tx_push
tx_pull: fabric
@$(FAB) development tx_pull
# BUILD TASKS ------------------------------------------------------------------------------
build: fabric
@$(FAB) development build
build_sphinx: fabric
@$(FAB) development build_sphinx
build_mo: fabric
@$(FAB) development build_mo
build_css: fabric
@$(FAB) development build_css
build_js: fabric
@$(FAB) development build_js
build_man: fabric
@$(FAB) development build_man
# CLEAN TASKS ------------------------------------------------------------------------------
clean: fabric
@$(FAB) development clean
clean_css: fabric
@$(FAB) development clean_css
clean_js: fabric
@$(FAB) development clean_js
clean_mo: fabric
@$(FAB) development clean_mo
clean_sphinx: fabric
@$(FAB) development clean_sphinx
clean_man: fabric
@$(FAB) development clean_man
clean_dist: fabric
@$(FAB) development clean_dist
clean_pyc: fabric
@$(FAB) development clean_pyc
test: fabric
@$(FAB) development test
install: fabric
@$(FAB) development install
bdist: fabric
@$(FAB) development bdist
sdist: fabric
@$(FAB) development sdist
report_setup_data: fabric
@$(FAB) development report_setup_data