X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=Monitor.spec;h=a2a5439b90af1083f65b05bdb1d883bdd913c739;hb=refs%2Fheads%2Fmonitor-20091130;hp=627cca7b34c3f9c58d31430fbfe39a2dd175db1c;hpb=b080e36462f08a5eb3d8b42b01a9e3077a9772a6;p=monitor.git diff --git a/Monitor.spec b/Monitor.spec index 627cca7..a2a5439 100644 --- a/Monitor.spec +++ b/Monitor.spec @@ -7,7 +7,7 @@ %define name monitor # keep this version in sync with monitor/monitor_version.py %define version 3.0 -%Define Taglevel 25 +%define taglevel 25 %define release %{taglevel}%{?pldistro:.%{pldistro}}%{?date:.%{date}} %global python_sitearch %( python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)" ) @@ -140,47 +140,47 @@ install -d $RPM_BUILD_ROOT/data/var/lib/%{name} install -d $RPM_BUILD_ROOT/data/var/lib/%{name}/archive-pdb install -d $RPM_BUILD_ROOT/var/lib/%{name} install -d $RPM_BUILD_ROOT/var/lib/%{name}/archive-pdb -#install -d $RPM_BUILD_ROOT/var/www/cgi-bin/monitor/ install -d $RPM_BUILD_ROOT/var/www/html/monitorlog/ -install -d $RPM_BUILD_ROOT/%{python_sitearch}/ +install -d $RPM_BUILD_ROOT/etc/httpd/conf.d/ +install -d $RPM_BUILD_ROOT/%{python_sitearch}/monitor -export PYTHONPATH=$PYTHONPATH:$RPM_BUILD_ROOT/%{python_sitearch}/ # pack monitor's dependencies in RPM to make it easier to deploy. +export PYTHONPATH=$PYTHONPATH:$RPM_BUILD_ROOT/%{python_sitearch}/ easy_install --build-directory /var/tmp -d $RPM_BUILD_ROOT/%{python_sitearch}/ -UZ http://files.turbogears.org/eggs/TurboGears-1.0.7-py2.5.egg easy_install --build-directory /var/tmp -d $RPM_BUILD_ROOT/%{python_sitearch}/ -UZ http://pypi.python.org/packages/source/S/SQLAlchemy/SQLAlchemy-0.5.3.tar.gz easy_install --build-directory /var/tmp -d $RPM_BUILD_ROOT/%{python_sitearch}/ -UZ Elixir rm -rf $RPM_BUILD_ROOT/%{python_sitearch}/site.py* +# plc.d scripts install -D -m 644 monitor.functions $RPM_BUILD_ROOT/%{_sysconfdir}/plc.d/monitor.functions install -D -m 755 monitor-server.init $RPM_BUILD_ROOT/%{_sysconfdir}/plc.d/monitor install -D -m 755 zabbix/monitor-zabbix.init $RPM_BUILD_ROOT/%{_sysconfdir}/plc.d/zabbix -echo " * Installing core scripts" -rsync -a --exclude www --exclude archive-pdb --exclude .svn --exclude CVS \ - ./ $RPM_BUILD_ROOT/usr/share/%{name}/ +# cron job for automated polling +install -D -m 644 monitor-server.cron $RPM_BUILD_ROOT/%{_sysconfdir}/cron.d/monitor-server.cron +# apache configuration install -D -m 644 web/monitorweb-httpd.conf $RPM_BUILD_ROOT/etc/httpd/conf.d/ +# we'll install monitor and pcucontrol in site-packages +# install rest to /usr/share/monitor +rsync -a --exclude archive-pdb --exclude .svn --exclude CVS \ + --exclude monitor/ \ + --exclude pcucontol/ \ + ./ $RPM_BUILD_ROOT/usr/share/%{name}/ -echo " * Installing web pages" -#rsync -a www/ $RPM_BUILD_ROOT/var/www/cgi-bin/monitor/ -rsync -a log/ $RPM_BUILD_ROOT/var/www/html/monitorlog/ +# install monitor python package +rsync -a --exclude .svn ./monitor/ $RPM_BUILD_ROOT/%{python_sitearch}/monitor/ -echo " * Installing cron job for automated polling" -install -D -m 644 monitor-server.cron $RPM_BUILD_ROOT/%{_sysconfdir}/cron.d/monitor-server.cron -echo " * TODO: Setting up Monitor account in local MyPLC" -# TODO: +# and pcucontrol +rsync -a --exclude .svn ./pcucontrol/ $RPM_BUILD_ROOT/%{python_sitearch}/pcucontrol/ -install -d $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. -rsync -a monitor/ $RPM_BUILD_ROOT/%{python_sitearch}/monitor/ -#for file in __init__.py database.py config.py ; do -# install -D -m 644 monitor/$file $RPM_BUILD_ROOT/%{python_sitearch}/monitor/$file -#done -rsync -a pcucontrol/ $RPM_BUILD_ROOT/%{python_sitearch}/pcucontrol/ +# install third-party module to site-packages install -D -m 755 threadpool.py $RPM_BUILD_ROOT/%{python_sitearch}/threadpool.py +# TODO: +echo " * TODO: Setting up Monitor account in local MyPLC" + #touch $RPM_BUILD_ROOT/var/www/cgi-bin/monitor/monitorconfig.php #chmod 777 $RPM_BUILD_ROOT/var/www/cgi-bin/monitor/monitorconfig.php @@ -221,6 +221,7 @@ rm -rf $RPM_BUILD_ROOT %{_sysconfdir}/plc.d/monitor %{_sysconfdir}/plc.d/monitor.functions %{_sysconfdir}/plc.d/zabbix +%{_sysconfdir}/httpd/conf.d %files client %defattr(-,root,root)