mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-08 05:24:39 +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
|
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
|
# Manual config in order to place -lpq after the .obj files as
|
||||||
# required by something Ubuntu did upgrading natty to oneiric
|
# required by something Ubuntu did upgrading natty to oneiric
|
||||||
xwrelay: $(OBJ)
|
xwrelay: $(OBJ)
|
||||||
|
|
|
@ -14,7 +14,7 @@ LOGFILE=/tmp/xwrelay_log_$$.txt
|
||||||
date > $LOGFILE
|
date > $LOGFILE
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
echo "usage: $0 start | stop | restart | mkdb"
|
echo "usage: $0 start | stop | restart | mkdb | debs_install"
|
||||||
}
|
}
|
||||||
|
|
||||||
make_db() {
|
make_db() {
|
||||||
|
@ -114,6 +114,10 @@ do_start() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
install_debs() {
|
||||||
|
sudo apt-get install postgresql-client postgresql
|
||||||
|
}
|
||||||
|
|
||||||
case $1 in
|
case $1 in
|
||||||
|
|
||||||
stop)
|
stop)
|
||||||
|
@ -149,6 +153,9 @@ case $1 in
|
||||||
make_db
|
make_db
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
debs_install)
|
||||||
|
install_debs
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
usage
|
usage
|
||||||
exit 0
|
exit 0
|
||||||
|
|
Loading…
Reference in a new issue