forked from aurynn/openstack-artifice
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
42 lines (36 loc) · 1.08 KB
/
Makefile
File metadata and controls
42 lines (36 loc) · 1.08 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
VERSION=0.1
NAME=openstack-artifice
INSTALL_PATH=/opt/stack/artifice
BILLING_PROGRAM=bill.py
BINARY_PATH=/usr/local/bin
CONF_DIR=./work/${INSTALL_PATH}/etc/artifice
clean:
@rm -rf ./work
@rm -f *.deb
init:
@mkdir ./work/
@mkdir -p ./work${INSTALL_PATH}
@mkdir -p ./work${BINARY_PATH}
deb: clean init
@cp -r ./bin ./artifice ./scripts ./README.md ./INVOICES.md \
requirements.txt setup.py ./work/${INSTALL_PATH}
@mkdir -p ${CONF_DIR}
@cp ./examples/conf.yaml ${CONF_DIR}
@cp ./examples/csv_rates.yaml ${CONF_DIR}
@fpm -s dir -t deb -n ${NAME} -v ${VERSION} \
--pre-install=packaging/scripts/pre_install.sh \
--post-install=packaging/scripts/post_install.sh \
--depends 'postgresql >= 9.2' \
--depends 'postgresql-contrib >= 9.2' \
--depends 'libpq-dev' \
--deb-pre-depends pwgen \
--deb-pre-depends python2.7 \
--deb-pre-depends python-pip \
--deb-pre-depends python-dev \
--template-scripts \
--template-value pg_database=artifice \
--template-value pg_user=artifice \
--template-value pg_port=5432 \
--template-value install_path=${INSTALL_PATH} \
-C ./work \
.