This commit was generated by cvs2svn to compensate for changes in r12472,
[freeside.git] / rt / Makefile.in
1 # BEGIN BPS TAGGED BLOCK {{{
2 #
3 # COPYRIGHT:
4 #
5 # This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC
6 #                                          <sales@bestpractical.com>
7 #
8 # (Except where explicitly superseded by other copyright notices)
9 #
10 #
11 # LICENSE:
12 #
13 # This work is made available to you under the terms of Version 2 of
14 # the GNU General Public License. A copy of that license should have
15 # been provided with this software, but in any event can be snarfed
16 # from www.gnu.org.
17 #
18 # This work is distributed in the hope that it will be useful, but
19 # WITHOUT ANY WARRANTY; without even the implied warranty of
20 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
21 # General Public License for more details.
22 #
23 # You should have received a copy of the GNU General Public License
24 # along with this program; if not, write to the Free Software
25 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
26 # 02110-1301 or visit their web page on the internet at
27 # http://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
28 #
29 #
30 # CONTRIBUTION SUBMISSION POLICY:
31 #
32 # (The following paragraph is not intended to limit the rights granted
33 # to you to modify and distribute this software under the terms of
34 # the GNU General Public License and is only of importance to you if
35 # you choose to contribute your changes and enhancements to the
36 # community by submitting them to Best Practical Solutions, LLC.)
37 #
38 # By intentionally submitting any modifications, corrections or
39 # derivatives to this work, or any other work intended for use with
40 # Request Tracker, to Best Practical Solutions, LLC, you confirm that
41 # you are the copyright holder for those contributions and you grant
42 # Best Practical Solutions,  LLC a nonexclusive, worldwide, irrevocable,
43 # royalty-free, perpetual, license to use, copy, create derivative
44 # works based on those contributions, and sublicense and distribute
45 # those contributions and any derivatives thereof.
46 #
47 # END BPS TAGGED BLOCK }}}
48 #
49 # DO NOT HAND-EDIT the file named 'Makefile'. This file is autogenerated.
50 # Have a look at "configure" and "Makefile.in" instead
51 #
52
53
54 PERL                    =       @PERL@
55 INSTALL                 =       @INSTALL@
56
57 RT_LAYOUT               =       @rt_layout_name@
58
59 CONFIG_FILE_PATH        =       @CONFIG_FILE_PATH_R@
60 CONFIG_FILE             =       $(CONFIG_FILE_PATH)/RT_Config.pm
61 SITE_CONFIG_FILE        =       $(CONFIG_FILE_PATH)/RT_SiteConfig.pm
62
63
64 RT_VERSION_MAJOR        =       @RT_VERSION_MAJOR@
65 RT_VERSION_MINOR        =       @RT_VERSION_MINOR@
66 RT_VERSION_PATCH        =       @RT_VERSION_PATCH@
67
68 RT_VERSION              =       $(RT_VERSION_MAJOR).$(RT_VERSION_MINOR).$(RT_VERSION_PATCH)
69 TAG                     =       rt-$(RT_VERSION_MAJOR)-$(RT_VERSION_MINOR)-$(RT_VERSION_PATCH)
70
71
72 # This is the group that all of the installed files will be chgrp'ed to.
73 RTGROUP                 =       @RTGROUP@
74
75
76 # User which should own rt binaries.
77 BIN_OWNER               =       @BIN_OWNER@
78
79 # User that should own all of RT's libraries, generally root.
80 LIBS_OWNER              =       @LIBS_OWNER@
81
82 # Group that should own all of RT's libraries, generally root.
83 LIBS_GROUP              =       @LIBS_GROUP@
84
85 WEB_USER                =       @WEB_USER@
86 WEB_GROUP               =       @WEB_GROUP@
87
88
89 APACHECTL               =       @APACHECTL@
90
91 # {{{ Files and directories 
92
93 # DESTDIR allows you to specify that RT be installed somewhere other than
94 # where it will eventually reside. DESTDIR _must_ have a trailing slash
95 # if it's defined.
96
97 DESTDIR                 =       
98
99
100
101 RT_PATH                 =       @RT_PATH_R@
102 RT_ETC_PATH             =       @RT_ETC_PATH_R@
103 RT_BIN_PATH             =       @RT_BIN_PATH_R@
104 RT_SBIN_PATH            =       @RT_SBIN_PATH_R@
105 RT_LIB_PATH             =       @RT_LIB_PATH_R@
106 RT_MAN_PATH             =       @RT_MAN_PATH_R@
107 RT_VAR_PATH             =       @RT_VAR_PATH_R@
108 RT_DOC_PATH             =       @RT_DOC_PATH_R@
109 RT_FONT_PATH            =       @RT_FONT_PATH_R@
110 RT_LOCAL_PATH           =       @RT_LOCAL_PATH_R@
111 LOCAL_PLUGIN_PATH       =       @RT_LOCAL_PATH_R@/plugins
112 LOCAL_ETC_PATH          =       @LOCAL_ETC_PATH_R@
113 LOCAL_LIB_PATH          =       @LOCAL_LIB_PATH_R@
114 LOCAL_LEXICON_PATH      =       @LOCAL_LEXICON_PATH_R@
115 MASON_HTML_PATH         =       @MASON_HTML_PATH_R@
116 MASON_LOCAL_HTML_PATH   =       @MASON_LOCAL_HTML_PATH_R@
117 MASON_DATA_PATH         =       @MASON_DATA_PATH_R@
118 MASON_SESSION_PATH      =       @MASON_SESSION_PATH_R@
119 RT_LOG_PATH             =       @RT_LOG_PATH_R@
120
121 # RT_READABLE_DIR_MODE is the mode of directories that are generally meant
122 # to be accessable
123 RT_READABLE_DIR_MODE    =       0755
124
125
126
127
128 # {{{ all these define the places that RT's binaries should get installed
129
130 # RT_MODPERL_HANDLER is the mason handler script for mod_perl
131 RT_MODPERL_HANDLER      =       webmux.pl
132 # RT_STANDALONE_SERVER is a stand-alone HTTP server
133 RT_STANDALONE_SERVER    =       standalone_httpd
134 # RT_SPEEDYCGI_HANDLER is the mason handler script for SpeedyCGI
135 RT_SPEEDYCGI_HANDLER    =       mason_handler.scgi
136 # RT_FASTCGI_HANDLER is the mason handler script for FastCGI
137 RT_FASTCGI_HANDLER      =       mason_handler.fcgi
138 # RT_FASTCGI_SERVER is the FastCGI server
139 RT_FASTCGI_SERVER       =       fastcgi_server
140 # RT_WIN32_FASTCGI_HANDLER is the mason handler script for FastCGI
141 RT_WIN32_FASTCGI_HANDLER        =       mason_handler.svc
142 # RT's CLI
143 RT_CLI_BIN              =       rt
144 # RT's mail gateway
145 RT_MAILGATE_BIN         =       rt-mailgate
146 # RT's cron tool
147 RT_CRON_BIN             =       rt-crontool
148
149 # }}}
150
151
152 BINARIES                =       $(RT_MODPERL_HANDLER) \
153                                 $(RT_MAILGATE_BIN) \
154                                 $(RT_CLI_BIN) \
155                                 $(RT_CRON_BIN) \
156                                 $(RT_STANDALONE_SERVER) \
157                                 $(RT_SPEEDYCGI_HANDLER) \
158                                 $(RT_FASTCGI_HANDLER) \
159                                 $(RT_FASTCGI_SERVER) \
160                                 $(RT_WIN32_FASTCGI_HANDLER)
161
162
163
164
165
166 SYSTEM_BINARIES         =       rt-attributes-viewer \
167                                 rt-dump-database \
168                                 rt-setup-database \
169                                 rt-email-digest \
170                                 rt-email-dashboards \
171                                 rt-email-group-admin \
172                                 rt-server \
173                                 rt-session-viewer \
174                                 rt-test-dependencies \
175                                 rt-clean-sessions \
176                                 rt-shredder \
177                                 rt-validator
178
179
180 ETC_FILES               =       acl.Informix \
181                                 acl.Pg \
182                                 acl.Oracle \
183                                 acl.mysql \
184                                 acl.Sybase \
185                                 schema.Informix \
186                                 schema.Pg \
187                                 schema.Oracle \
188                                 schema.mysql-4.0 \
189                                 schema.mysql-4.1 \
190                                 schema.Sybase \
191                                 schema.SQLite \
192                                 initialdata
193
194 # }}}
195
196 # {{{ Web frontend
197
198 WEB_HANDLER             =       @WEB_HANDLER@
199
200 # }}}
201
202 # {{{ Database setup
203
204 #
205 # DB_TYPE defines what sort of database RT trys to talk to
206 # "mysql" is known to work.
207 # "Pg" is known to work
208 # "Informix" is known to work
209
210 DB_TYPE                 =       @DB_TYPE@
211
212 # Set DBA to the name of a unix account with the proper permissions and 
213 # environment to run your commandline SQL sbin
214
215 # Set DB_DBA to the name of a DB user with permission to create new databases 
216
217 # For mysql, you probably want 'root'
218 # For Pg, you probably want 'postgres' 
219 # For Oracle, you want 'system'
220 # For Informix, you want 'informix'
221
222 DB_DBA                  =       @DB_DBA@
223
224 DB_HOST                 =       @DB_HOST@
225
226 # If you're not running your database server on its default port, 
227 # specifiy the port the database server is running on below.
228 # It's generally safe to leave this blank 
229
230 DB_PORT                 =       @DB_PORT@
231
232
233
234
235 #
236 # Set this to the canonical name of the interface RT will be talking to the 
237 # database on.  If you said that the RT_DB_HOST above was "localhost," this 
238 # should be too. This value will be used to grant rt access to the database.
239 # If you want to access the RT database from multiple hosts, you'll need
240 # to grant those database rights by hand.
241 #
242
243 DB_RT_HOST              =       @DB_RT_HOST@
244
245 # set this to the name you want to give to the RT database in 
246 # your database server. For Oracle, this should be the name of your sid
247
248 DB_DATABASE             =       @DB_DATABASE@
249 DB_RT_USER              =       @DB_RT_USER@
250 DB_RT_PASS              =       @DB_RT_PASS@
251
252 # }}}
253
254
255 TEST_FILES = t/*.t t/*/*.t
256 TEST_VERBOSE = 0
257
258
259 ####################################################################
260
261 all: default
262
263 default:
264         @echo "Please read RT's README before beginning your installation."
265
266
267
268 instruct:
269         @echo "Congratulations. RT is now installed."
270         @echo ""
271         @echo ""
272         @echo "You must now configure RT by editing $(SITE_CONFIG_FILE)."
273         @echo ""
274         @echo "(You will definitely need to set RT's database password in "
275         @echo "$(SITE_CONFIG_FILE) before continuing. Not doing so could be "
276         @echo "very dangerous.  Note that you do not have to manually add a "
277         @echo "database user or set up a database for RT.  These actions will be "
278         @echo "taken care of in the next step.)"
279         @echo ""
280         @echo "After that, you need to initialize RT's database by running" 
281         @echo " 'make initialize-database'"
282
283
284 upgrade-instruct: 
285         @echo "Congratulations. RT has been upgraded. You should now check over"
286         @echo "$(CONFIG_FILE) for any necessary site customization. Additionally,"
287         @echo "you should update RT's system database objects by running "
288         @echo "    $(RT_SBIN_PATH)/rt-setup-database --dba $(DB_DBA) --prompt-for-dba-password --action upgrade"
289
290
291 upgrade: testdeps config-install dirs files-install fixperms upgrade-instruct
292
293 upgrade-noclobber: config-install dirs libs-install html-install bin-install local-install doc-install font-install fixperms
294
295
296 # {{{ dependencies
297
298 my_with_web_handlers= $(shell $(PERL) -e 'print join " ", map "--with-$$_", grep defined && length, split /,/, "$(WEB_HANDLER)"')
299 testdeps:
300         $(PERL) ./sbin/rt-test-dependencies --verbose --with-$(DB_TYPE) $(my_with_web_handlers)
301
302 depends: fixdeps
303
304 fixdeps:
305         $(PERL) ./sbin/rt-test-dependencies --verbose --install --with-$(DB_TYPE) $(my_with_web_handlers)
306
307 #}}}
308
309 # {{{ fixperms
310 fixperms:
311         # Make the libraries readable
312         chmod $(RT_READABLE_DIR_MODE) $(DESTDIR)$(RT_PATH)
313         chown -R $(LIBS_OWNER) $(DESTDIR)$(RT_LIB_PATH)
314         chgrp -R $(LIBS_GROUP) $(DESTDIR)$(RT_LIB_PATH)
315         chmod -R  u+rwX,go-w,go+rX $(DESTDIR)$(RT_LIB_PATH)
316
317
318         chmod $(RT_READABLE_DIR_MODE) $(DESTDIR)$(RT_BIN_PATH)
319
320         chmod 0755 $(DESTDIR)$(RT_ETC_PATH)
321         cd $(DESTDIR)$(RT_ETC_PATH) && chmod 0400 $(ETC_FILES) || true
322
323         #TODO: the config file should probably be able to have its
324         # owner set separately from the binaries.
325         chown -R $(BIN_OWNER) $(DESTDIR)$(RT_ETC_PATH)
326         chgrp -R $(RTGROUP) $(DESTDIR)$(RT_ETC_PATH)
327
328         chmod 0440 $(DESTDIR)$(CONFIG_FILE)
329         chmod 0640 $(DESTDIR)$(SITE_CONFIG_FILE)
330         # Make this externally readable
331         chmod 0440 $(DESTDIR)$(RT_ETC_PATH)/initialdata
332
333         # Make the system binaries
334         cd $(DESTDIR)$(RT_BIN_PATH) && ( chmod 0755 $(BINARIES) ; chown $(BIN_OWNER) $(BINARIES);  chgrp $(RTGROUP) $(BINARIES))
335
336         # Make the system binaries executable also
337         cd $(DESTDIR)$(RT_SBIN_PATH) && ( chmod 0755 $(SYSTEM_BINARIES) ; chown $(BIN_OWNER) $(SYSTEM_BINARIES);  chgrp $(RTGROUP) $(SYSTEM_BINARIES))
338
339         # Make the web ui readable by all. 
340         chmod -R  u+rwX,go-w,go+rX      $(DESTDIR)$(MASON_HTML_PATH) \
341                                         $(DESTDIR)$(MASON_LOCAL_HTML_PATH) \
342                                         $(DESTDIR)$(LOCAL_LEXICON_PATH)
343         chown -R $(LIBS_OWNER)  $(DESTDIR)$(MASON_HTML_PATH) \
344                                 $(DESTDIR)$(MASON_LOCAL_HTML_PATH)
345         chgrp -R $(LIBS_GROUP)  $(DESTDIR)$(MASON_HTML_PATH) \
346                                 $(DESTDIR)$(MASON_LOCAL_HTML_PATH)
347
348         # Make the web ui's data dir writable
349         chmod 0770      $(DESTDIR)$(MASON_DATA_PATH) \
350                         $(DESTDIR)$(MASON_SESSION_PATH)
351         chown -R $(WEB_USER)    $(DESTDIR)$(MASON_DATA_PATH) \
352                                 $(DESTDIR)$(MASON_SESSION_PATH)
353         chgrp -R $(WEB_GROUP)   $(DESTDIR)$(MASON_DATA_PATH) \
354                                 $(DESTDIR)$(MASON_SESSION_PATH)
355 # }}}
356
357 # {{{ dirs
358 dirs:
359         $(INSTALL) -m 0755 -d $(DESTDIR)$(RT_LOG_PATH)
360         $(INSTALL) -m 0755 -d $(DESTDIR)$(RT_FONT_PATH)
361         $(INSTALL) -m 0770 -d $(DESTDIR)$(MASON_DATA_PATH)
362         $(INSTALL) -m 0770 -d $(DESTDIR)$(MASON_DATA_PATH)/cache
363         $(INSTALL) -m 0770 -d $(DESTDIR)$(MASON_DATA_PATH)/etc
364         $(INSTALL) -m 0770 -d $(DESTDIR)$(MASON_DATA_PATH)/obj
365         $(INSTALL) -m 0770 -d $(DESTDIR)$(MASON_SESSION_PATH)
366         $(INSTALL) -m 0755 -d $(DESTDIR)$(MASON_HTML_PATH)
367         $(INSTALL) -m 0755 -d $(DESTDIR)$(MASON_LOCAL_HTML_PATH)
368         $(INSTALL) -m 0755 -d $(DESTDIR)$(LOCAL_ETC_PATH)
369         $(INSTALL) -m 0755 -d $(DESTDIR)$(LOCAL_LIB_PATH)
370         $(INSTALL) -m 0755 -d $(DESTDIR)$(LOCAL_PLUGIN_PATH)
371         $(INSTALL) -m 0755 -d $(DESTDIR)$(LOCAL_LEXICON_PATH)
372 # }}}
373
374 install: testdeps config-install dirs files-install fixperms instruct
375
376 files-install: libs-install etc-install config-install bin-install sbin-install html-install local-install doc-install font-install
377
378 config-install:
379 @COMMENT_INPLACE_LAYOUT@        $(INSTALL) -m 0755 -o $(BIN_OWNER) -g $(RTGROUP) -d $(DESTDIR)$(CONFIG_FILE_PATH)
380 @COMMENT_INPLACE_LAYOUT@        -$(INSTALL) -m 0440 -o $(BIN_OWNER) -g $(RTGROUP)  etc/RT_Config.pm $(DESTDIR)$(CONFIG_FILE)
381 @COMMENT_INPLACE_LAYOUT@        [ -f $(DESTDIR)$(SITE_CONFIG_FILE) ] || $(INSTALL) -m 0640 -o $(BIN_OWNER) -g $(RTGROUP) etc/RT_SiteConfig.pm $(DESTDIR)$(SITE_CONFIG_FILE) 
382 @COMMENT_INPLACE_LAYOUT@        @echo "Installed configuration. About to install RT in  $(RT_PATH)"
383
384 test: 
385         $(PERL) "-MExtUtils::Command::MM" -e "test_harness($(TEST_VERBOSE), 'lib')" $(TEST_FILES)
386
387 parallel-test: test-parallel
388
389 test-parallel: 
390         RT_TEST_PARALLEL=1 HARNESS_OPTIONS="j4" $(PERL) "-MExtUtils::Command::MM" -e "test_harness($(TEST_VERBOSE), 'lib')" $(TEST_FILES)
391
392 regression-install: config-install
393         $(PERL) -pi -e 's/Set\(\$$DatabaseName.*\);/Set\(\$$DatabaseName, "rt3regression"\);/' $(DESTDIR)$(CONFIG_FILE)
394
395 # {{{ database-installation
396
397 regression-reset-db: force-dropdb
398         $(PERL) -I$(LOCAL_LIB_PATH) -I$(RT_LIB_PATH) sbin/rt-setup-database --action init --dba $(DB_DBA) --dba-password ''
399
400 initdb :: initialize-database
401
402 initialize-database: 
403         $(PERL) -I$(LOCAL_LIB_PATH) -I$(RT_LIB_PATH) sbin/rt-setup-database --action init --dba $(DB_DBA) --prompt-for-dba-password
404
405 dropdb: 
406         $(PERL) -I$(LOCAL_LIB_PATH) -I$(RT_LIB_PATH) sbin/rt-setup-database --action drop --dba $(DB_DBA) --prompt-for-dba-password
407
408 force-dropdb: 
409         $(PERL) -I$(LOCAL_LIB_PATH) -I$(RT_LIB_PATH) sbin/rt-setup-database --action drop --dba $(DB_DBA) --dba-password '' --force
410
411 # }}}
412
413 # {{{ libs-install
414 libs-install: 
415 @COMMENT_INPLACE_LAYOUT@        [ -d $(DESTDIR)$(RT_LIB_PATH) ] || $(INSTALL) -m 0755 -d $(DESTDIR)$(RT_LIB_PATH)
416 @COMMENT_INPLACE_LAYOUT@        -( cd lib && find . -type d -print ) | while read dir ; do \
417 @COMMENT_INPLACE_LAYOUT@            $(INSTALL) -m 0755 -d "$(DESTDIR)$(RT_LIB_PATH)/$$dir" ; \
418 @COMMENT_INPLACE_LAYOUT@        done
419 @COMMENT_INPLACE_LAYOUT@        -( cd lib && find . -type f -print ) | while read file ; do \
420 @COMMENT_INPLACE_LAYOUT@             $(INSTALL) -m 0644 "lib/$$file" "$(DESTDIR)$(RT_LIB_PATH)/$$file" ; \
421 @COMMENT_INPLACE_LAYOUT@        done
422 # }}}
423
424 # {{{ html-install
425 html-install:
426 @COMMENT_INPLACE_LAYOUT@        [ -d $(DESTDIR)$(MASON_HTML_PATH) ] || $(INSTALL) -m 0755 -d $(DESTDIR)$(MASON_HTML_PATH)
427 @COMMENT_INPLACE_LAYOUT@        -( cd share/html && find . -type d -print ) | while read dir ; do \
428 @COMMENT_INPLACE_LAYOUT@            $(INSTALL) -m 0755 -d "$(DESTDIR)$(MASON_HTML_PATH)/$$dir" ; \
429 @COMMENT_INPLACE_LAYOUT@        done
430 @COMMENT_INPLACE_LAYOUT@        -( cd share/html && find . -type f -print ) | while read file ; do \
431 @COMMENT_INPLACE_LAYOUT@            $(INSTALL) -m 0644 "share/html/$$file" "$(DESTDIR)$(MASON_HTML_PATH)/$$file" ; \
432 @COMMENT_INPLACE_LAYOUT@        done
433 # }}}
434
435 # {{{ font-install
436 font-install:
437 @COMMENT_INPLACE_LAYOUT@        [ -d $(DESTDIR)$(RT_FONT_PATH) ] || $(INSTALL) -m 0755 -d $(DESTDIR)$(RT_FONT_PATH)
438 @COMMENT_INPLACE_LAYOUT@        -( cd share/fonts && find . -type f -print ) | while read file ; do \
439 @COMMENT_INPLACE_LAYOUT@            $(INSTALL) -m 0644 "share/fonts/$$file" "$(DESTDIR)$(RT_FONT_PATH)/$$file" ; \
440 @COMMENT_INPLACE_LAYOUT@        done
441 # }}}
442
443 # {{{ doc-install
444 doc-install:
445 @COMMENT_INPLACE_LAYOUT@        # RT 3.0.0 - RT 3.0.2 would accidentally create a file instead of a dir
446 @COMMENT_INPLACE_LAYOUT@        -[ -f $(DESTDIR)$(RT_DOC_PATH) ] && rm $(DESTDIR)$(RT_DOC_PATH) 
447 @COMMENT_INPLACE_LAYOUT@        [ -d $(DESTDIR)$(RT_DOC_PATH) ] || $(INSTALL) -m 0755 -d $(DESTDIR)$(RT_DOC_PATH)
448 @COMMENT_INPLACE_LAYOUT@        -$(INSTALL) -m 0644 ./README $(DESTDIR)$(RT_DOC_PATH)/
449 # }}}
450
451 # {{{ etc-install
452
453 etc-install:
454 @COMMENT_INPLACE_LAYOUT@        [ -d $(DESTDIR)$(RT_ETC_PATH) ] || $(INSTALL) -m 0755 -d $(DESTDIR)$(RT_ETC_PATH)
455 @COMMENT_INPLACE_LAYOUT@        for file in $(ETC_FILES) ; do \
456 @COMMENT_INPLACE_LAYOUT@            $(INSTALL) -m 0644 "etc/$$file" "$(DESTDIR)$(RT_ETC_PATH)/" ; \
457 @COMMENT_INPLACE_LAYOUT@        done
458 # }}}
459
460 # {{{ sbin-install
461
462 sbin-install:
463 @COMMENT_INPLACE_LAYOUT@        $(INSTALL) -m 0755 -d $(DESTDIR)$(RT_SBIN_PATH)
464 @COMMENT_INPLACE_LAYOUT@        for file in $(SYSTEM_BINARIES) ; do \
465 @COMMENT_INPLACE_LAYOUT@            $(INSTALL) -o $(BIN_OWNER) -g $(RTGROUP) -m 0755 "sbin/$$file" "$(DESTDIR)$(RT_SBIN_PATH)/" ; \
466 @COMMENT_INPLACE_LAYOUT@        done
467
468 # }}}
469
470 # {{{ bin-install
471
472 bin-install:
473 @COMMENT_INPLACE_LAYOUT@        $(INSTALL) -m 0755 -d $(DESTDIR)$(RT_BIN_PATH)
474 @COMMENT_INPLACE_LAYOUT@        for file in $(BINARIES) ; do \
475 @COMMENT_INPLACE_LAYOUT@            $(INSTALL) -o $(BIN_OWNER) -g $(RTGROUP) -m 0755 "bin/$$file" "$(DESTDIR)$(RT_BIN_PATH)/" ; \
476 @COMMENT_INPLACE_LAYOUT@        done
477
478 # {{{ local-install
479 local-install:
480         -( cd local/html && find . -type d -print ) | while read dir ; do \
481             $(INSTALL) -m 0755 -d "$(DESTDIR)$(MASON_LOCAL_HTML_PATH)/$$dir" ; \
482         done
483         -( cd local/html && find . -type f -print ) | while read file ; do \
484             $(INSTALL) -m 0644 "local/html/$$file" "$(DESTDIR)$(MASON_LOCAL_HTML_PATH)/$$file" ; \
485         done
486         -( cd local/po && find . -type d -print ) | while read dir ; do \
487             $(INSTALL) -m 0755 -d "$(DESTDIR)$(LOCAL_LEXICON_PATH)/$$dir" ; \
488         done
489         -( cd local/po && find . -type f -print ) | while read file ; do \
490             $(INSTALL) -m 0644 "local/po/$$file" "$(DESTDIR)$(LOCAL_LEXICON_PATH)/$$file" ; \
491         done
492         -( cd local/etc && find . -type d -print ) | while read dir ; do \
493             $(INSTALL) -m 0755 -d "$(DESTDIR)$(LOCAL_ETC_PATH)/$$dir" ; \
494         done
495         -( cd local/etc && find . -type f -print ) | while read file ; do \
496             $(INSTALL) -m 0644 "etc/$$file" "$(DESTDIR)$(LOCAL_ETC_PATH)/$$file" ; \
497         done
498 # }}}
499
500 # {{{ Best Practical Build targets -- no user servicable parts inside
501
502 regenerate-catalogs:
503         $(PERL) sbin/extract-message-catalog
504
505 license-tag:
506         $(PERL) sbin/license_tag
507
508 factory: initialize-database
509         cd lib; $(PERL) ../sbin/factory  $(DB_DATABASE) RT
510
511 reconfigure:
512         aclocal -I m4
513         autoconf
514         chmod 755 ./configure
515         ./configure
516
517 start-httpd:
518         $(PERL) bin/standalone_httpd &
519
520 start-server:
521         $(PERL) sbin/rt-server &
522
523 apachectl:
524         $(APACHECTL) stop
525         sleep 10
526         $(APACHECTL) start
527         sleep 5
528
529 SNAPSHOT=$(shell git describe --tags)
530 snapshot:
531         git archive --prefix "$(SNAPSHOT)/"  HEAD | tar -xf -
532         ( cd $(SNAPSHOT) && autoconf && PERL=/usr/bin/perl ./configure )
533         tar -czf "$(SNAPSHOT).tar.gz" "$(SNAPSHOT)/"
534         rm -fr "$(SNAPSHOT)/"
535
536 # }}}