mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-04 23:02:02 +01:00
make new installs easier
Add make target and script option to install debs
This commit is contained in:
parent
36aef059c1
commit
4717308c4d
2 changed files with 26 additions and 1 deletions
|
@ -70,6 +70,24 @@ endif
|
|||
|
||||
memdebug all: xwrelay rq
|
||||
|
||||
REQUIRED_DEBS = libpq-dev \
|
||||
|
||||
.PHONY: debcheck debs_install
|
||||
|
||||
debs_install:
|
||||
sudo apt-get install $(REQUIRED_DEBS)
|
||||
|
||||
debcheck:
|
||||
@if which dpkg; then \
|
||||
for DEB in $(REQUIRED_DEBS); do \
|
||||
if ! dpkg -l $$DEB >/dev/null 2>&1; then \
|
||||
echo "$$DEB not installed"; \
|
||||
echo "try running 'make debs_install'"; \
|
||||
break; \
|
||||
fi \
|
||||
done; \
|
||||
fi
|
||||
|
||||
# Manual config in order to place -lpq after the .obj files as
|
||||
# required by something Ubuntu did upgrading natty to oneiric
|
||||
xwrelay: $(OBJ)
|
||||
|
|
|
@ -14,7 +14,7 @@ LOGFILE=/tmp/xwrelay_log_$$.txt
|
|||
date > $LOGFILE
|
||||
|
||||
usage() {
|
||||
echo "usage: $0 start | stop | restart | mkdb"
|
||||
echo "usage: $0 start | stop | restart | mkdb | debs_install"
|
||||
}
|
||||
|
||||
make_db() {
|
||||
|
@ -114,6 +114,10 @@ do_start() {
|
|||
fi
|
||||
}
|
||||
|
||||
install_debs() {
|
||||
sudo apt-get install postgresql-client postgresql
|
||||
}
|
||||
|
||||
case $1 in
|
||||
|
||||
stop)
|
||||
|
@ -149,6 +153,9 @@ case $1 in
|
|||
make_db
|
||||
;;
|
||||
|
||||
debs_install)
|
||||
install_debs
|
||||
;;
|
||||
*)
|
||||
usage
|
||||
exit 0
|
||||
|
|
Loading…
Reference in a new issue