1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153
|
# BEGIN LICENSE BLOCK
#
# Copyright (c) 2002-2003 Jesse Vincent <jesse@bestpractical.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of version 2 of the GNU General Public License
# as published by the Free Software Foundation.
#
# A copy of that license should have arrived with this
# software, but in any event can be snarfed from www.gnu.org.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# END LICENSE BLOCK
DESTDIR =
PERL = /usr/bin/perl
INSTALL = /usr/bin/install
RT_PREFIX = /usr/share/request-tracker3
CONFIG_FILE_PATH = /etc/request-tracker3
RTFM_CONFIG_FILE_PATH = /etc/rtfm
CONFIG_FILE = $(CONFIG_FILE_PATH)/RT_Config.pm
RT_LIB_PATH = /usr/share/perl5
RT_LEXICON_PATH = /usr/share/perl5/RT/I18N
MASON_HTML_PATH = $(RT_PREFIX)/html
RT_SBIN_PATH = /usr/sbin/
GETPARAM = $(PERL) -I$(RT_LIB_PATH) -e'use RT; RT::LoadConfig(); print $${$$RT::{$$ARGV[0]}};'
DB_TYPE = `${GETPARAM} DatabaseType`
DB_DATABASEHOST = `${GETPARAM} DatabaseHost`
DB_DATABASE = `${GETPARAM} DatabaseName`
DB_RT_USER = `${GETPARAM} DatabaseUser`
DB_RT_PASS = `${GETPARAM} DatabasePass`
DB_DBA = root
PRODUCT = RTFM
TAG = 2.0.2
CANONICAL_REPO = svn+ssh://svn.bestpractical.com/svn/bps-public/rtfm/
CANONICAL_REPO_TAGS = $(CANONICAL_REPO)/tags/
CANONICAL_REPO_TRUNK = $(CANONICAL_REPO)/trunk/
TMP_DIR = /tmp
RELEASE_DIR = /home/ftp/pub/rt/release
upgrade: install-lib install-html install-lexicon install-etc
install: upgrade
html-install: install-html
install-html:
for dir in `cd ./html/ && find . -type d -print`; do \
$(INSTALL) -d -m 0755 $(DESTDIR)$(MASON_HTML_PATH)/$$dir ; \
done
for f in `cd ./html/ && find . -type f -print`; do \
$(INSTALL) -m 0644 html/$$f $(DESTDIR)$(MASON_HTML_PATH)/$$f ; \
done
libs-install: install-lib
install-lib:
for dir in `cd ./lib/ && find . -type d -print`; do \
$(INSTALL) -d -m 0755 $(DESTDIR)$(RT_LIB_PATH)/$$dir ; \
done
for f in `cd ./lib/ && find . -type f -name \*.pm -print`; do \
$(INSTALL) -m 0644 lib/$$f $(DESTDIR)$(RT_LIB_PATH)/$$f ; \
done
install-lexicon:
for dir in `cd ./po/ && find . -type d -print`; do \
$(INSTALL) -d -m 0755 $(DESTDIR)$(RT_LEXICON_PATH)/$$dir ; \
done
for f in `cd ./po/ && find . -type f -print`; do \
echo "Installing $(MASON_HTML_PATH)/$$f" ; \
$(INSTALL) -m 0644 po/$$f $(DESTDIR)$(RT_LEXICON_PATH)/$$f ; \
done
install-etc:
for dir in `cd ./etc/ && find . -type d -print`; do \
$(INSTALL) -d -m 0755 $(DESTDIR)$(RTFM_CONFIG_FILE_PATH)/$$dir ; \
done
for f in `cd ./etc/ && find . -type f -print`; do \
echo "Installing $(RTFM_CONFIG_FILE_PATH)/$$f" ; \
$(INSTALL) -m 0644 etc/$$f $(DESTDIR)$(RTFM_CONFIG_FILE_PATH)/$$f ; \
done
factory:
cd lib; $(PERL) ../tools/factory.mysql $(DB_DATABASE) RT::FM
regenerate-catalogs:
$(PERL) ../rt/sbin/extract-message-catalog po/*/*
initdb:
$(PERL) $(RT_SBIN_PATH)/rt-setup-database --action schema --datadir ./etc/ --dba $(DB_DBA) --prompt-for-dba-password
$(PERL) $(RT_SBIN_PATH)/rt-setup-database --action acl --datadir ./etc/ --dba $(DB_DBA) --prompt-for-dba-password
dropdb:
dropdb.Pg: etc/drop_schema.mysql
psql -U $(DB_DBA) $(DB_DATABASE) < etc/drop_schema.Pg
dropdb.mysql: etc/drop_schema.mysql
-mysql $(DB_DATABASE) < etc/drop_schema.mysql
dropdb.Oracle: etc/drop_schema.Oracle
sqlplus $(DB_DBA)@$(DB_DATABASE) \@etc/drop_schema.mysql
POD2TEST_EXE = tools/extract_pod_tests
testify-pods:
[ -d lib/t/autogen ] || mkdir lib/t/autogen
find lib -name \*pm |xargs -n 1 $(PERL) $(POD2TEST_EXE)
find bin -type f |grep -v \~| xargs -n 1 $(PERL) $(POD2TEST_EXE)
license-tag:
perl tools/license_tag
regression: dropdb testify-pods install
$(PERL) lib/t/02regression.t
tag-and-release:
# svn cp $(CANONICAL_REPO_TRUNK) $(CANONICAL_REPO_TAGS)/$(TAG)
svn export $(CANONICAL_REPO_TAGS)/$(TAG) $(TMP_DIR)/$(PRODUCT)-$(TAG)
svn log -v $(CANONICAL_REPO_TAGS)/$(TAG) > $(TMP_DIR)/$(PRODUCT)-$(TAG)/Changelog
(cd $(TMP_DIR); tar czf $(PRODUCT)-$(TAG).tar.gz $(PRODUCT)-$(TAG))
gpg --detach-sign $(TMP_DIR)/$(PRODUCT)-$(TAG).tar.gz
gpg --verify $(TMP_DIR)/$(PRODUCT)-$(TAG).tar.gz.sig
cp $(TMP_DIR)/$(PRODUCT)-$(TAG).tar.gz* $(RELEASE_DIR)
clean:
find . -type f -name \*~ |xargs rm
find lib/t/autogen -type f |xargs rm
apachectl:
/usr/sbin/apachectl stop
sleep 1
/usr/sbin/apachectl start
|