import repository from arizona
[raven.git] / rpm_builds / SPECS / tempest.spec.template
1 Summary: tempest package
2 Name: tempest
3 Version: @VER@
4 Release: @REL@
5 License: Public Domain
6 Group: stork at U of Arizona
7 URL: http://www.cs.arizona.edu/
8 Source RPM: ftp://quadrus.cs.arizona.edu/PlanetLab/V3/tempest-@VER@.tar.gz
9 Vendor: University of Arizona
10 BuildRoot: %{_tmppath}/%{name}-root
11 requires: stork-config stork-defaultkey arizona-lib = @VER@-@REL@ stork = @VER@-@REL@
12 %description
13 TODO: add description of this library
14
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
24 install -d -o 0 -g 0 %{buildroot}/usr/local/stork
25 install -d -o 0 -g 0 %{buildroot}/usr/local/stork/bin
26 install -d -o 0 -g 0 %{buildroot}/usr/local/stork/var
27 install -d -o 0 -g 0 %{buildroot}/usr/local/stork/var/keys
28 install -d -o 0 -g 0 %{buildroot}/etc
29 install -d -o 0 -g 0 %{buildroot}/etc/init.d
30 install -d -o 0 -g 0 %{buildroot}/etc/tempest
31 install -d -o 0 -g 0 %{buildroot}/etc/tempest/groups.d
32 install -d -o 0 -g 0 %{buildroot}/etc/tempest/actions.d
33 install -d -o 0 -g 0 %{buildroot}/etc/owl
34 install -d -o 0 -g 0 %{buildroot}/etc/owl/scripts.d
35 install -d -o 0 -g 0 %{buildroot}/etc/owl/conf.d
36
37 # tempest stuff
38 install tempestversion.py %{buildroot}/usr/local/stork/bin
39 install tempest.py %{buildroot}/usr/local/stork/bin
40 install tempestd.py %{buildroot}/usr/local/stork/bin
41 install tempestpubsub.py %{buildroot}/usr/local/stork/bin
42 install tempest.init %{buildroot}/etc/init.d/tempest
43 install packages.dtd %{buildroot}/usr/local/stork/bin
44 install groups.dtd %{buildroot}/usr/local/stork/bin
45 install xmlgroupparse.py %{buildroot}/usr/local/stork/bin
46 install xmlpackageparse.py %{buildroot}/usr/local/stork/bin
47
48 install bootstrap.packages.pacman %{buildroot}/etc/tempest/actions.d
49 install unmanaged.packages.pacman %{buildroot}/etc/tempest/actions.d
50
51 install tempestd_owl.conf %{buildroot}/etc/owl/conf.d/tempestd.conf
52 install tempestd_owl %{buildroot}/etc/owl/scripts.d/tempestd
53
54 %clean
55 rm -rf %{buildroot}
56
57
58 %post
59 if [ -e /etc/init.d/syslog ]
60 then
61     /etc/init.d/syslog start
62 fi
63
64 # since groups.d is an empty directory, we have to make it manually
65 mkdir -p /etc/tempest/groups.d
66
67 ln -sf /usr/local/stork/bin/tempest.py /usr/bin/tempest
68 ln -sf /usr/local/stork/bin/tempestd.py /usr/bin/tempestd
69
70 # for compatibility with legacy initscript, etc
71 ln -sf /etc/init.d/tempest /etc/init.d/pacman.init
72
73 if [ $1 = 1 ]; then
74   # this is a fresh install -- start tempest
75   /etc/init.d/tempest start
76 else
77   # this is an upgrade -- restart tempest
78   /etc/init.d/tempest restart
79 fi
80
81
82 %preun
83 if [ $1 = 0 ]; then
84   /etc/init.d/tempest stop
85   rm -f /usr/bin/tempest
86   rm -f /usr/bin/tempestd
87   rm -f /etc/init.d/pacman.init
88 fi
89
90
91
92
93 %files
94 %defattr(-,root,root)
95 /usr/local/stork/bin/tempest.py
96 /usr/local/stork/bin/tempestpubsub.py
97 /usr/local/stork/bin/tempestd.py
98 /etc/init.d/tempest
99 /usr/local/stork/bin/packages.dtd
100 /usr/local/stork/bin/groups.dtd
101 /usr/local/stork/bin/tempestversion.py
102 /usr/local/stork/bin/xmlgroupparse.py
103 /usr/local/stork/bin/xmlpackageparse.py
104 /etc/tempest/actions.d/bootstrap.packages.pacman
105 /etc/tempest/actions.d/unmanaged.packages.pacman
106 /etc/owl/scripts.d/tempestd
107 /etc/owl/conf.d/tempestd.conf
108