Minor cleanup to the install functionality

This commit is contained in:
Aurynn Shaw 2013-10-31 15:38:50 +13:00
parent 555bfbd3ff
commit b3a1c33eaa
2 changed files with 21 additions and 6 deletions

View File

@ -23,13 +23,12 @@ deb: clean init
@mkdir -p ${CONF_DIR}
@cp ./examples/conf.yaml ${CONF_DIR}
@cp ./examples/csv_rates.yaml ${CONF_DIR}
@ln -s ./work${INSTALL_PATH}/bin/${BILLING_PROGRAM} ./work${BINARY_PATH}/artifice-bill
@fpm -s dir -t deb -n ${NAME} -v ${VERSION} \
--pre-install=packaging/scripts/pre_install.sh \
--post-install=packaging/scripts/post_install.sh \
--deb-pre-depends postgresql-9.2 \
--deb-pre-depends postgresql-server-dev-9.2 \
--deb-pre-depends postgresql-contrib-9.2 \
--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 \
@ -40,4 +39,4 @@ deb: clean init
--template-value pg_port=5432 \
--template-value install_path=${INSTALL_PATH} \
-C ./work \
.
.

View File

@ -15,4 +15,20 @@ virtualenv <%= install_path %>/env
<%=install_path%>/env/bin/python <%= install_path %>/scripts/initdb.py
# And this. Woo.
<%=install_path%>/env/bin/python <%= install_path%>/setup.py install # register with python!
<%=install_path%>/env/bin/python <%= install_path%>/setup.py install # register with python!
# Set up the /usr/local/artifice-bill script
cat > /usr/local/bin/artifice-bill <<EOF
#!/bin/bash
<%=install_path%>/env/bin/python <%=install_path%>/bin/bill.py $@
EOF
cat > /usr/local/bin/artifice-usage <<EOF
#!/bin/bash
<%=install_path%>/env/bin/python <%=install_path%>/bin/usage.py $@
EOF