Line # Revision Author
1 8 ahitrov@rambler.ru ##############################################################################
2 # Project default & calculated settings
3 ###############################################################################
4
5
6 # it must!
7 PROJECT_NAME ?= $(error "ERROR: PROJECT_NAME not defined")
8
9 ifeq (${DB_TYPE},NONE)
10 PGSQL_PORT =
11 PGSQL_BASE =
12
13 BASE_HOST =
14 BASE_USER =
15 BASE_PASSWD =
16 else
17 PGSQL_PORT ?= $(error "ERROR: PGSQL_PORT not defined")
18 PGSQL_BASE ?= $(error "ERROR: PGSQL_BASE not defined")
19
20 BASE_HOST ?= $(error "ERROR: BASE_HOST not defined")
21 BASE_USER ?= $(error "ERROR: BASE_USER not defined")
22 BASE_PASSWD ?= $(error "ERROR: BASE_PASSWD not defined")
23 endif
24
25 # additional DB for replications
26 MASTER_BASE_HOST ?= ${BASE_HOST}
27 MASTER_BASE_NAME ?= ${PGSQL_BASE}
28 MASTER_BASE_PASSWD ?= ${BASE_PASSWD}
29 MASTER_BASE_PORT ?= ${PGSQL_PORT}
30 MASTER_BASE_USER ?= ${BASE_USER}
31
32 # additional ports if any
33 PROJECT_REQUIRED ?=
34 217 ahitrov SERIALIZE_WITH ?=
35 650 ahitrov VCS_TYPE ?= svn
36 8 ahitrov@rambler.ru
37 # defaults
38 PRELOADS ?=
39 PERSISTENT_CONN ?= YES
40 PGSQL_REAL_PREPARE ?= YES
41
42 459 ahitrov MEMCACHED_BACKEND ?= Cache::Memcached::Fast
43 8 ahitrov@rambler.ru MEMCACHED_ENABLE ?= NO
44 MEMCACHED_SELECT_TIMEOUT ?= 0.5
45 MEMCACHED_SERVERS ?=
46 MEMCACHED_ENABLE_COMPRESS ?= YES
47 MEMCACHED_DELAYED ?= NO
48 MEMCACHED_SET_MODE ?= SET
49
50 STORE_METHOD ?= TOAST
51 CASCADE ?= YES
52
53 # TODO drop PREVIEW!
54 PREVIEW ?= 150x150
55 AUTH_COOKIE ?= rsid
56
57 DEFAULT_HANDLER ?= HTML::Mason::ApacheHandler
58 DEFAULT_ESCAPE_FLAGS ?=
59
60 # main preamble hanler
61 PREAMBLE_HANDLER ?=
62 # extra preamble handlers relative path
63 PREAMBLE_HANDLER_PATH ?=
64
65 RSYNC_DIRS ?=
66 614 ahitrov RSYNC_CORE_DIRS += contenido/i
67 8 ahitrov@rambler.ru
68 # apache pool
69 ${PROJECT_LC}_START_SERVERS ?= 1
70 START_SERVERS ?= ${${PROJECT_LC}_START_SERVERS}
71
72 ${PROJECT_LC}_MAX_CLIENTS ?= 3
73 MAX_CLIENTS ?= ${${PROJECT_LC}_MAX_CLIENTS}
74
75 ${PROJECT_LC}_MIN_SPARE_SERVERS ?= 1
76 MIN_SPARE_SERVERS ?= ${${PROJECT_LC}_MIN_SPARE_SERVERS}
77
78 ${PROJECT_LC}_MAX_SPARE_SERVERS ?= ${shell perl -e 'print ${MIN_SPARE_SERVERS}+1'}
79 MAX_SPARE_SERVERS ?= ${${PROJECT_LC}_MAX_SPARE_SERVERS}
80
81 ${PROJECT_LC}_SPARE_REAPER_DELAY ?= 0
82 SPARE_REAPER_DELAY ?= ${${PROJECT_LC}_SPARE_REAPER_DELAY}
83
84 SPARE_REAPER_DELAY_FAKEMOD ?= ${shell perl -e 'print ${SPARE_REAPER_DELAY} ? "http_core" : "nonexistent"'}
85
86 # logging
87 ${PROJECT_LC}_HTTPD_ELOG_LEVEL ?= info
88 HTTPD_ELOG_LEVEL ?= ${${PROJECT_LC}_HTTPD_ELOG_LEVEL}
89
90 # kinds of limits
91 MAX_PROCESS_SIZE ?= 65535
92 LIMIT_CMD ?= /usr/bin/limits
93 LIMIT_VMEMORY_HTTPD ?= 256m
94 LISTEN_BACK_LOG_PERCHILD ?= 5
95 LISTEN_BACK_LOG ?= ${shell perl -e 'print ${LISTEN_BACK_LOG_PERCHILD}*${MAX_CLIENTS}'}
96
97 # logging options
98 RSYSLOG_ENABLE ?= NO
99 RSYSLOG_HOST ?= lc.park.rambler.ru
100 LOGGER ?= ${LOCAL}/bin/clogger
101
102 # disable 'start' command
103 DISABLE ?= ${${PROJECT_LC}_DISABLE}
104
105 # cronolog options
106 CRONOLOG_ENABLE ?= NO
107 CRONOLOG_FORMAT ?= %Y/%m/%d/
108
109 # load cron tab
110 CRON_ENABLE ?= NO
111
112 LOCALE ?= ru_RU.UTF-8
113
114 # use mtt or old rewrite?
115 USE_MTT ?= NO
116
117 # use READONLY mode
118 READONLY ?= NO
119
120 # later captcha setting
121 USE_CAPTCHA ?= NO
122 ifeq (${USE_CAPTCHA},YES)
123 CORE_REQUIRED += Authen-Captcha
124 endif
125
126 # Calculated
127 MODULES =
128 ifeq (${shell perl -e 'print lc "${DEVELOPMENT}"'},yes)
129 MODULES = ${PROJ_SRC}/${PROJECT}/lib
130 endif
131 MODULES += ${PROJ_USR}/${PROJECT}/lib
132 ifneq (${PLUGINS},)
133 MODULES += ${addprefix ${PLUG_USR}/,${addsuffix /lib,${PLUGINS}}}
134 endif
135 MODULES += ${CORE_USR}/lib
136
137 PLUGIN_COMP ?= ${shell perl -e 'print lc "${DEVELOPMENT}" eq "yes" ? "${PLUG_SRC}" : "${PLUG_USR}"'}
138 MASON_COMP ?= ${shell perl -e 'print lc "${DEVELOPMENT}" eq "yes" ? "${PROJ_SRC}" : "${PROJ_USR}"'}/${PROJECT}/comps
139 CORE_COMP ?= ${shell perl -e 'print lc "${DEVELOPMENT}" eq "yes" ? "${CORE_SRC}" : "${CORE_USR}"'}/comps
140 RSYNC_ROOT ?= ${PROJ_USR}/${PROJECT}/comps
141 614 ahitrov RSYNC_CORE_ROOT ?= ${CORE_USR}/comps
142 ASSETS_ROOT ?= ${PROJ_VAR}/${PROJECT}
143 8 ahitrov@rambler.ru BINARY ?= ${MASON_COMP}/binary
144 ifdef FRONTENDS
145 FILES ?= ${addprefix http://, ${addsuffix /dav/${PROJECT_LC}, ${FRONTENDS}}}
146 else
147 FILES ?= ${MASON_COMP}/files
148 endif
149 IMAGES ?= ${MASON_COMP}/images
150 STATIC_SOURCE_TOUCH_FILE ?= ${MASON_COMP}/.touch
151
152 203 ahitrov # Files are stored in NFS (=Common) or independently on each front (=Separate)
153 FILE_WEB_STORAGE ?= Separate
154
155 8 ahitrov@rambler.ru HTTPD_DOCS ?= ${MASON_COMP}/www
156 CONF ?= ${PROJ_USR}/${PROJECT}/conf
157
158 # pregenerate static
159 PREGEN_GLOB ?= keeper project state
160 PREGEN_LIST ?=
161
162 # Mason caching
163 MASON_CACHE_ENABLED ?= YES
164
165 # Mason caching via Memcached
166 MASON_MEMCACHED_BACKEND ?= ${MEMCACHED_BACKEND}
167 MASON_MEMCACHED_DEBUG ?= NO
168 MASON_MEMCACHED_ENABLED ?= NO
169 MASON_MEMCACHED_NAMESPACE ?= ${PROJECT}:${PROJECT_VERSION}
170 MASON_MEMCACHED_SERVERS ?=
171 597 ahitrov COMP_TIMINGS_DISABLE ?= YES
172 8 ahitrov@rambler.ru
173 # overrides
174 ifeq (${DB_TYPE},SINGLE)
175 BASE_HOST =
176 endif
177
178 # psql wrappers
179 PSQL ?= ${shell export PATH=${LOCAL}/pgsql/bin:$${PATH}; \
180 PSQL=`which psql`; \
181 if [ -x "$${PSQL}" ]; then \
182 echo $${PSQL}; \
183 else \
184 echo 'echo "ERROR: No executable psql found";'; \
185 echo 'echo "HINT: Add path to psql to your environment PATH";'; \
186 echo 'exit 1;'; \
187 fi;}
188
189 PGDUMP ?= ${shell export PATH=${LOCAL}/pgsql/bin:$${PATH}; \
190 PGDUMP=`which pg_dump`; \
191 if [ -x "$${PGDUMP}" ]; then \
192 echo $${PGDUMP}; \
193 else \
194 echo 'echo "ERROR: No executable pg_dump found";'; \
195 echo 'echo "HINT: Add path to pg_dump to your environment PATH";'; \
196 echo 'exit 1;'; \
197 fi;}
198
199 # rsync wrappers
200 RSYNC = ${shell export PATH=${LOCAL}/bin:$${PATH}; \
201 RSYNC=`which rsync`; \
202 if [ -x "$${RSYNC}" ]; then \
203 echo $${RSYNC}; \
204 else \
205 echo 'echo "ERROR: No executable rsync found";'; \
206 echo 'echo "HINT: Add path to rsync to your environment PATH,";'; \
207 echo 'echo " or install with: make port_install PORT=rsync``";'; \
208 echo 'exit 1;'; \
209 fi;}
210
211 365 ahitrov COMPOSITE = ${shell export PATH=${LOCAL}/bin:$${PATH}; which composite}
212 496 ahitrov #CONVERT = ${shell export PATH=${LOCAL}/bin:$${PATH}; which convert}
213 #ifeq (${CONVERT},)
214 #${error ERROR: No executable convert found, you need to install ImageMagick first}
215 #endif