-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
25 lines (21 loc) · 1.19 KB
/
Makefile
File metadata and controls
25 lines (21 loc) · 1.19 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
SHELL = /bin/bash
INSTALL_PATH=/opt/dewey
install: FINAL_PATH = $(DESTDIR)$(INSTALL_PATH)
all:
install:
[ -f .gitmodules ] || git submodule init
git submodule update --init
cd lib && git fetch && git pull origin master && git lfs pull && cd ..
mkdir -p $(FINAL_PATH) $(DESTDIR)/usr/bin $(DESTDIR)/etc/init $(DESTDIR)/etc/default
virtualenv -p python3 $(FINAL_PATH)
. $(FINAL_PATH)/bin/activate && pip --version | grep 9.0.1 || pip install --no-index --find-links lib/python --upgrade pip
. $(FINAL_PATH)/bin/activate && pip install --no-index --find-links lib/python -r requirements/production.txt
. $(FINAL_PATH)/bin/activate && python setup.py install
rsync -rl bin/ $(DESTDIR)/usr/bin/
cp debian/dewey-scheduler.upstart $(DESTDIR)/etc/init/dewey-scheduler.conf
cp debian/dewey-worker.upstart $(DESTDIR)/etc/init/dewey-worker.conf
cp debian/dewey-flower.upstart $(DESTDIR)/etc/init/dewey-flower.conf
for file in `ls lib/misc/*.tar.gz`; do tar xzf $$file -C $(DESTDIR); done
virtualenv -p python3 --relocatable $(FINAL_PATH)
echo '[ -f /etc/default/dewey ] && . /etc/default/dewey' >> $(FINAL_PATH)/bin/activate
sed -i 's/^VIRTUAL_ENV.*$$/VIRTUAL_ENV="\/opt\/dewey"/' $(FINAL_PATH)/bin/activate