import repository from arizona
[raven.git] / owl / server / Makefile
1
2 VERSION=0.27
3
4 RPM_DIR=RPMS
5 TMP_DIR=/tmp/owl
6 DATE=$(shell date +%D)
7 COMMON= templates/*.psp db.py index.py owllib.py autorun.sh owlacl.py
8
9 #local::
10 #       -sudo cp server/owl.conf /etc/apache2/conf.d
11 #       -sudo cp -rv server/local/{index.py,owllib.py,db.py,templates} /usr/local/owl
12 #       -sudo cp server/local/owl.conf /etc
13
14
15 rpms: rpm
16
17 rpm: RPMS/owl-server.rpm RPMS/owl-server-beta.rpm RPMS/owl-server-alpha.rpm
18
19 alpha: RPMS/owl-server-alpha.rpm
20 beta: RPMS/owl-server-beta.rpm
21 production: RPMS/owl-server.rpm
22
23 %.py : %.template Makefile
24         sed -e 's,@DATE@,${DATE},g' -e 's,@VERSION@,${VERSION},g' < $< > $@
25
26 RPMS/owl-server.rpm: version.py httpd/owl.conf owl-server.conf ${COMMON}
27         rm -rf $(TMP_DIR)
28         mkdir -p $(TMP_DIR)/etc/httpd/conf.d $(TMP_DIR)/usr/local/owl/templates $(TMP_DIR)/etc
29         mkdir -p $(TMP_DIR)/etc/cron.daily
30         cp httpd/owl.conf $(TMP_DIR)/etc/httpd/conf.d
31         cp templates/*.psp $(TMP_DIR)/usr/local/owl/templates
32         cp {db,index,owllib,owlacl}.py $(TMP_DIR)/usr/local/owl
33         cp version.py $(TMP_DIR)/usr/local/owl/version.py
34         cp autorun.sh $(TMP_DIR)/usr/local/owl
35         cp owl-server.conf $(TMP_DIR)/etc
36         cp owlpurge.cron $(TMP_DIR)/etc/cron.daily/
37         ravenbuilder --verbose --rpmversion $(VERSION) owl-server $(TMP_DIR) $(RPM_DIR) 
38         #rm -rf /tmp/owl
39
40 RPMS/owl-server-beta.rpm: beta_version.py httpd/owl_beta.conf owl-server-beta.conf ${COMMON}
41         rm -rf $(TMP_DIR)
42         mkdir -p $(TMP_DIR)/etc/httpd/conf.d $(TMP_DIR)/usr/local/owl_beta/templates $(TMP_DIR)/etc
43         mkdir -p $(TMP_DIR)/etc/cron.daily
44         cp httpd/owl_beta.conf $(TMP_DIR)/etc/httpd/conf.d
45         cp templates/*.psp $(TMP_DIR)/usr/local/owl_beta/templates
46         cp {db,index,owllib,owlacl}.py $(TMP_DIR)/usr/local/owl_beta
47         cp beta_version.py $(TMP_DIR)/usr/local/owl_beta/version.py
48         cp autorun.sh $(TMP_DIR)/usr/local/owl_beta
49         cp owl-server-beta.conf $(TMP_DIR)/etc
50         cp owlpurge.cron $(TMP_DIR)/etc/cron.daily/
51         ravenbuilder --verbose --rpmversion $(VERSION) owl-server-beta $(TMP_DIR) $(RPM_DIR) 
52         #rm -rf /tmp/owl
53
54 RPMS/owl-server-alpha.rpm: alpha_version.py httpd/owl_alpha.conf owl-server-alpha.conf ${COMMON}
55         rm -rf $(TMP_DIR)
56         mkdir -p $(TMP_DIR)/etc/httpd/conf.d $(TMP_DIR)/usr/local/owl_alpha/templates $(TMP_DIR)/etc
57         mkdir -p $(TMP_DIR)/etc/cron.daily
58         cp httpd/owl_alpha.conf $(TMP_DIR)/etc/httpd/conf.d
59         cp templates/*.psp $(TMP_DIR)/usr/local/owl_alpha/templates
60         cp {db,index,owllib,owlacl}.py $(TMP_DIR)/usr/local/owl_alpha
61         cp alpha_version.py $(TMP_DIR)/usr/local/owl_alpha/version.py
62         cp autorun.sh $(TMP_DIR)/usr/local/owl_alpha
63         cp owl-server-alpha.conf $(TMP_DIR)/etc
64         cp owlpurge.cron $(TMP_DIR)/etc/cron.daily/
65         ravenbuilder --verbose --rpmversion $(VERSION) owl-server-alpha $(TMP_DIR) $(RPM_DIR) 
66         #rm -rf /tmp/owl
67
68 install-alpha: alpha
69         scp RPMS/owl-server-alpha-${VERSION}*.rpm owl:/tmp
70         ssh root@owl rpm --install --force /tmp/owl-server-alpha-${VERSION}"*".rpm
71
72 install-beta: beta
73         scp RPMS/owl-server-beta-${VERSION}*.rpm owl:/tmp
74         ssh root@owl rpm --install --force /tmp/owl-server-beta-${VERSION}"*".rpm
75
76 #install: production
77 #       scp RPMS/owl-server-${VERSION}*.rpm owl:/tmp
78 #       ssh root@owl rpm --install --force /tmp/owl-server-${VERSION}"*".rpm
79
80 clean::
81         rm -f *.gz
82
83 distclean: clean
84         rm -f RPMS/*