projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixup taxproduct selection
[freeside.git]
/
Makefile
diff --git
a/Makefile
b/Makefile
index
781467f
..
3a8c735
100644
(file)
--- a/
Makefile
+++ b/
Makefile
@@
-3,12
+3,14
@@
#solaris and perhaps other very weirdass /bin/sh
#SHELL="/bin/ksh"
#solaris and perhaps other very weirdass /bin/sh
#SHELL="/bin/ksh"
-D
ATASOURCE = DBI:Pg:dbname=freeside
-#D
ATASOURCE=DBI:mysql:freeside
+D
B_TYPE = Pg
+#D
B_TYPE = mysql
DB_USER = freeside
DB_PASSWORD=
DB_USER = freeside
DB_PASSWORD=
+DATASOURCE = DBI:${DB_TYPE}:dbname=freeside
+
#changable now (some things which should go to the others still go to CONF)
FREESIDE_CONF = /usr/local/etc/freeside
FREESIDE_LOG = /usr/local/etc/freeside
#changable now (some things which should go to the others still go to CONF)
FREESIDE_CONF = /usr/local/etc/freeside
FREESIDE_LOG = /usr/local/etc/freeside
@@
-20,14
+22,11
@@
MASON_HANDLER = ${FREESIDE_CONF}/handler.pl
MASONDATA = ${FREESIDE_CACHE}/masondata
#mod_perl v1
MASONDATA = ${FREESIDE_CACHE}/masondata
#mod_perl v1
-APACHE_VERSION = 1
+
#
APACHE_VERSION = 1
#mod_perl v2 prereleases up to and including 1.999_21
#APACHE_VERSON = 1.99
#mod_perl v2 proper and prereleases 1.999_22 and after
#mod_perl v2 prereleases up to and including 1.999_21
#APACHE_VERSON = 1.99
#mod_perl v2 proper and prereleases 1.999_22 and after
-#APACHE_VERSION = 2
-
-# only mason now
-TEMPLATE = mason
+APACHE_VERSION = 2
#deb
FREESIDE_DOCUMENT_ROOT = /var/www/freeside
#deb
FREESIDE_DOCUMENT_ROOT = /var/www/freeside
@@
-55,7
+54,9
@@
INIT_INSTALL = /usr/sbin/update-rc.d freeside defaults 21 20
#INIT_INSTALL = /usr/bin/true
#deb, suse
#INIT_INSTALL = /usr/bin/true
#deb, suse
-HTTPD_RESTART = /etc/init.d/apache restart
+#HTTPD_RESTART = /etc/init.d/apache restart
+#deb w/apache2
+HTTPD_RESTART = /etc/init.d/apache2 restart
#redhat, fedora, mandrake
#HTTPD_RESTART = /etc/init.d/httpd restart
#freebsd
#redhat, fedora, mandrake
#HTTPD_RESTART = /etc/init.d/httpd restart
#freebsd
@@
-65,9
+66,9
@@
HTTPD_RESTART = /etc/init.d/apache restart
#apache
#HTTPD_RESTART = /usr/local/apache/bin/apachectl stop; sleep 10; /usr/local/apache/bin/apachectl startssl
#apache
#HTTPD_RESTART = /usr/local/apache/bin/apachectl stop; sleep 10; /usr/local/apache/bin/apachectl startssl
-#(an include directory, not a file
-
"Include /etc/apache/conf.d" in httpd.conf)
-#deb (3.1+),
-APACHE_CONF = /etc/apache/conf.d
+#(an include directory, not a file
,
"Include /etc/apache/conf.d" in httpd.conf)
+#deb (3.1+),
apache2
+APACHE_CONF = /etc/apache
2
/conf.d
FREESIDE_RESTART = ${INIT_FILE} restart
FREESIDE_RESTART = ${INIT_FILE} restart
@@
-102,6
+103,8
@@
FREESIDE_URL = "http://localhost/freeside/"
#for now, same db as specified in DATASOURCE... eventually, otherwise?
RT_DB_DATABASE = freeside
#for now, same db as specified in DATASOURCE... eventually, otherwise?
RT_DB_DATABASE = freeside
+RPM_SPECFILE = rpm/freeside.spec
+
#---
#---
@@
-144,7
+147,7
@@
masondocs: httemplate/* httemplate/*/* httemplate/*/*/* httemplate/*/*/*/*
alldocs: masondocs
docs:
alldocs: masondocs
docs:
- make
${TEMPLATE}
docs
+ make
mason
docs
wikiman:
chmod a+rx ./bin/pod2x
wikiman:
chmod a+rx ./bin/pod2x
@@
-152,7
+155,7
@@
wikiman:
install-docs: docs
[ -e ${FREESIDE_DOCUMENT_ROOT} ] && mv ${FREESIDE_DOCUMENT_ROOT} ${FREESIDE_DOCUMENT_ROOT}.`date +%Y%m%d%H%M%S` || true
install-docs: docs
[ -e ${FREESIDE_DOCUMENT_ROOT} ] && mv ${FREESIDE_DOCUMENT_ROOT} ${FREESIDE_DOCUMENT_ROOT}.`date +%Y%m%d%H%M%S` || true
- cp -r
${TEMPLATE}
docs ${FREESIDE_DOCUMENT_ROOT}
+ cp -r
mason
docs ${FREESIDE_DOCUMENT_ROOT}
chown -R freeside:freeside ${FREESIDE_DOCUMENT_ROOT}
cp htetc/handler.pl ${MASON_HANDLER}
perl -p -i -e "\
chown -R freeside:freeside ${FREESIDE_DOCUMENT_ROOT}
cp htetc/handler.pl ${MASON_HANDLER}
perl -p -i -e "\
@@
-185,6
+188,7
@@
perl-modules:
" blib/lib/FS.pm;\
perl -p -i -e "\
s|%%%FREESIDE_CONF%%%|${FREESIDE_CONF}|g;\
" blib/lib/FS.pm;\
perl -p -i -e "\
s|%%%FREESIDE_CONF%%%|${FREESIDE_CONF}|g;\
+ s|%%%FREESIDE_CACHE%%%|${FREESIDE_CACHE}|g;\
" blib/lib/FS/*.pm;\
perl -p -i -e "\
s|%%%FREESIDE_EXPORT%%%|${FREESIDE_EXPORT}|g;\
" blib/lib/FS/*.pm;\
perl -p -i -e "\
s|%%%FREESIDE_EXPORT%%%|${FREESIDE_EXPORT}|g;\
@@
-230,11
+234,13
@@
install-apache:
( [ ${RT_ENABLED} -eq 1 ] && install -o root -m 755 htetc/freeside-rt.conf ${APACHE_CONF} || true ) && \
perl -p -i -e "\
s'%%%FREESIDE_DOCUMENT_ROOT%%%'${FREESIDE_DOCUMENT_ROOT}'g; \
( [ ${RT_ENABLED} -eq 1 ] && install -o root -m 755 htetc/freeside-rt.conf ${APACHE_CONF} || true ) && \
perl -p -i -e "\
s'%%%FREESIDE_DOCUMENT_ROOT%%%'${FREESIDE_DOCUMENT_ROOT}'g; \
+ s'%%%FREESIDE_CONF%%%'${FREESIDE_CONF}'g; \
s'%%%MASON_HANDLER%%%'${MASON_HANDLER}'g; \
" ${APACHE_CONF}/freeside-*.conf \
) || true
install-selfservice:
s'%%%MASON_HANDLER%%%'${MASON_HANDLER}'g; \
" ${APACHE_CONF}/freeside-*.conf \
) || true
install-selfservice:
+ [ -e ~freeside ] || cp -pr /etc/skel ~freeside && chown -R freeside ~freeside
[ -e ~freeside/.ssh/id_dsa.pub ] || su - freeside -c 'ssh-keygen -t dsa'
for MACHINE in ${SELFSERVICE_MACHINES}; do \
scp -r fs_selfservice/FS-SelfService ${SELFSERVICE_INSTALL_USER}@$$MACHINE:. ;\
[ -e ~freeside/.ssh/id_dsa.pub ] || su - freeside -c 'ssh-keygen -t dsa'
for MACHINE in ${SELFSERVICE_MACHINES}; do \
scp -r fs_selfservice/FS-SelfService ${SELFSERVICE_INSTALL_USER}@$$MACHINE:. ;\
@@
-298,7
+304,7
@@
configure-rt:
s'%%%MASONDATA%%%'${MASONDATA}'g;\
" config.layout; \
./configure --enable-layout=Freeside\
s'%%%MASONDATA%%%'${MASONDATA}'g;\
" config.layout; \
./configure --enable-layout=Freeside\
- --with-db-type=
Pg
\
+ --with-db-type=
${DB_TYPE}
\
--with-db-dba=${DB_USER} \
--with-db-database=${RT_DB_DATABASE} \
--with-db-rt-user=${DB_USER} \
--with-db-dba=${DB_USER} \
--with-db-database=${RT_DB_DATABASE} \
--with-db-rt-user=${DB_USER} \
@@
-312,12
+318,9
@@
create-rt: configure-rt
[ -d /opt/rt3 ] || mkdir /opt/rt3 #
[ -d /opt/rt3/share ] || mkdir /opt/rt3/share #
cd rt; make install
[ -d /opt/rt3 ] || mkdir /opt/rt3 #
[ -d /opt/rt3/share ] || mkdir /opt/rt3/share #
cd rt; make install
- echo -e "${DB_PASSWORD}\n\\d sessions"\
- | psql -U ${DB_USER} -W ${RT_DB_DATABASE} 2>&1\
- | grep '^Did not find'\
- && rt/sbin/rt-setup-database --dba '${DB_USER}' \
- --dba-password '${DB_PASSWORD}' \
- --action schema \
+ rt/sbin/rt-setup-database --dba '${DB_USER}' \
+ -dba-password '${DB_PASSWORD}' \
+ -action schema \
|| true
rt/sbin/rt-setup-database --action insert_initial \
&& rt/sbin/rt-setup-database --action insert --datafile ${RT_PATH}/etc/initialdata \
|| true
rt/sbin/rt-setup-database --action insert_initial \
&& rt/sbin/rt-setup-database --action insert --datafile ${RT_PATH}/etc/initialdata \
@@
-346,6
+349,11
@@
clean:
#release: upload-docs
release:
cd /home/ivan/freeside
#release: upload-docs
release:
cd /home/ivan/freeside
+
+ # Update the RPM specfile
+ perl -p -i -e "s/\d+[^\}]+/${VERSION}/ if /%define\s+version\s+(\d+[^\}]+)\}/;" ${RPM_SPECFILE}
+ cvs commit -m "Updated for ${VERSION}" ${RPM_SPECFILE}
+
#cvs tag ${TAG}
cvs tag -F ${TAG}
#cvs tag ${TAG}
cvs tag -F ${TAG}