deb 8 apache DocumentRoot has changed
[freeside.git] / Makefile
1 #!/usr/bin/make
2
3 #solaris and perhaps other very weirdass /bin/sh
4 #SHELL="/bin/ksh"
5
6 DB_TYPE = Pg
7 #DB_TYPE = mysql
8
9 DB_USER = freeside
10 DB_PASSWORD=
11
12 DATASOURCE = DBI:${DB_TYPE}:dbname=freeside
13
14 #changable now (some things which should go to the others still go to CONF)
15 FREESIDE_CONF = /usr/local/etc/freeside
16 FREESIDE_LOG = /usr/local/etc/freeside
17 FREESIDE_LOCK = /usr/local/etc/freeside
18 FREESIDE_CACHE = /usr/local/etc/freeside
19 FREESIDE_EXPORT = /usr/local/etc/freeside
20
21 MASON_HANDLER = ${FREESIDE_CONF}/handler.pl
22 MASONDATA = ${FREESIDE_CACHE}/masondata
23
24 #where to put the default configuraiton used by freeside-setup to initialize
25 #a new database (not used after that).  primarily of interest to distro
26 #package maintainers
27 DIST_CONF = ${FREESIDE_CONF}/default_conf
28
29 #mod_perl v2 1.999_22 on Apache 2.0 through 2.3 (Debian ancient through 7.x)
30 #APACHE_VERSION=2
31 #Apache 2.4 (Debian 8.x)
32 APACHE_VERSION=2.4
33
34 #deb (-7 and upgrades)
35 FREESIDE_DOCUMENT_ROOT = /var/www/freeside
36 #deb (new installs of 8+)
37 #FREESIDE_DOCUMENT_ROOT = /var/www/html/freeside
38 #redhat, fedora, mandrake
39 #FREESIDE_DOCUMENT_ROOT = /var/www/html/freeside
40 #freebsd
41 #FREESIDE_DOCUMENT_ROOT = /usr/local/www/data/freeside
42 #openbsd
43 #FREESIDE_DOCUMENT_ROOT = /var/www/htdocs/freeside
44 #suse
45 #FREESIDE_DOCUMENT_ROOT = /srv/www/htdocs/freeside
46 #apache
47 #FREESIDE_DOCUMENT_ROOT = /usr/local/apache/htdocs/freeside
48
49 #deb, redhat, fedora, mandrake, suse, others?
50 INIT_FILE = /etc/init.d/freeside
51 #freebsd
52 #INIT_FILE = /usr/local/etc/rc.d/011.freeside.sh
53
54 #deb
55 INIT_INSTALL = PATH=$PATH:/sbin /usr/sbin/update-rc.d freeside defaults 23 01
56 #redhat, fedora
57 #INIT_INSTALL = /sbin/chkconfig freeside on
58 #not necessary (freebsd)
59 #INIT_INSTALL = /usr/bin/true
60
61 #deb, suse
62 #HTTPD_RESTART = /etc/init.d/apache restart
63 #deb w/apache2
64 HTTPD_RESTART = /etc/init.d/apache2 restart
65 #redhat, fedora, mandrake
66 #HTTPD_RESTART = /etc/init.d/httpd restart
67 #freebsd
68 #HTTPD_RESTART = /usr/local/etc/rc.d/apache.sh stop || true; sleep 10; /usr/local/etc/rc.d/apache.sh start
69 #openbsd
70 #HTTPD_RESTART = kill -TERM `cat /var/www/logs/httpd.pid`; sleep 10; /usr/sbin/httpd -u -DSSL
71 #apache
72 #HTTPD_RESTART = /usr/local/apache/bin/apachectl stop; sleep 10; /usr/local/apache/bin/apachectl startssl
73
74 #(an include directory, not a file, "Include /etc/apache/conf.d" in httpd.conf)
75 #debian unstable/8.0+, apache2.4
76 APACHE_CONF = /etc/apache2/conf-available
77 #deb (3.1+), apache2
78 #APACHE_CONF = /etc/apache2/conf.d
79
80 INSSERV_OVERRIDE = /etc/insserv/overrides
81
82 FREESIDE_RESTART = ${INIT_FILE} restart
83
84 #deb, redhat, fedora, mandrake, suse, others?
85 INSTALLGROUP = root
86 #freebsd, openbsd
87 #INSTALLGROUP = wheel
88
89 #edit the stuff below to have the daemons start
90
91 QUEUED_USER=fs_queue
92 API_USER = fs_api
93
94 SELFSERVICE_USER = fs_selfservice
95 #never run on the same machine in production!!!
96 SELFSERVICE_MACHINES = 
97 # SELFSERVICE_MACHINES = www.example.com
98 # SELFSERVICE_MACHINES = web1.example.com web2.example.com
99
100 #user with sudo access on SELFSERVICE_MACHINES for automated self-service
101 #installation.
102 SELFSERVICE_INSTALL_USER = ivan
103 SELFSERVICE_INSTALL_USERADD = /usr/sbin/useradd
104 #SELFSERVICE_INSTALL_USERADD = "/usr/sbin/pw useradd"
105
106 #RT_ENABLED = 0
107 RT_ENABLED = 1
108 RT_DOMAIN = example.com
109 RT_TIMEZONE = US/Pacific
110 #RT_TIMEZONE = US/Eastern
111 FREESIDE_URL = "http://192.168.1.6/freeside/"
112
113 #for now, same db as specified in DATASOURCE... eventually, otherwise?
114 RT_DB_DATABASE = freeside
115
116 TORRUS_ENABLED = 0
117
118 # for auto-version updates, so we can "make release" more things automatically
119 RPM_SPECFILE = rpm/freeside.spec
120
121 #---
122
123 #rt/config.layout.in
124 RT_PATH = /opt/rt3
125
126 #only used for dev kludge now, not a big deal
127 FREESIDE_PATH = `pwd`
128 PERL_INC_DEV_KLUDGE = /usr/local/share/perl/5.14.2/
129
130 VERSION := `grep '^$$VERSION' FS/FS.pm | cut -d\' -f2`
131 TAG := freeside_`grep '^$$VERSION' FS/FS.pm | cut -d\' -f2 | perl -pe 's/\./_/g'`
132
133 #DEBVERSION = `echo ${VERSION} | perl -pe 's/(\d)([a-z])/\1~\2/'`-1
134
135 TEXMFHOME := "\$$TEXMFHOME"
136
137 ver:
138         @echo "${VERSION}"
139
140 tag:
141         @echo "${TAG}"
142
143 help:
144         @echo "supported targets:"
145         @echo "                   create-database create-config"
146         @echo "                   install deploy"
147         @echo "                   configure-rt create-rt"
148         @echo "                   clean help"
149         @echo
150         @echo "                   install-docs install-perl-modules"
151         @echo "                   install-init install-apache"
152         @echo "                   install-rt install-texmf"
153         @echo "                   install-selfservice update-selfservice"
154         @echo
155         @echo "                   dev dev-docs dev-perl-modules"
156         @echo
157         @echo "                   masondocs alldocs docs"
158         @echo "                   wikiman"
159         @echo "                   perl-modules"
160         #@echo
161         #@echo "                   upload-docs release"
162
163
164 masondocs: httemplate/* httemplate/*/* httemplate/*/*/* httemplate/*/*/*/*
165         rm -rf masondocs
166         cp -pr httemplate masondocs
167         touch masondocs
168
169 alldocs: masondocs
170
171 docs:
172         make masondocs
173
174 wikiman:
175         chmod a+rx ./bin/pod2x
176         ./bin/pod2x
177
178 install-docs: docs
179         #ancient attempt to avoid overwriting customer modifications directly to production web files that's overlived its usefulness
180         #[ -e ${FREESIDE_DOCUMENT_ROOT} ] && mv ${FREESIDE_DOCUMENT_ROOT} ${FREESIDE_DOCUMENT_ROOT}.`date +%Y%m%d%H%M%S` || true
181         #cp -r masondocs ${FREESIDE_DOCUMENT_ROOT}
182         [ -h ${FREESIDE_DOCUMENT_ROOT} ] && rm ${FREESIDE_DOCUMENT_ROOT} || true
183         mkdir -p ${FREESIDE_DOCUMENT_ROOT}
184         cp -r masondocs/* masondocs/.htaccess ${FREESIDE_DOCUMENT_ROOT}
185         chown -R freeside:freeside ${FREESIDE_DOCUMENT_ROOT}
186         install -D htetc/handler.pl ${MASON_HANDLER}
187         perl -p -i -e "\
188           s|%%%FREESIDE_EXPORT%%%|${FREESIDE_EXPORT}|g;\
189           s'%%%RT_ENABLED%%%'${RT_ENABLED}'g; \
190         " ${MASON_HANDLER} || true
191         mkdir -p ${FREESIDE_EXPORT}/profile
192         chown freeside ${FREESIDE_EXPORT}/profile
193         [ ! -e ${MASONDATA} ] && mkdir ${MASONDATA} || true
194         chown -R freeside ${MASONDATA}
195
196 dev-docs:
197         [ -e ${FREESIDE_DOCUMENT_ROOT} ] && mv ${FREESIDE_DOCUMENT_ROOT} ${FREESIDE_DOCUMENT_ROOT}.`date +%Y%m%d%H%M%S` || true
198         ln -s ${FREESIDE_PATH}/httemplate ${FREESIDE_DOCUMENT_ROOT}
199         cp htetc/handler.pl ${MASON_HANDLER}
200         perl -p -i -e "\
201           s'###use Module::Refresh;###'use Module::Refresh;'; \
202           s'###Module::Refresh->refresh;###'Module::Refresh->refresh;'; \
203           s|%%%FREESIDE_EXPORT%%%|${FREESIDE_EXPORT}|g;\
204           s'%%%RT_ENABLED%%%'${RT_ENABLED}'g; \
205         " ${MASON_HANDLER} || true
206
207 perl-modules:
208         cd FS; \
209         [ -e Makefile ] || perl Makefile.PL; \
210         make; \
211         perl -p -i -e "\
212           s|%%%FREESIDE_CONF%%%|${FREESIDE_CONF}|g;\
213           s|%%%FREESIDE_CACHE%%%|${FREESIDE_CACHE}|g;\
214           s'%%%FREESIDE_DOCUMENT_ROOT%%%'${FREESIDE_DOCUMENT_ROOT}'g; \
215           s'%%%RT_ENABLED%%%'${RT_ENABLED}'g; \
216           s'%%%RT_PATH%%%'${RT_PATH}'g; \
217           s'%%%MASONDATA%%%'${MASONDATA}'g;\
218           s/%%%SELFSERVICE_USER%%%/${SELFSERVICE_USER}/g;\
219         " blib/lib/FS/*.pm;\
220         perl -p -i -e "\
221           s/%%%SELFSERVICE_USER%%%/${SELFSERVICE_USER}/g;\
222           s/%%%SELFSERVICE_MACHINES%%%/${SELFSERVICE_MACHINES}/g;\
223           s|%%%FREESIDE_EXPORT%%%|${FREESIDE_EXPORT}|g;\
224         " blib/lib/FS/Cron/*.pm;\
225         perl -p -i -e "\
226           s|%%%FREESIDE_CONF%%%|${FREESIDE_CONF}|g;\
227           s|%%%FREESIDE_EXPORT%%%|${FREESIDE_EXPORT}|g;\
228           s|%%%FREESIDE_LOG%%%|${FREESIDE_LOG}|g;\
229         " blib/lib/FS/part_export/*.pm;\
230         perl -p -i -e "\
231           s|%%%FREESIDE_CACHE%%%|${FREESIDE_CACHE}|g;\
232         " blib/lib/FS/cust_main/*.pm blib/lib/FS/cust_pkg/*.pm;\
233         perl -p -i -e "\
234           s|%%%FREESIDE_LOG%%%|${FREESIDE_LOG}|g;\
235         " blib/lib/FS/Daemon/*.pm;\
236         perl -p -i -e "\
237           s|%%%FREESIDE_CONF%%%|${FREESIDE_CONF}|g;\
238           s|%%%FREESIDE_LOG%%%|${FREESIDE_LOG}|g;\
239           s|%%%FREESIDE_LOCK%%%|${FREESIDE_LOCK}|g;\
240           s|%%%FREESIDE_CACHE%%%|${FREESIDE_CACHE}|g;\
241           s|%%%FREESIDE_EXPORT%%%|${FREESIDE_EXPORT}|g;\
242           s|%%%DIST_CONF%%%|${DIST_CONF}|g;\
243         " blib/script/*
244
245 install-perl-modules: perl-modules install-rt-initialdata
246         [ -L ${PERL_INC_DEV_KLUDGE}/FS ] \
247           && rm ${PERL_INC_DEV_KLUDGE}/FS \
248           && mv ${PERL_INC_DEV_KLUDGE}/FS.old ${PERL_INC_DEV_KLUDGE}/FS \
249           || true
250         cd FS; \
251         make install UNINST=1
252         #install this for freeside-setup
253         install -d $(DIST_CONF)
254         #install conf/[a-z]* $(DEFAULT_CONF)
255         #CVS is not [a-z]
256         install `ls -d conf/[a-z]* | grep -v CVS | grep -v '^conf/registries'` $(DIST_CONF)
257
258 dev-perl-modules: perl-modules
259         [ -d ${PERL_INC_DEV_KLUDGE}/FS -a ! -L ${PERL_INC_DEV_KLUDGE}/FS ] \
260           && mv ${PERL_INC_DEV_KLUDGE}/FS ${PERL_INC_DEV_KLUDGE}/FS.old \
261           || true
262
263         rm -rf ${PERL_INC_DEV_KLUDGE}/FS
264         ln -sf ${FREESIDE_PATH}/FS/blib/lib/FS ${PERL_INC_DEV_KLUDGE}/FS
265
266 install-texmf:  
267         install -D -o freeside -m 444 etc/longtable.sty \
268           /usr/local/share/texmf/tex/latex/longtable.sty
269         texhash /usr/local/share/texmf
270
271 install-init:
272         #[ -e ${INIT_FILE} ] || install -o root -g ${INSTALLGROUP} -m 711 init.d/freeside-init ${INIT_FILE}
273         install -o root -g ${INSTALLGROUP} -m 711 init.d/freeside-init ${INIT_FILE}
274         perl -p -i -e "\
275           s/%%%QUEUED_USER%%%/${QUEUED_USER}/g;\
276           s/%%%API_USER%%%/${API_USER}/g;\
277           s/%%%SELFSERVICE_USER%%%/${SELFSERVICE_USER}/g;\
278           s/%%%SELFSERVICE_MACHINES%%%/${SELFSERVICE_MACHINES}/g;\
279         " ${INIT_FILE}
280         ${INIT_INSTALL}
281
282 install-apache:
283         [ -e ${APACHE_CONF}/freeside-base.conf ] && rm ${APACHE_CONF}/freeside-base.conf || true
284         [ -d ${APACHE_CONF} ] && \
285           ( install -o root -m 755 htetc/freeside-base${APACHE_VERSION}.conf ${APACHE_CONF} && \
286             ( [ ${RT_ENABLED} -eq 1 ] && install -o root -m 755 htetc/freeside-rt.conf ${APACHE_CONF} || true ) && \
287             ( [ ${TORRUS_ENABLED} -eq 1 ] && install -o root -m 755 htetc/freeside-torrus.conf ${APACHE_CONF} || true ) && \
288             perl -p -i -e "\
289               s'%%%FREESIDE_DOCUMENT_ROOT%%%'${FREESIDE_DOCUMENT_ROOT}'g; \
290               s'%%%FREESIDE_CONF%%%'${FREESIDE_CONF}'g; \
291               s'%%%MASON_HANDLER%%%'${MASON_HANDLER}'g; \
292             " ${APACHE_CONF}/freeside-*.conf \
293           ) || true
294         [ -d ${APACHE_CONF} ] && [ -x /usr/sbin/a2enconf ] && ( /usr/sbin/a2enconf freeside-base${APACHE_VERSION} ) || true
295         [ -d ${APACHE_CONF} ] && [ ${APACHE_VERSION} = '2.4' ] && [ -x /usr/sbin/a2disconf ] && ( /usr/sbin/a2disconf freeside-base2 ) || true
296         [ -d ${APACHE_CONF} ] && [ -x /usr/sbin/a2enconf ] && [ ${RT_ENABLED} -eq 1 ] && ( /usr/sbin/a2enconf freeside-rt ) || true
297         [ -d ${INSSERV_OVERRIDE} ] && [ -x /sbin/insserv ] && ( install -o root -m 755 init.d/insserv-override-apache2 ${INSSERV_OVERRIDE}/apache2 && insserv -d ) || true
298
299 install-selfservice:
300         [ -e ~freeside ] || cp -pr /etc/skel ~freeside && chown -R freeside ~freeside
301         [ -e ~freeside/.ssh/id_rsa.pub ] || su - freeside -c 'ssh-keygen'
302         for MACHINE in ${SELFSERVICE_MACHINES}; do \
303           scp -r fs_selfservice/FS-SelfService ${SELFSERVICE_INSTALL_USER}@$$MACHINE:. ;\
304           ssh ${SELFSERVICE_INSTALL_USER}@$$MACHINE "cd FS-SelfService; perl Makefile.PL && make" ;\
305           ssh ${SELFSERVICE_INSTALL_USER}@$$MACHINE "cd FS-SelfService; sudo make install" ;\
306           scp ~freeside/.ssh/id_rsa.pub ${SELFSERVICE_INSTALL_USER}@$$MACHINE:. ;\
307           ssh ${SELFSERVICE_INSTALL_USER}@$$MACHINE "sudo ${SELFSERVICE_INSTALL_USERADD} freeside; sudo install -d -o freeside -m 755 ~freeside/.ssh/; sudo install -o freeside -m 600 ./id_rsa.pub ~freeside/.ssh/authorized_keys" ;\
308            ssh ${SELFSERVICE_INSTALL_USER}@$$MACHINE "sudo install -o freeside -d /usr/local/freeside" ;\
309         done
310
311 update-selfservice:
312         for MACHINE in ${SELFSERVICE_MACHINES}; do \
313           RSYNC_RSH=ssh rsync -rlptz fs_selfservice/FS-SelfService/ ${SELFSERVICE_INSTALL_USER}@$$MACHINE:FS-SelfService ;\
314           ssh ${SELFSERVICE_INSTALL_USER}@$$MACHINE "cd FS-SelfService; make clean; perl Makefile.PL && make" ;\
315           ssh ${SELFSERVICE_INSTALL_USER}@$$MACHINE "cd FS-SelfService; sudo make install" ;\
316         done
317
318 install-chown:
319         chown freeside "${FREESIDE_CACHE}/counters.${DATASOURCE}"
320         chown freeside "${FREESIDE_CACHE}/cache.${DATASOURCE}"
321         chown freeside "${FREESIDE_EXPORT}/export.${DATASOURCE}"
322
323 install: install-perl-modules install-docs install-init install-apache install-rt install-torrus install-texmf install-chown
324
325 deploy: install
326         ${HTTPD_RESTART}
327         ${FREESIDE_RESTART}
328
329 dev: dev-perl-modules dev-docs
330
331 create-database:
332         perl -e 'use DBIx::DataSource qw( create_database ); create_database( "${DATASOURCE}", "${DB_USER}", "${DB_PASSWORD}" ) or die $$DBIx::DataSource::errstr;'
333
334 create-config: install-perl-modules
335         [ -e ${FREESIDE_CONF} ] && mv ${FREESIDE_CONF} ${FREESIDE_CONF}.`date +%Y%m%d%H%M%S` || true
336         install -d -o freeside ${FREESIDE_CONF}
337
338         touch ${FREESIDE_CONF}/secrets
339         chown freeside ${FREESIDE_CONF}/secrets
340         chmod 600 ${FREESIDE_CONF}/secrets
341
342         /bin/echo -e "${DATASOURCE}\n${DB_USER}\n${DB_PASSWORD}" >${FREESIDE_CONF}/secrets
343         chmod 600 ${FREESIDE_CONF}/secrets
344         chown freeside ${FREESIDE_CONF}/secrets
345
346         mkdir "${FREESIDE_CACHE}/counters.${DATASOURCE}"
347         chown freeside "${FREESIDE_CACHE}/counters.${DATASOURCE}"
348
349         mkdir "${FREESIDE_CACHE}/cache.${DATASOURCE}"
350         chown freeside "${FREESIDE_CACHE}/cache.${DATASOURCE}"
351
352         mkdir "${FREESIDE_EXPORT}/export.${DATASOURCE}"
353         chown freeside "${FREESIDE_EXPORT}/export.${DATASOURCE}"
354
355         #install this for freeside-setup
356         install -d $(DIST_CONF)
357         #install conf/[a-z]* $(DEFAULT_CONF)
358         #CVS is not [a-z]
359         install `ls -d conf/[a-z]* | grep -v CVS | grep -v '^conf/registries'` $(DIST_CONF)
360
361
362 configure-rt:
363         cd rt; \
364         cp config.layout.in config.layout; \
365         perl -p -i -e "\
366           s'%%%FREESIDE_DOCUMENT_ROOT%%%'${FREESIDE_DOCUMENT_ROOT}'g;\
367           s'%%%MASONDATA%%%'${MASONDATA}'g;\
368         " config.layout; \
369         ./configure --enable-layout=Freeside\
370                     --with-db-type=${DB_TYPE} \
371                     --with-db-dba=${DB_USER} \
372                     --with-db-database=${RT_DB_DATABASE} \
373                     --with-db-rt-user=${DB_USER} \
374                     --with-db-rt-pass="${DB_PASSWORD}" \
375                     --with-web-user=freeside \
376                     --with-web-group=freeside \
377                     --with-rt-group=freeside \
378                     --with-web-handler=modperl2
379
380 create-rt: configure-rt
381         [ -d /opt           ] || mkdir /opt           #doh
382         [ -d /opt/rt3       ] || mkdir /opt/rt3       #
383         [ -d /opt/rt3/share ] || mkdir /opt/rt3/share #
384         cd rt; make install
385         rt/sbin/rt-setup-database --dba '${DB_USER}' \
386                                   --dba-password '${DB_PASSWORD}' \
387                                   --action schema \
388          || true
389         rt/sbin/rt-setup-database --dba-password '${DB_PASSWORD}' \
390                                   --action coredata \
391         && rt/sbin/rt-setup-database --dba-password '${DB_PASSWORD}' \
392                                      --action insert \
393                                      --datafile ${RT_PATH}/etc/initialdata \
394         || true
395
396 install-rt: 
397         if [ ${RT_ENABLED} -eq 1 ]; then ( cd rt; make install ); fi
398         if [ ${RT_ENABLED} -eq 1 ]; then perl -p -i -e "\
399           s'%%%RT_DOMAIN%%%'${RT_DOMAIN}'g;\
400           s'%%%RT_TIMEZONE%%%'${RT_TIMEZONE}'g;\
401           s'%%%FREESIDE_URL%%%'${FREESIDE_URL}'g;\
402         " ${RT_PATH}/etc/RT_SiteConfig.pm; fi
403         if [ ${RT_ENABLED} -eq 1 ]; then \
404           chown -R freeside:freeside ${RT_PATH}/etc; fi
405
406 install-rt-initialdata:
407         if [ ${RT_ENABLED} -eq 1 ] && [ -d ${RT_PATH} ]; then \
408           chown -R freeside:freeside ${RT_PATH}/etc; \
409           install -D -o freeside -g freeside -m 0440 rt/etc/initialdata \
410           ${RT_PATH}/etc/initialdata; fi
411
412 configure-torrus:
413         cd torrus; \
414         torrus_user=freeside var_user=freeside var_group=freeside ./configure
415
416 install-torrus:
417         if [ ${TORRUS_ENABLED} -eq 1 ]; then ( cd torrus; \
418           make; \
419           make install; \
420           perl -p -i -e "\
421             s'%%%FREESIDE_URL%%%'${FREESIDE_URL}'g;\
422           " /usr/local/etc/torrus/conf/torrus-siteconfig.pl; \
423           torrus clearcache \
424         );fi
425
426 clean:
427         rm -rf masondocs
428         rm -rf httemplate/docs/man
429         rm -rf pod2htmi.tmp
430         rm -rf pod2htmd.tmp
431         -cd FS; \
432         make clean
433         -cd fs_selfservice/FS-SelfService; \
434         make clean
435
436 #these are probably only useful if you're me...
437
438 #release: upload-docs
439 .PHONY: release
440 release:
441         # Update the changelog
442         #./bin/cvs2cl
443         #cvs commit -m "Updated for ${VERSION}" ChangeLog
444
445         # Update the RPM specfile
446         #cvs edit ${RPM_SPECFILE}
447         #perl -p -i -e "s/\d+[^\}]+/${VERSION}/ if /%define\s+version\s+(\d+[^\}]+)\}/;" ${RPM_SPECFILE}
448         #perl -p -i -e "s/\d+[^\}]+/1/ if /%define\s+release\s+(\d+[^\}]+)\}/;" ${RPM_SPECFILE}
449         #cvs commit -m "Updated for ${VERSION}" ${RPM_SPECFILE}
450
451         # Update the Debian changelog
452         #cvs edit debian/changelog
453         #dch -v ${DEBVERSION} -p "New upstream release"
454         #cvs commit -m "Updated for ${VERSION}" debian/changelog
455
456         # Make sure other people's changes are pulled in!
457         git pull
458
459         # Tag the release
460         git tag -f ${TAG}
461
462         #cd /home/ivan
463         git archive --prefix=freeside-${VERSION}/ ${TAG} | gzip -9 >freeside-${VERSION}.tar.gz
464
465         scp freeside-${VERSION}.tar.gz ivan@freeside.biz:/var/www/www.freeside.biz/freeside/
466         mv freeside-${VERSION}.tar.gz ..
467
468         #these things failing should not make release target fail, so: "|| true"
469
470         #kick off vmware update
471         #./BUILD_VMWARE_APPLIANCE ${$TAG} || true
472
473         #kick off deb package update
474
475         #kick off rpm package update too?
476
477         #update web demo?
478
479         #update web demo self-service?
480