Revision 334
Added by Aaron Marcuse-Kubitza almost 13 years ago
Makefile | ||
---|---|---|
1 | 1 |
# Make |
2 |
|
|
2 | 3 |
SHELL := /bin/bash |
3 | 4 |
subMake = $(if $(wildcard $(@D)/Makefile*),$(MAKE) $(@F) --directory=$(@D),) |
4 | 5 |
|
... | ... | |
27 | 28 |
# Env |
28 | 29 |
export PGOPTIONS = --client-min-messages=WARNING |
29 | 30 |
|
31 |
# File editing |
|
32 |
sudoAppend = echo $$'$$\na\n$(2)\n.\nwq'|sudo ed --verbose $(1) |
|
33 |
|
|
30 | 34 |
##### |
31 | 35 |
|
32 | 36 |
all: _not_file install |
... | ... | |
55 | 59 |
reinstall_core: _not_file rm_core core |
56 | 60 |
|
57 | 61 |
python-Linux: _not_file |
58 |
-sudo apt-get install python-dev python-dateutil python-pip |
|
62 |
-sudo apt-get install python python-dev python-dateutil python-pip
|
|
59 | 63 |
|
60 | 64 |
python-Darwin: _not_file |
61 | 65 |
@echo $(emph)'Installing python-dateutil on Mac OS X:'$(endEmph) |
... | ... | |
67 | 71 |
@echo "Run python -c 'import dateutil'" |
68 | 72 |
@$(wait) |
69 | 73 |
|
74 |
editPhppgadminApacheConf =\ |
|
75 |
echo $$'1\n/^allow from 127\.0\.0\.0\b/\ns/^/\# /\n/\# allow from all/\ns/^\# //\nwq'|\ |
|
76 |
sudo ed --verbose /etc/phppgadmin/apache.conf |
|
77 |
|
|
78 |
apacheConf := /etc/apache2/apache2.conf |
|
79 |
apacheConfPhppgadminLine := Include /etc/phppgadmin/apache.conf |
|
80 |
editApacheConfForPhppgadmin =\ |
|
81 |
$(if $(shell grep -F "$(apacheConfPhppgadminLine)" $(apacheConf)),,\ |
|
82 |
$(call sudoAppend,$(apacheConf),\n$(apacheConfPhppgadminLine))) |
|
83 |
|
|
84 |
editApachePortsConf =\ |
|
85 |
echo $$'1\n,s/\\b80\\b/8080/g\nwq'|sudo ed --verbose /etc/apache2/ports.conf |
|
86 |
|
|
70 | 87 |
postgres-Linux: _not_file |
71 | 88 |
-sudo apt-get install postgresql libpq-dev phppgadmin |
89 |
-$(editPhppgadminApacheConf) |
|
90 |
$(editApacheConfForPhppgadmin) |
|
91 |
-$(if $(shell sudo lsof -i :80),$(editApachePortsConf)) |
|
92 |
-sudo apache2ctl restart |
|
72 | 93 |
-sudo pip install psycopg2 |
94 |
# ignore errors if conf files already edited |
|
73 | 95 |
|
74 | 96 |
postgres-Darwin: _not_file |
75 | 97 |
@echo $(emph)'Installing PostgreSQL on Mac OS X:'$(endEmph) |
Also available in: Unified diff
Makefile: Added phppgadmin apache config