tower location CSV download, #39776
[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 = 0
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.14.2/
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         cp htetc/htpasswd.logout ${FREESIDE_CONF}
198         rm -r ${MASONDATA}
199         mkdir ${MASONDATA}
200         chown -R freeside ${MASONDATA}
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_DOCUMENT_ROOT%%%'${FREESIDE_DOCUMENT_ROOT}'g; \
221           s'%%%RT_ENABLED%%%'${RT_ENABLED}'g; \
222           s'%%%RT_PATH%%%'${RT_PATH}'g; \
223           s'%%%MASONDATA%%%'${MASONDATA}'g;\
224           s/%%%SELFSERVICE_USER%%%/${SELFSERVICE_USER}/g;\
225         " blib/lib/FS/*.pm;\
226         perl -p -i -e "\
227           s/%%%SELFSERVICE_USER%%%/${SELFSERVICE_USER}/g;\
228           s/%%%SELFSERVICE_MACHINES%%%/${SELFSERVICE_MACHINES}/g;\
229           s|%%%FREESIDE_EXPORT%%%|${FREESIDE_EXPORT}|g;\
230         " blib/lib/FS/Cron/*.pm;\
231         perl -p -i -e "\
232           s|%%%FREESIDE_CONF%%%|${FREESIDE_CONF}|g;\
233           s|%%%FREESIDE_EXPORT%%%|${FREESIDE_EXPORT}|g;\
234           s|%%%FREESIDE_LOG%%%|${FREESIDE_LOG}|g;\
235         " blib/lib/FS/part_export/*.pm;\
236         perl -p -i -e "\
237           s|%%%FREESIDE_CACHE%%%|${FREESIDE_CACHE}|g;\
238         " blib/lib/FS/cust_main/*.pm blib/lib/FS/cust_pkg/*.pm;\
239         perl -p -i -e "\
240           s|%%%FREESIDE_LOG%%%|${FREESIDE_LOG}|g;\
241         " blib/lib/FS/Daemon/*.pm;\
242         perl -p -i -e "\
243           s|%%%FREESIDE_CONF%%%|${FREESIDE_CONF}|g;\
244           s|%%%FREESIDE_LOG%%%|${FREESIDE_LOG}|g;\
245           s|%%%FREESIDE_LOCK%%%|${FREESIDE_LOCK}|g;\
246           s|%%%FREESIDE_CACHE%%%|${FREESIDE_CACHE}|g;\
247           s|%%%FREESIDE_EXPORT%%%|${FREESIDE_EXPORT}|g;\
248           s|%%%DIST_CONF%%%|${DIST_CONF}|g;\
249         " blib/script/*
250
251 install-perl-modules: perl-modules install-rt-initialdata
252         [ -L ${PERL_INC_DEV_KLUDGE}/FS ] \
253           && rm ${PERL_INC_DEV_KLUDGE}/FS \
254           && mv ${PERL_INC_DEV_KLUDGE}/FS.old ${PERL_INC_DEV_KLUDGE}/FS \
255           || true
256         cd FS; \
257         make install UNINST=1
258         #install this for freeside-setup
259         install -d $(DIST_CONF)
260         #install conf/[a-z]* $(DEFAULT_CONF)
261         #CVS is not [a-z]
262         install `ls -d conf/[a-z]* | grep -v CVS | grep -v '^conf/registries'` $(DIST_CONF)
263
264 dev-perl-modules: perl-modules
265         [ -d ${PERL_INC_DEV_KLUDGE}/FS -a ! -L ${PERL_INC_DEV_KLUDGE}/FS ] \
266           && mv ${PERL_INC_DEV_KLUDGE}/FS ${PERL_INC_DEV_KLUDGE}/FS.old \
267           || true
268
269         rm -rf ${PERL_INC_DEV_KLUDGE}/FS
270         ln -sf ${FREESIDE_PATH}/FS/blib/lib/FS ${PERL_INC_DEV_KLUDGE}/FS
271
272 install-texmf:  
273         install -D -o freeside -m 444 etc/*.sty \
274           /usr/local/share/texmf/tex/latex/
275         texhash /usr/local/share/texmf
276
277 install-init:
278         #[ -e ${INIT_FILE} ] || install -o root -g ${INSTALLGROUP} -m 711 init.d/freeside-init ${INIT_FILE}
279         install -o root -g ${INSTALLGROUP} -m 711 init.d/freeside-init ${INIT_FILE}
280         perl -p -i -e "\
281           s/%%%QUEUED_USER%%%/${QUEUED_USER}/g;\
282           s/%%%API_USER%%%/${API_USER}/g;\
283           s/%%%SELFSERVICE_USER%%%/${SELFSERVICE_USER}/g;\
284           s/%%%SELFSERVICE_MACHINES%%%/${SELFSERVICE_MACHINES}/g;\
285         " ${INIT_FILE}
286         ${INIT_INSTALL}
287
288 install-apache:
289         [ -e ${APACHE_CONF}/freeside-base.conf ] && rm ${APACHE_CONF}/freeside-base.conf || true
290         [ -d ${APACHE_CONF} ] && \
291           ( install -o root -m 755 htetc/freeside-base2.conf ${APACHE_CONF} && \
292             ( [ ${RT_ENABLED} -eq 1 ] && install -o root -m 755 htetc/freeside-rt.conf ${APACHE_CONF} || true ) && \
293             ( [ ${TORRUS_ENABLED} -eq 1 ] && install -o root -m 755 htetc/freeside-torrus.conf ${APACHE_CONF} || true ) && \
294             perl -p -i -e "\
295               s'%%%FREESIDE_DOCUMENT_ROOT%%%'${FREESIDE_DOCUMENT_ROOT}'g; \
296               s'%%%FREESIDE_CONF%%%'${FREESIDE_CONF}'g; \
297               s'%%%MASON_HANDLER%%%'${MASON_HANDLER}'g; \
298             " ${APACHE_CONF}/freeside-*.conf \
299           ) || true
300         [ -d ${APACHE_CONF} ] && [ -x /usr/sbin/a2enconf ] && ( /usr/sbin/a2enconf freeside-base${APACHE_VERSION} ) || true
301         [ -d ${APACHE_CONF} ] && [ ${APACHE_VERSION} = '2.4' ] && [ -x /usr/sbin/a2disconf ] && ( /usr/sbin/a2disconf freeside-base2 ) || true
302         [ -d ${APACHE_CONF} ] && [ -x /usr/sbin/a2enconf ] && [ ${RT_ENABLED} -eq 1 ] && ( /usr/sbin/a2enconf freeside-rt ) || true
303         [ -d ${INSSERV_OVERRIDE} ] && [ -x /sbin/insserv ] && ( install -o root -m 755 init.d/insserv-override-apache2 ${INSSERV_OVERRIDE}/apache2 && insserv -d ) || true
304
305 install-selfservice:
306         [ -e ~freeside ] || cp -pr /etc/skel ~freeside && chown -R freeside ~freeside
307         [ -e ~freeside/.ssh/id_rsa.pub ] || su - freeside -c 'ssh-keygen'
308         for MACHINE in ${SELFSERVICE_MACHINES}; do \
309           scp -r fs_selfservice/FS-SelfService ${SELFSERVICE_INSTALL_USER}@$$MACHINE:. ;\
310           ssh ${SELFSERVICE_INSTALL_USER}@$$MACHINE "cd FS-SelfService; perl Makefile.PL && make" ;\
311           ssh ${SELFSERVICE_INSTALL_USER}@$$MACHINE "cd FS-SelfService; sudo make install" ;\
312           scp ~freeside/.ssh/id_rsa.pub ${SELFSERVICE_INSTALL_USER}@$$MACHINE:. ;\
313           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" ;\
314            ssh ${SELFSERVICE_INSTALL_USER}@$$MACHINE "sudo install -o freeside -d /usr/local/freeside" ;\
315         done
316
317 update-selfservice:
318         for MACHINE in ${SELFSERVICE_MACHINES}; do \
319           RSYNC_RSH=ssh rsync -rlptz fs_selfservice/FS-SelfService/ ${SELFSERVICE_INSTALL_USER}@$$MACHINE:FS-SelfService ;\
320           ssh ${SELFSERVICE_INSTALL_USER}@$$MACHINE "cd FS-SelfService; make clean; perl Makefile.PL && make" ;\
321           ssh ${SELFSERVICE_INSTALL_USER}@$$MACHINE "cd FS-SelfService; sudo make install" ;\
322         done
323
324 install-chown:
325         chown freeside "${FREESIDE_CACHE}/counters.${DATASOURCE}"
326         chown freeside "${FREESIDE_CACHE}/cache.${DATASOURCE}"
327         chown freeside "${FREESIDE_EXPORT}/export.${DATASOURCE}"
328
329 install: install-perl-modules install-docs install-init install-apache install-rt install-torrus install-texmf install-chown
330
331 deploy: install
332         ${HTTPD_RESTART}
333         ${FREESIDE_RESTART}
334
335 dev: dev-perl-modules dev-docs
336
337 create-database:
338         perl -e 'use DBIx::DataSource qw( create_database ); create_database( "${DATASOURCE}", "${DB_USER}", "${DB_PASSWORD}" ) or die $$DBIx::DataSource::errstr;'
339
340 create-config: install-perl-modules
341         [ -e ${FREESIDE_CONF} ] && mv ${FREESIDE_CONF} ${FREESIDE_CONF}.`date +%Y%m%d%H%M%S` || true
342         install -d -o freeside ${FREESIDE_CONF}
343
344         touch ${FREESIDE_CONF}/secrets
345         chown freeside ${FREESIDE_CONF}/secrets
346         chmod 600 ${FREESIDE_CONF}/secrets
347
348         /bin/echo -e "${DATASOURCE}\n${DB_USER}\n${DB_PASSWORD}" >${FREESIDE_CONF}/secrets
349         chmod 600 ${FREESIDE_CONF}/secrets
350         chown freeside ${FREESIDE_CONF}/secrets
351
352         mkdir "${FREESIDE_CACHE}/counters.${DATASOURCE}"
353         chown freeside "${FREESIDE_CACHE}/counters.${DATASOURCE}"
354
355         mkdir "${FREESIDE_CACHE}/cache.${DATASOURCE}"
356         chown freeside "${FREESIDE_CACHE}/cache.${DATASOURCE}"
357
358         mkdir "${FREESIDE_EXPORT}/export.${DATASOURCE}"
359         chown freeside "${FREESIDE_EXPORT}/export.${DATASOURCE}"
360
361         #install this for freeside-setup
362         install -d $(DIST_CONF)
363         #install conf/[a-z]* $(DEFAULT_CONF)
364         #CVS is not [a-z]
365         install `ls -d conf/[a-z]* | grep -v CVS | grep -v '^conf/registries'` $(DIST_CONF)
366
367
368 configure-rt:
369         cd rt; \
370         cp config.layout.in config.layout; \
371         perl -p -i -e "\
372           s'%%%FREESIDE_DOCUMENT_ROOT%%%'${FREESIDE_DOCUMENT_ROOT}'g;\
373           s'%%%MASONDATA%%%'${MASONDATA}'g;\
374         " config.layout; \
375         ./configure --enable-layout=Freeside\
376                     --with-db-type=${DB_TYPE} \
377                     --with-db-dba=${DB_USER} \
378                     --with-db-database=${RT_DB_DATABASE} \
379                     --with-db-rt-user=${DB_USER} \
380                     --with-db-rt-pass="${DB_PASSWORD}" \
381                     --with-web-user=freeside \
382                     --with-web-group=freeside \
383                     --with-rt-group=freeside \
384                     --with-web-handler=modperl2
385
386 create-rt: configure-rt
387         [ -d /opt           ] || mkdir /opt           #doh
388         [ -d /opt/rt3       ] || mkdir /opt/rt3       #
389         [ -d /opt/rt3/share ] || mkdir /opt/rt3/share #
390         cd rt; make install
391         rt/sbin/rt-setup-database --dba '${DB_USER}' \
392                                   --dba-password '${DB_PASSWORD}' \
393                                   --action schema \
394          || true
395         rt/sbin/rt-setup-database --dba-password '${DB_PASSWORD}' \
396                                   --action coredata \
397         && rt/sbin/rt-setup-database --dba-password '${DB_PASSWORD}' \
398                                      --action insert \
399                                      --datafile ${RT_PATH}/etc/initialdata \
400         || true
401
402 install-rt: 
403         if [ ${RT_ENABLED} -eq 1 ]; then ( cd rt; make install ); fi
404         if [ ${RT_ENABLED} -eq 1 ]; then cp -r rt/share/static/images ${FREESIDE_DOCUMENT_ROOT}/rt/NoAuth/ ;fi
405         if [ ${RT_ENABLED} -eq 1 ]; then perl -p -i -e "\
406           s'%%%RT_DOMAIN%%%'${RT_DOMAIN}'g;\
407           s'%%%RT_TIMEZONE%%%'${RT_TIMEZONE}'g;\
408           s'%%%FREESIDE_URL%%%'${FREESIDE_URL}'g;\
409         " ${RT_PATH}/etc/RT_SiteConfig.pm; fi
410         if [ ${RT_ENABLED} -eq 1 ]; then \
411           chown -R freeside:freeside ${RT_PATH}/etc; fi
412
413 install-rt-initialdata:
414         if [ ${RT_ENABLED} -eq 1 ] && [ -d ${RT_PATH} ]; then \
415           chown -R freeside:freeside ${RT_PATH}/etc; \
416           install -D -o freeside -g freeside -m 0440 rt/etc/initialdata \
417           ${RT_PATH}/etc/initialdata; fi
418
419 configure-torrus:
420         cd torrus; \
421         torrus_user=freeside var_user=freeside var_group=freeside ./configure
422
423 install-torrus:
424         if [ ${TORRUS_ENABLED} -eq 1 ]; then ( cd torrus; \
425           make; \
426           make install; \
427           perl -p -i -e "\
428             s'%%%FREESIDE_URL%%%'${FREESIDE_URL}'g;\
429           " /usr/local/etc/torrus/conf/torrus-siteconfig.pl; \
430           torrus clearcache \
431         );fi
432
433 clean:
434         rm -rf masondocs
435         rm -rf httemplate/docs/man
436         rm -rf pod2htmi.tmp
437         rm -rf pod2htmd.tmp
438         -cd FS; \
439         make clean
440         -cd fs_selfservice/FS-SelfService; \
441         make clean
442
443 #these are probably only useful if you're me...
444
445 #release: upload-docs
446 .PHONY: release
447 release:
448         # Update the changelog
449         #./bin/cvs2cl
450         #cvs commit -m "Updated for ${VERSION}" ChangeLog
451
452         # Update the RPM specfile
453         #cvs edit ${RPM_SPECFILE}
454         #perl -p -i -e "s/\d+[^\}]+/${VERSION}/ if /%define\s+version\s+(\d+[^\}]+)\}/;" ${RPM_SPECFILE}
455         #perl -p -i -e "s/\d+[^\}]+/1/ if /%define\s+release\s+(\d+[^\}]+)\}/;" ${RPM_SPECFILE}
456         #cvs commit -m "Updated for ${VERSION}" ${RPM_SPECFILE}
457
458         # Update the Debian changelog
459         #cvs edit debian/changelog
460         #dch -v ${DEBVERSION} -p "New upstream release"
461         #cvs commit -m "Updated for ${VERSION}" debian/changelog
462
463         # Make sure other people's changes are pulled in!
464         git pull
465
466         # Tag the release
467         git tag -f ${TAG}
468
469         #cd /home/ivan
470         git archive --prefix=freeside-${VERSION}/ ${TAG} | gzip -9 >freeside-${VERSION}.tar.gz
471
472         scp freeside-${VERSION}.tar.gz ivan@freeside.biz:/var/www/www.freeside.biz/freeside/
473         mv freeside-${VERSION}.tar.gz ..
474
475         #these things failing should not make release target fail, so: "|| true"
476
477         #kick off vmware update
478         #./BUILD_VMWARE_APPLIANCE ${$TAG} || true
479
480         #kick off deb package update
481
482         #kick off rpm package update too?
483
484         #update web demo?
485
486         #update web demo self-service?
487