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
-#APACHE_VERSION = 2
+APACHE_VERSION = 2
#deb
FREESIDE_DOCUMENT_ROOT = /var/www/freeside
#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
#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/apache2/conf.d
FREESIDE_RESTART = ${INIT_FILE} restart
#for now, same db as specified in DATASOURCE... eventually, otherwise?
RT_DB_DATABASE = freeside
+RPM_SPECFILE = rpm/freeside.spec
+
#---
VERSION=1.9.0cvs
TAG=freeside_1_9_0
+DEBVERSION = `echo $VERSION | perl -pe 's/(\d)([a-z])/\1~\2/'`-1
+
help:
@echo "supported targets:"
@echo " create-database create-config"
" 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;\
( [ ${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:
+ [ -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:. ;\
#these are probably only useful if you're me...
#release: upload-docs
+.PHONY: release
release:
- cd /home/ivan/freeside
+ # Update the changelog
+ ./CVS2CL
+ cvs commit -m "Updated for ${VERSION}" ChangeLog
+
+ # 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}
+
+ # Update the Debian changelog
+ dch -v ${DEBVERSION} -p "New upstream release"
+ cvs commit -m "Updated for ${VERSION}" debian/changelog
+
#cvs tag ${TAG}
cvs tag -F ${TAG}
scp freeside-${VERSION}.tar.gz ivan@420.am:/var/www/www.sisd.com/freeside/
mv freeside-${VERSION} freeside-${VERSION}.tar.gz ..
+ #these things failing should not make release target fail, so: "|| true"
+
+ #kick off vmware update
+ #./BUILD_VMWARE_APPLIANCE ${$TAG} || true
+
+ #kick off deb package update
+
+ #kick off rpm package update too?
+
+ #update web demo?
+
+ #update web demo self-service?
+
update-webdemo:
ssh ivan@420.am '( cd freeside; cvs update -d -P )'
#ssh root@420.am '( cd /home/ivan/freeside; make clean; make deploy )'