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