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} @mkdir -p ${CONF_DIR}
@cp ./examples/conf.yaml ${CONF_DIR} @cp ./examples/conf.yaml ${CONF_DIR}
@cp ./examples/csv_rates.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} \ @fpm -s dir -t deb -n ${NAME} -v ${VERSION} \
--pre-install=packaging/scripts/pre_install.sh \ --pre-install=packaging/scripts/pre_install.sh \
--post-install=packaging/scripts/post_install.sh \ --post-install=packaging/scripts/post_install.sh \
--deb-pre-depends postgresql-9.2 \ --depends 'postgresql >= 9.2' \
--deb-pre-depends postgresql-server-dev-9.2 \ --depends 'postgresql-contrib >= 9.2' \
--deb-pre-depends postgresql-contrib-9.2 \ --depends 'libpq-dev' \
--deb-pre-depends pwgen \ --deb-pre-depends pwgen \
--deb-pre-depends python2.7 \ --deb-pre-depends python2.7 \
--deb-pre-depends python-pip \ --deb-pre-depends python-pip \

View File

@ -16,3 +16,19 @@ virtualenv <%= install_path %>/env
# And this. Woo. # 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