updated spec file for recent stuff added to gacks
[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 gackscollector.py %{buildroot}/usr/local/gackscentral/bin
63 install gacksconfig.py %{buildroot}/usr/local/gackscentral/bin
64 install gacksdb.py %{buildroot}/usr/local/gackscentral/bin
65 install gacksexcep.py %{buildroot}/usr/local/gackscentral/bin
66 install gacksenforce.py %{buildroot}/usr/local/gackscentral/bin
67 install gackshandle.py %{buildroot}/usr/local/gackscentral/bin
68 install gackshandler_base.py %{buildroot}/usr/local/gackscentral/bin
69 install gackshandler_plc.py %{buildroot}/usr/local/gackscentral/bin
70 install gacksid.py %{buildroot}/usr/local/gackscentral/bin
71 install gacksinvoice.py %{buildroot}/usr/local/gackscentral/bin
72 install gacksjob.py %{buildroot}/usr/local/gackscentral/bin
73 install gacksnodepicker.py %{buildroot}/usr/local/gackscentral/bin
74 install gacksnodestatus.py %{buildroot}/usr/local/gackscentral/bin
75 install gackspolicy.py %{buildroot}/usr/local/gackscentral/bin
76 install gacksqueue.py %{buildroot}/usr/local/gackscentral/bin
77 install gacksqueue_mysql.py %{buildroot}/usr/local/gackscentral/bin
78 install gacksreceipt.py %{buildroot}/usr/local/gackscentral/bin
79 install gacksresource.py %{buildroot}/usr/local/gackscentral/bin
80 install gacksrspec.py %{buildroot}/usr/local/gackscentral/bin
81 install gackslog.py %{buildroot}/usr/local/gackscentral/bin
82 install gackslog_mysql.py %{buildroot}/usr/local/gackscentral/bin
83
84 install localhost-gacks-defragment.sh %{buildroot}/usr/local/gackscentral/bin
85 install localhost-gacks-garbagecollect.sh %{buildroot}/usr/local/gackscentral/bin
86 install localhost-gacks-runasap.sh %{buildroot}/usr/local/gackscentral/bin
87 install localhost-gacks-applyinvoices.sh %{buildroot}/usr/local/gackscentral/bin
88 install localhost-gacks-mailinvoices.sh %{buildroot}/usr/local/gackscentral/bin
89 install gackscentral.cron %{buildroot}/etc/cron.d
90
91 install gacksbackend.init %{buildroot}/etc/init.d
92
93 # Geniwrapper stuff
94 #install __init__.py %{buildroot}/usr/local/gackscentral/bin/sfa
95 #install __init__.py %{buildroot}/usr/local/gackscentral/bin/sfa/trust
96 #install certificate.py %{buildroot}/usr/local/gackscentral/bin/sfa/trust
97 #install credential.py %{buildroot}/usr/local/gackscentral/bin/sfa/trust
98 #install gid.py %{buildroot}/usr/local/gackscentral/bin/sfa/trust
99 #install rights.py %{buildroot}/usr/local/gackscentral/bin/sfa/trust
100 #install trustedroot.py %{buildroot}/usr/local/gackscentral/bin/sfa/trust
101
102 #install __init__.py %{buildroot}/usr/local/gackscentral/bin/sfa/util
103 #install client.py %{buildroot}/usr/local/gackscentral/bin/sfa/util
104 #install faults.py %{buildroot}/usr/local/gackscentral/bin/sfa/util
105 #install sfaticket.py %{buildroot}/usr/local/gackscentral/bin/sfa/util
106 #install misc.py %{buildroot}/usr/local/gackscentral/bin/sfa/util
107 #install namespace.py %{buildroot}/usr/local/gackscentral/bin/sfa/util
108 #install parameter.py %{buildroot}/usr/local/gackscentral/bin/sfa/util
109 #install record.py %{buildroot}/usr/local/gackscentral/bin/sfa/util
110 #install report.py %{buildroot}/usr/local/gackscentral/bin/sfa/util
111 #install rspec.py %{buildroot}/usr/local/gackscentral/bin/sfa/util
112 #install xmlrpcprotocol.py %{buildroot}/usr/local/gackscentral/bin/sfa/util
113
114 %clean
115 rm -rf %{buildroot}
116
117 %post
118 mkdir -p /usr/local/gackscentral/var 2>/dev/null
119 mkdir -p /usr/local/gackscentral/var/log 2>/dev/null
120 mkdir -p /usr/local/gackscentral/var/trusted_roots 2>/dev/null
121
122 ln -sf /usr/local/gackscentral/bin/gackscli.py /usr/bin/gackscli
123
124 # apache can't seem to write the log files
125 chown -R apache /usr/local/gackscentral/var/log
126
127 chkconfig gacksbackend.init on
128 service gacksbackend.init restart
129
130 %preun
131 if [ $1 = 0 ]; then
132   rm -f /usr/bin/gackscli
133 fi
134
135 %files
136 %defattr(-,root,root)
137
138 /etc/httpd/conf.d/gacks-api.conf
139
140 /usr/local/gackscentral/bin/API.py
141 /usr/local/gackscentral/bin/ModPython.py
142 /usr/local/gackscentral/bin/BaseApi.py
143 /usr/local/gackscentral/bin/AuthenticatedApi.py
144 /usr/local/gackscentral/bin/ApiExceptionCodes.py
145
146 /usr/local/gackscentral/bin/testGacksCalendar.py
147 /usr/local/gackscentral/bin/gacksaccount.py
148 /usr/local/gackscentral/bin/gacksaccountmanager.py
149 /usr/local/gackscentral/bin/gacksaccount_test.py
150 /usr/local/gackscentral/bin/gacksauth.py
151 /usr/local/gackscentral/bin/gacksid.py
152 /usr/local/gackscentral/bin/gacksreset.py
153 /usr/local/gackscentral/bin/gacksbackend.py
154 /usr/local/gackscentral/bin/gackscalendar.py
155 /usr/local/gackscentral/bin/gackscalendar_list.py
156 /usr/local/gackscentral/bin/gackscalendar_mysql.py
157 /usr/local/gackscentral/bin/gackscalendar_db.py
158 /usr/local/gackscentral/bin/gackscli.py
159 /usr/local/gackscentral/bin/gacksclient.py
160 /usr/local/gackscentral/bin/gackscollector.py
161 /usr/local/gackscentral/bin/gacksconfig.py
162 /usr/local/gackscentral/bin/gacksdb.py
163 /usr/local/gackscentral/bin/gacksenforce.py
164 /usr/local/gackscentral/bin/gacksexcep.py
165 /usr/local/gackscentral/bin/gackshandle.py
166 /usr/local/gackscentral/bin/gackshandler_base.py
167 /usr/local/gackscentral/bin/gackshandler_plc.py
168 /usr/local/gackscentral/bin/gacksid.py
169 /usr/local/gackscentral/bin/gacksinvoice.py
170 /usr/local/gackscentral/bin/gacksjob.py
171 /usr/local/gackscentral/bin/gacksnodepicker.py
172 /usr/local/gackscentral/bin/gacksnodestatus.py
173 /usr/local/gackscentral/bin/gackspolicy.py
174 /usr/local/gackscentral/bin/gacksqueue.py
175 /usr/local/gackscentral/bin/gacksqueue_mysql.py
176 /usr/local/gackscentral/bin/gacksreceipt.py
177 /usr/local/gackscentral/bin/gacksresource.py
178 /usr/local/gackscentral/bin/gacksrspec.py
179 /usr/local/gackscentral/bin/gackslog.py
180 /usr/local/gackscentral/bin/gackslog_mysql.py
181
182 /usr/local/gackscentral/bin/localhost-gacks-defragment.sh
183 /usr/local/gackscentral/bin/localhost-gacks-garbagecollect.sh
184 /usr/local/gackscentral/bin/localhost-gacks-runasap.sh
185 /usr/local/gackscentral/bin/localhost-gacks-applyinvoices.sh
186 /usr/local/gackscentral/bin/localhost-gacks-mailinvoices.sh
187 %attr(0644,root,root) /etc/cron.d/gackscentral.cron
188
189 /etc/init.d/gacksbackend.init
190 %attr(0755,root,root) /etc/init.d/gacksbackend.init
191
192 # geniwrapper stuff
193 #/usr/local/gackscentral/bin/sfa/__init__.py
194 #/usr/local/gackscentral/bin/sfa/trust/__init__.py
195 #/usr/local/gackscentral/bin/sfa/trust/certificate.py
196 #/usr/local/gackscentral/bin/sfa/trust/credential.py
197 #/usr/local/gackscentral/bin/sfa/trust/gid.py
198 #/usr/local/gackscentral/bin/sfa/trust/rights.py
199 #/usr/local/gackscentral/bin/sfa/trust/trustedroot.py
200
201 #/usr/local/gackscentral/bin/sfa/util/__init__.py
202 #/usr/local/gackscentral/bin/sfa/util/client.py
203 #/usr/local/gackscentral/bin/sfa/util/faults.py
204 #/usr/local/gackscentral/bin/sfa/util/sfaticket.py
205 #/usr/local/gackscentral/bin/sfa/util/misc.py
206 #/usr/local/gackscentral/bin/sfa/util/namespace.py
207 #/usr/local/gackscentral/bin/sfa/util/parameter.py
208 #/usr/local/gackscentral/bin/sfa/util/record.py
209 #/usr/local/gackscentral/bin/sfa/util/report.py
210 #/usr/local/gackscentral/bin/sfa/util/rspec.py
211 #/usr/local/gackscentral/bin/sfa/util/xmlrpcprotocol.py
212