(no commit message)
[monitor.git] / monitor-server.spec
index e6b5fac..8316ffd 100644 (file)
@@ -32,9 +32,10 @@ Requires: openssh-clients
 Requires: perl-libwww-perl
 Requires: MySQL-python
 Requires: rt3 == 3.4.1
+Requires: nmap
 
 Requires: PLCWWW >= 4.2
-Requires: BootCD >= 4.2
+Requires: bootcd-planetlab-i386 >= 4.2
 
 %description
 Scripts for polling PLC, the node, and PCU status.  Also a collection of
@@ -70,10 +71,17 @@ install -D -m 755 %{name}.cron $RPM_BUILD_ROOT/%{_sysconfdir}/cron.d/%{name}.cro
 echo " * TODO: Setting up Monitor account in local MyPLC"
 # TODO: 
 
-mkdir -p $RPM_BUILD_ROOT/%{python_sitearch}/%{name}
-install -D -m 755 monitor $RPM_BUILD_ROOT/%{python_sitearch}/%{name}
+mkdir -p $RPM_BUILD_ROOT/%{python_sitearch}/monitor
+install -d -D -m 755 monitor $RPM_BUILD_ROOT/%{python_sitearch}/monitor
+# TODO: need a much better way to do this.
+for file in __init__.py database.py config.py ; do 
+       install -D -m 644 monitor/$file $RPM_BUILD_ROOT/%{python_sitearch}/monitor/$file
+done
 install -D -m 755 threadpool.py $RPM_BUILD_ROOT/%{python_sitearch}/threadpool.py
 
+touch $RPM_BUILD_ROOT/var/www/cgi-bin/monitor/monitorconfig.php
+chmod 777 $RPM_BUILD_ROOT/var/www/cgi-bin/monitor/monitorconfig.php
+
 install -D -m 755 monitor-default.conf $RPM_BUILD_ROOT/etc/monitor.conf
 cp $RPM_BUILD_ROOT/usr/share/%{name}/monitorconfig-default.py $RPM_BUILD_ROOT/usr/share/%{name}/monitorconfig.py
 
@@ -83,12 +91,15 @@ rm -rf $RPM_BUILD_ROOT
 %files
 %defattr(-,root,root)
 %config /usr/share/%{name}/monitorconfig.py
+%config /etc/monitor.conf
 /usr/share/%{name}
 /var/lib/%{name}
 /var/www/cgi-bin/monitor
 %{_sysconfdir}/cron.d/%{name}.cron
 %{python_sitearch}/threadpool.py
-%{python_sitearch}/%{name}
+%{python_sitearch}/threadpool.pyc
+%{python_sitearch}/threadpool.pyo
+%{python_sitearch}/monitor
 
 %post
 echo "Post processing"