be233a1537e8f4cdd8f5f3321d170e444ab19400
[raven.git] / rpm_builds / SPECS / gackscentral.spec.template
1 Summary: Gacks Central
2 Name: gackscentral
3 Version: @VER@
4 Release: @REL@
5 License: Public Domain
6 Group: Raven at U of Arizona
7 URL: http://www.cs.arizona.edu/
8 Source RPM: ftp://quadrus.cs.arizona.edu/PlanetLab/V3/gackscentral-@VER@.tar.gz
9 Vendor: University of Arizona
10 BuildRoot: %{_tmppath}/%{name}-root
11 requires: arizona-lib >= 2.2.8, httpd
12
13 %description
14 This rpm provides gacks central.
15 %prep
16 %setup -q
17
18 %build
19
20 %install
21 rm -rf %\{buildroot]
22 install -d -o 0 -g 0 %{buildroot}/usr
23 install -d -o 0 -g 0 %{buildroot}/usr/local/gackscentral
24 install -d -o 0 -g 0 %{buildroot}/usr/local/gackscentral/bin
25 #install -d -o 0 -g 0 %{buildroot}/usr/local/gackscentral/bin/sfa
26 #install -d -o 0 -g 0 %{buildroot}/usr/local/gackscentral/bin/sfa/trust
27 #install -d -o 0 -g 0 %{buildroot}/usr/local/gackscentral/bin/sfa/util
28 install -d -o 0 -g 0 %{buildroot}/usr/local/gackscentral/scripts
29 install -d -o 0 -g 0 %{buildroot}/usr/local/gackscentral/var
30 install -d -o 0 -g 0 %{buildroot}/usr/local/gackscentral/var/trusted_roots
31 install -d -o 0 -g 0 %{buildroot}/usr/local/gackscentral/var/log
32
33 install -d -o 0 -g 0 %{buildroot}/etc
34 install -d -o 0 -g 0 %{buildroot}/etc/httpd
35 install -d -o 0 -g 0 %{buildroot}/etc/httpd/conf.d
36
37 install -d -o 0 -g 0 %{buildroot}/etc/cron.d
38 install -d -o 0 -g 0 %{buildroot}/etc/init.d
39
40 install gacks-api.conf %{buildroot}/etc/httpd/conf.d
41
42 install API.py %{buildroot}/usr/local/gackscentral/bin
43 install ModPython.py %{buildroot}/usr/local/gackscentral/bin
44 install BaseApi.py %{buildroot}/usr/local/gackscentral/bin
45 install AuthenticatedApi.py %{buildroot}/usr/local/gackscentral/bin
46 install ApiExceptionCodes.py  %{buildroot}/usr/local/gackscentral/bin
47
48 install testGacksCalendar.py %{buildroot}/usr/local/gackscentral/bin
49 install gacksaccount.py %{buildroot}/usr/local/gackscentral/bin
50 install gacksaccountmanager.py %{buildroot}/usr/local/gackscentral/bin
51 install gacksaccount_test.py %{buildroot}/usr/local/gackscentral/bin
52 install gacksauth.py %{buildroot}/usr/local/gackscentral/bin
53 install gacksid.py %{buildroot}/usr/local/gackscentral/bin
54 install gacksreset.py %{buildroot}/usr/local/gackscentral/bin
55 install gacksbackend.py %{buildroot}/usr/local/gackscentral/bin
56 install gackscalendar.py %{buildroot}/usr/local/gackscentral/bin
57 install gackscalendar_list.py %{buildroot}/usr/local/gackscentral/bin
58 install gackscalendar_mysql.py %{buildroot}/usr/local/gackscentral/bin
59 install gackscalendar_db.py %{buildroot}/usr/local/gackscentral/bin
60 install gackscli.py %{buildroot}/usr/local/gackscentral/bin
61 install gacksclient.py %{buildroot}/usr/local/gackscentral/bin
62 install gacksexcep.py %{buildroot}/usr/local/gackscentral/bin
63 install gacksenforce.py %{buildroot}/usr/local/gackscentral/bin
64 install gackshandle.py %{buildroot}/usr/local/gackscentral/bin
65 install gackshandler_base.py %{buildroot}/usr/local/gackscentral/bin
66 install gackshandler_plc.py %{buildroot}/usr/local/gackscentral/bin
67 install gacksinvoice.py %{buildroot}/usr/local/gackscentral/bin
68 install gacksjob.py %{buildroot}/usr/local/gackscentral/bin
69 install gacksnodepicker.py %{buildroot}/usr/local/gackscentral/bin
70 install gackspolicy.py %{buildroot}/usr/local/gackscentral/bin
71 install gacksqueue.py %{buildroot}/usr/local/gackscentral/bin
72 install gacksqueue_mysql.py %{buildroot}/usr/local/gackscentral/bin
73 install gacksreceipt.py %{buildroot}/usr/local/gackscentral/bin
74 install gacksresource.py %{buildroot}/usr/local/gackscentral/bin
75 install gacksrspec.py %{buildroot}/usr/local/gackscentral/bin
76 install gackslog.py %{buildroot}/usr/local/gackscentral/bin
77 install gackslog_mysql.py %{buildroot}/usr/local/gackscentral/bin
78
79 install localhost-gacks-defragment.sh %{buildroot}/usr/local/gackscentral/bin
80 install localhost-gacks-garbagecollect.sh %{buildroot}/usr/local/gackscentral/bin
81 install localhost-gacks-runasap.sh %{buildroot}/usr/local/gackscentral/bin
82 install localhost-gacks-applyinvoices.sh %{buildroot}/usr/local/gackscentral/bin
83 install gackscentral.cron %{buildroot}/etc/cron.d
84
85 install gacksbackend.init %{buildroot}/etc/init.d
86
87 # Geniwrapper stuff
88 #install __init__.py %{buildroot}/usr/local/gackscentral/bin/sfa
89 #install __init__.py %{buildroot}/usr/local/gackscentral/bin/sfa/trust
90 #install certificate.py %{buildroot}/usr/local/gackscentral/bin/sfa/trust
91 #install credential.py %{buildroot}/usr/local/gackscentral/bin/sfa/trust
92 #install gid.py %{buildroot}/usr/local/gackscentral/bin/sfa/trust
93 #install rights.py %{buildroot}/usr/local/gackscentral/bin/sfa/trust
94 #install trustedroot.py %{buildroot}/usr/local/gackscentral/bin/sfa/trust
95
96 #install __init__.py %{buildroot}/usr/local/gackscentral/bin/sfa/util
97 #install client.py %{buildroot}/usr/local/gackscentral/bin/sfa/util
98 #install faults.py %{buildroot}/usr/local/gackscentral/bin/sfa/util
99 #install sfaticket.py %{buildroot}/usr/local/gackscentral/bin/sfa/util
100 #install misc.py %{buildroot}/usr/local/gackscentral/bin/sfa/util
101 #install namespace.py %{buildroot}/usr/local/gackscentral/bin/sfa/util
102 #install parameter.py %{buildroot}/usr/local/gackscentral/bin/sfa/util
103 #install record.py %{buildroot}/usr/local/gackscentral/bin/sfa/util
104 #install report.py %{buildroot}/usr/local/gackscentral/bin/sfa/util
105 #install rspec.py %{buildroot}/usr/local/gackscentral/bin/sfa/util
106 #install xmlrpcprotocol.py %{buildroot}/usr/local/gackscentral/bin/sfa/util
107
108 %clean
109 rm -rf %{buildroot}
110
111 %post
112 mkdir -p /usr/local/gackscentral/var 2>/dev/null
113 mkdir -p /usr/local/gackscentral/var/log 2>/dev/null
114 mkdir -p /usr/local/gackscentral/var/trusted_roots 2>/dev/null
115
116 ln -sf /usr/local/gackscentral/bin/gackscli.py /usr/bin/gackscli
117
118 # apache can't seem to write the log files
119 chown -R apache /usr/local/gackscentral/var/log
120
121 chkconfig gacksbackend.init on
122 service gacksbackend.init restart
123
124 %preun
125 if [ $1 = 0 ]; then
126   rm -f /usr/bin/gackscli
127 fi
128
129 %files
130 %defattr(-,root,root)
131
132 /etc/httpd/conf.d/gacks-api.conf
133
134 /usr/local/gackscentral/bin/API.py
135 /usr/local/gackscentral/bin/ModPython.py
136 /usr/local/gackscentral/bin/BaseApi.py
137 /usr/local/gackscentral/bin/AuthenticatedApi.py
138 /usr/local/gackscentral/bin/ApiExceptionCodes.py
139
140 /usr/local/gackscentral/bin/testGacksCalendar.py
141 /usr/local/gackscentral/bin/gacksaccount.py
142 /usr/local/gackscentral/bin/gacksaccountmanager.py
143 /usr/local/gackscentral/bin/gacksaccount_test.py
144 /usr/local/gackscentral/bin/gacksauth.py
145 /usr/local/gackscentral/bin/gacksid.py
146 /usr/local/gackscentral/bin/gacksreset.py
147 /usr/local/gackscentral/bin/gacksbackend.py
148 /usr/local/gackscentral/bin/gackscalendar.py
149 /usr/local/gackscentral/bin/gackscalendar_list.py
150 /usr/local/gackscentral/bin/gackscalendar_mysql.py
151 /usr/local/gackscentral/bin/gackscalendar_db.py
152 /usr/local/gackscentral/bin/gackscli.py
153 /usr/local/gackscentral/bin/gacksclient.py
154 /usr/local/gackscentral/bin/gacksenforce.py
155 /usr/local/gackscentral/bin/gacksexcep.py
156 /usr/local/gackscentral/bin/gackshandle.py
157 /usr/local/gackscentral/bin/gackshandler_base.py
158 /usr/local/gackscentral/bin/gackshandler_plc.py
159 /usr/local/gackscentral/bin/gacksinvoice.py
160 /usr/local/gackscentral/bin/gacksjob.py
161 /usr/local/gackscentral/bin/gacksnodepicker.py
162 /usr/local/gackscentral/bin/gackspolicy.py
163 /usr/local/gackscentral/bin/gacksqueue.py
164 /usr/local/gackscentral/bin/gacksqueue_mysql.py
165 /usr/local/gackscentral/bin/gacksreceipt.py
166 /usr/local/gackscentral/bin/gacksresource.py
167 /usr/local/gackscentral/bin/gacksrspec.py
168 /usr/local/gackscentral/bin/gackslog.py
169 /usr/local/gackscentral/bin/gackslog_mysql.py
170
171 /usr/local/gackscentral/bin/localhost-gacks-defragment.sh
172 /usr/local/gackscentral/bin/localhost-gacks-garbagecollect.sh
173 /usr/local/gackscentral/bin/localhost-gacks-runasap.sh
174 /usr/local/gackscentral/bin/localhost-gacks-applyinvoices.sh
175 %attr(0644,root,root) /etc/cron.d/gackscentral.cron
176
177 /etc/init.d/gacksbackend.init
178 %attr(0755,root,root) /etc/init.d/gacksbackend.init
179
180 # geniwrapper stuff
181 #/usr/local/gackscentral/bin/sfa/__init__.py
182 #/usr/local/gackscentral/bin/sfa/trust/__init__.py
183 #/usr/local/gackscentral/bin/sfa/trust/certificate.py
184 #/usr/local/gackscentral/bin/sfa/trust/credential.py
185 #/usr/local/gackscentral/bin/sfa/trust/gid.py
186 #/usr/local/gackscentral/bin/sfa/trust/rights.py
187 #/usr/local/gackscentral/bin/sfa/trust/trustedroot.py
188
189 #/usr/local/gackscentral/bin/sfa/util/__init__.py
190 #/usr/local/gackscentral/bin/sfa/util/client.py
191 #/usr/local/gackscentral/bin/sfa/util/faults.py
192 #/usr/local/gackscentral/bin/sfa/util/sfaticket.py
193 #/usr/local/gackscentral/bin/sfa/util/misc.py
194 #/usr/local/gackscentral/bin/sfa/util/namespace.py
195 #/usr/local/gackscentral/bin/sfa/util/parameter.py
196 #/usr/local/gackscentral/bin/sfa/util/record.py
197 #/usr/local/gackscentral/bin/sfa/util/report.py
198 #/usr/local/gackscentral/bin/sfa/util/rspec.py
199 #/usr/local/gackscentral/bin/sfa/util/xmlrpcprotocol.py
200