Try to build the AMT command. I expect the /tmp fs to be too small.
[monitor.git] / monitor-server.spec
1 #
2 # $Id$
3
4
5 %define url $URL: svn+ssh://svn.planet-lab.org/svn/Monitor/trunk/Monitor-server.spec $
6
7 %define name monitor-server
8 %define version 1.0
9 %define taglevel 6
10
11 %define release %{taglevel}%{?pldistro:.%{pldistro}}%{?date:.%{date}}
12
13 Summary: Monitor backend scripts for server
14 Name: %{name}
15 Version: %{version}
16 Release: %{release}
17 Source0: %{name}-%{version}.tar.bz2
18 License: GPL
19 Group: Applications/System
20 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
21
22 Vendor: PlanetLab
23 Packager: PlanetLab Central <support@planet-lab.org>
24 Distribution: PlanetLab %{plrelease}
25 URL: %(echo %{url} | cut -d ' ' -f 2)
26
27 Requires: curl
28 Requires: coreutils
29 Requires: openssh-clients
30 Requires: PLCWWW >= 4.2
31 Requires: BootCD >= 4.2
32 Requires: MySQL-python
33 Requires: rt3 == 3.4.1
34
35 %description
36 Scripts for polling PLC, the node, and PCU status.  Also a collection of
37 command-line utilities for querying the status database. 
38
39 %prep
40 %setup -q
41
42 %build
43 # TODO: note that we should build the cmdamt/ with g++
44 cd cmdamt
45 make
46 cd ..
47
48 %install
49
50 rm -rf $RPM_BUILD_ROOT
51 mkdir -p $RPM_BUILD_ROOT/usr/share/%{name}
52 mkdir -p $RPM_BUILD_ROOT/var/lib/%{name}
53 mkdir -p $RPM_BUILD_ROOT/var/lib/%{name}/archive-pdb
54 mkdir -p $RPM_BUILD_ROOT/var/www/cgi-bin/monitor/
55
56 echo " * Installing core scripts"
57 rsync -a --exclude www --exclude archive-pdb --exclude .svn --exclude CVS \
58           ./ $RPM_BUILD_ROOT/usr/share/%{name}/
59
60 echo " * Installing web pages"
61 rsync -a www/ $RPM_BUILD_ROOT/var/www/cgi-bin/monitor/
62
63 echo " * Installing cron job for automated polling"
64 install -D -m 755 %{name}.cron $RPM_BUILD_ROOT/%{_sysconfdir}/cron.d/%{name}.cron
65 echo " * TODO: Setting up Monitor account in local MyPLC"
66 # TODO: 
67
68 cp $RPM_BUILD_ROOT/usr/share/%{name}/monitorconfig-default.py $RPM_BUILD_ROOT/usr/share/%{name}/monitorconfig.py
69
70 %clean
71 rm -rf $RPM_BUILD_ROOT
72
73 %files
74 %defattr(-,root,root)
75 %config /usr/share/%{name}/monitorconfig.py
76 /usr/share/%{name}
77 /var/lib/%{name}
78 /var/www/cgi-bin/monitor
79 %{_sysconfdir}/cron.d/%{name}.cron
80
81 %post
82 echo "Post processing"
83 # TODO: this will be nice when we have a web-based service running., such as
84 #               an API server or so on.
85 # TODO: create real monitorconfig.py from monitorconfig-default.py
86 # TODO: create monitorconfig.php using phpconfig.py 
87 # TODO: create symlink in /var/lib/monitor-server for chroot environments
88 # TODO: update the content of automate_pl03.sh 
89 # TODO: Use the installed version of bootcd to create custom boot images. ( or, use the api now).
90
91 #chkconfig --add monitor-server
92 #chkconfig monitor-server on
93
94 %changelog
95 * Mon Aug 11 2008 Stephen Soltesz <soltesz@cs.princeton.edu> - Monitor-1.0-6
96 - This is a major tag of every thing.  probably needs a very different release
97 - number.
98
99 * Wed Jul 30 2008 Stephen Soltesz <soltesz@cs.princeton.edu> - Monitor-server-1.0-5
100 - initial creation of server-side package