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 740 ahitrov EMAIL_ENABLE ?= NO
69
70 8 ahitrov@rambler.ru # apache pool
71 ${PROJECT_LC}_START_SERVERS ?= 1
72 START_SERVERS ?= ${${PROJECT_LC}_START_SERVERS}
73
74 ${PROJECT_LC}_MAX_CLIENTS ?= 3
75 MAX_CLIENTS ?= ${${PROJECT_LC}_MAX_CLIENTS}
76
77 ${PROJECT_LC}_MIN_SPARE_SERVERS ?= 1
78 MIN_SPARE_SERVERS ?= ${${PROJECT_LC}_MIN_SPARE_SERVERS}
79
80 ${PROJECT_LC}_MAX_SPARE_SERVERS ?= ${shell perl -e 'print ${MIN_SPARE_SERVERS}+1'}
81 MAX_SPARE_SERVERS ?= ${${PROJECT_LC}_MAX_SPARE_SERVERS}
82
83 ${PROJECT_LC}_SPARE_REAPER_DELAY ?= 0
84 SPARE_REAPER_DELAY ?= ${${PROJECT_LC}_SPARE_REAPER_DELAY}
85
86 SPARE_REAPER_DELAY_FAKEMOD ?= ${shell perl -e 'print ${SPARE_REAPER_DELAY} ? "http_core" : "nonexistent"'}
87
88 # logging
89 ${PROJECT_LC}_HTTPD_ELOG_LEVEL ?= info
90 HTTPD_ELOG_LEVEL ?= ${${PROJECT_LC}_HTTPD_ELOG_LEVEL}
91
92 # kinds of limits
93 MAX_PROCESS_SIZE ?= 65535
94 LIMIT_CMD ?= /usr/bin/limits
95 LIMIT_VMEMORY_HTTPD ?= 256m
96 LISTEN_BACK_LOG_PERCHILD ?= 5
97 LISTEN_BACK_LOG ?= ${shell perl -e 'print ${LISTEN_BACK_LOG_PERCHILD}*${MAX_CLIENTS}'}
98
99 # logging options
100 RSYSLOG_ENABLE ?= NO
101 RSYSLOG_HOST ?= lc.park.rambler.ru
102 LOGGER ?= ${LOCAL}/bin/clogger
103
104 # disable 'start' command
105 DISABLE ?= ${${PROJECT_LC}_DISABLE}
106
107 # cronolog options
108 CRONOLOG_ENABLE ?= NO
109 CRONOLOG_FORMAT ?= %Y/%m/%d/
110
111 # load cron tab
112 CRON_ENABLE ?= NO
113
114 LOCALE ?= ru_RU.UTF-8
115
116 # use mtt or old rewrite?
117 USE_MTT ?= NO
118
119 # use READONLY mode
120 READONLY ?= NO
121
122 # later captcha setting
123 USE_CAPTCHA ?= NO
124 ifeq (${USE_CAPTCHA},YES)
125 CORE_REQUIRED += Authen-Captcha
126 endif
127
128 # Calculated
129 MODULES =
130 ifeq (${shell perl -e 'print lc "${DEVELOPMENT}"'},yes)
131 MODULES = ${PROJ_SRC}/${PROJECT}/lib
132 endif
133 MODULES += ${PROJ_USR}/${PROJECT}/lib
134 ifneq (${PLUGINS},)
135 MODULES += ${addprefix ${PLUG_USR}/,${addsuffix /lib,${PLUGINS}}}
136 endif
137 MODULES += ${CORE_USR}/lib
138
139 PLUGIN_COMP ?= ${shell perl -e 'print lc "${DEVELOPMENT}" eq "yes" ? "${PLUG_SRC}" : "${PLUG_USR}"'}
140 MASON_COMP ?= ${shell perl -e 'print lc "${DEVELOPMENT}" eq "yes" ? "${PROJ_SRC}" : "${PROJ_USR}"'}/${PROJECT}/comps
141 CORE_COMP ?= ${shell perl -e 'print lc "${DEVELOPMENT}" eq "yes" ? "${CORE_SRC}" : "${CORE_USR}"'}/comps
142 RSYNC_ROOT ?= ${PROJ_USR}/${PROJECT}/comps
143 614 ahitrov RSYNC_CORE_ROOT ?= ${CORE_USR}/comps
144 ASSETS_ROOT ?= ${PROJ_VAR}/${PROJECT}
145 8 ahitrov@rambler.ru BINARY ?= ${MASON_COMP}/binary
146 ifdef FRONTENDS
147 FILES ?= ${addprefix http://, ${addsuffix /dav/${PROJECT_LC}, ${FRONTENDS}}}
148 else
149 FILES ?= ${MASON_COMP}/files
150 endif
151 IMAGES ?= ${MASON_COMP}/images
152 STATIC_SOURCE_TOUCH_FILE ?= ${MASON_COMP}/.touch
153
154 203 ahitrov # Files are stored in NFS (=Common) or independently on each front (=Separate)
155 FILE_WEB_STORAGE ?= Separate
156
157 8 ahitrov@rambler.ru HTTPD_DOCS ?= ${MASON_COMP}/www
158 CONF ?= ${PROJ_USR}/${PROJECT}/conf
159
160 # pregenerate static
161 PREGEN_GLOB ?= keeper project state
162 PREGEN_LIST ?=
163
164 # Mason caching
165 MASON_CACHE_ENABLED ?= YES
166
167 # Mason caching via Memcached
168 MASON_MEMCACHED_BACKEND ?= ${MEMCACHED_BACKEND}
169 MASON_MEMCACHED_DEBUG ?= NO
170 MASON_MEMCACHED_ENABLED ?= NO
171 MASON_MEMCACHED_NAMESPACE ?= ${PROJECT}:${PROJECT_VERSION}
172 MASON_MEMCACHED_SERVERS ?=
173 597 ahitrov COMP_TIMINGS_DISABLE ?= YES
174 8 ahitrov@rambler.ru
175 # overrides
176 ifeq (${DB_TYPE},SINGLE)
177 BASE_HOST =
178 endif
179
180 # psql wrappers
181 PSQL ?= ${shell export PATH=${LOCAL}/pgsql/bin:$${PATH}; \
182 PSQL=`which psql`; \
183 if [ -x "$${PSQL}" ]; then \
184 echo $${PSQL}; \
185 else \
186 echo 'echo "ERROR: No executable psql found";'; \
187 echo 'echo "HINT: Add path to psql to your environment PATH";'; \
188 echo 'exit 1;'; \
189 fi;}
190
191 PGDUMP ?= ${shell export PATH=${LOCAL}/pgsql/bin:$${PATH}; \
192 PGDUMP=`which pg_dump`; \
193 if [ -x "$${PGDUMP}" ]; then \
194 echo $${PGDUMP}; \
195 else \
196 echo 'echo "ERROR: No executable pg_dump found";'; \
197 echo 'echo "HINT: Add path to pg_dump to your environment PATH";'; \
198 echo 'exit 1;'; \
199 fi;}
200
201 # rsync wrappers
202 RSYNC = ${shell export PATH=${LOCAL}/bin:$${PATH}; \
203 RSYNC=`which rsync`; \
204 if [ -x "$${RSYNC}" ]; then \
205 echo $${RSYNC}; \
206 else \
207 echo 'echo "ERROR: No executable rsync found";'; \
208 echo 'echo "HINT: Add path to rsync to your environment PATH,";'; \
209 echo 'echo " or install with: make port_install PORT=rsync``";'; \
210 echo 'exit 1;'; \
211 fi;}
212
213 365 ahitrov COMPOSITE = ${shell export PATH=${LOCAL}/bin:$${PATH}; which composite}
214 496 ahitrov #CONVERT = ${shell export PATH=${LOCAL}/bin:$${PATH}; which convert}
215 #ifeq (${CONVERT},)
216 #${error ERROR: No executable convert found, you need to install ImageMagick first}
217 #endif