import repository from arizona
[raven.git] / rpm_builds / SPECS / cherryrepo.spec.template
1 Summary: CherryRepo Repository
2 Name: cherryrepo
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/cherryrepo-@VER@.tar.gz
9 Vendor: University of Arizona
10 BuildRoot: %{_tmppath}/%{name}-root
11
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/cherryrepo
25 install -d -o 0 -g 0 %{buildroot}/usr/local/cherryrepo/tmp
26
27
28 # this doesn't work --> python setup-arizonalib.py install --root=$RPM_BUILD_ROOT --record=ARIZONALIB_INSTALLED_FILES
29
30 install -d -o 0 -g 0 %{buildroot}/usr/local/cherryrepo/tmp/package
31
32 install browse.py %{buildroot}/usr/local/cherryrepo/tmp
33 install compat.py %{buildroot}/usr/local/cherryrepo/tmp
34 install debug.py %{buildroot}/usr/local/cherryrepo/tmp
35 install errorpage.py %{buildroot}/usr/local/cherryrepo/tmp
36 install home.py %{buildroot}/usr/local/cherryrepo/tmp
37 install login.py %{buildroot}/usr/local/cherryrepo/tmp
38 install passfile.py %{buildroot}/usr/local/cherryrepo/tmp
39 install repobackend.py %{buildroot}/usr/local/cherryrepo/tmp
40 install repoclassify.py %{buildroot}/usr/local/cherryrepo/tmp
41 install repoconfig.py %{buildroot}/usr/local/cherryrepo/tmp
42 install repoevent.py %{buildroot}/usr/local/cherryrepo/tmp
43 install repoeventdaemon.py %{buildroot}/usr/local/cherryrepo/tmp
44 install repofrontend.py %{buildroot}/usr/local/cherryrepo/tmp
45 install repometafileupdate.py %{buildroot}/usr/local/cherryrepo/tmp
46 install repoplc.py %{buildroot}/usr/local/cherryrepo/tmp
47 install repopublish.py %{buildroot}/usr/local/cherryrepo/tmp
48 install repoutil.py %{buildroot}/usr/local/cherryrepo/tmp
49 install search.py %{buildroot}/usr/local/cherryrepo/tmp
50 install storkcontrol.py %{buildroot}/usr/local/cherryrepo/tmp
51 install uploadpage.py %{buildroot}/usr/local/cherryrepo/tmp
52
53 install cherryrepo.init %{buildroot}/usr/local/cherryrepo/tmp
54 install setup.py %{buildroot}/usr/local/cherryrepo/tmp
55
56 # etc directory
57 install -d -o 0 -g 0 %{buildroot}/usr/local/cherryrepo/tmp/etc
58 install *.stemp %{buildroot}/usr/local/cherryrepo/tmp/etc
59 install app.conf %{buildroot}/usr/local/cherryrepo/tmp/etc
60
61 # static directory
62 install -d -o 0 -g 0 %{buildroot}/usr/local/cherryrepo/tmp/static
63 install *.png %{buildroot}/usr/local/cherryrepo/tmp/static
64 install *.css %{buildroot}/usr/local/cherryrepo/tmp/static
65
66 install pseprlib2.py %{buildroot}/usr/local/cherryrepo/tmp
67 install pseprmessages.py %{buildroot}/usr/local/cherryrepo/tmp
68 install storkpackage.py %{buildroot}/usr/local/cherryrepo/tmp
69 install storktransaction.py %{buildroot}/usr/local/cherryrepo/tmp
70
71 install __init__.py %{buildroot}/usr/local/cherryrepo/tmp/package
72 install storkrpm.py %{buildroot}/usr/local/cherryrepo/tmp/package
73 install storktar.py %{buildroot}/usr/local/cherryrepo/tmp/package
74
75 %clean
76 rm -rf %{buildroot}
77
78
79 %post
80 cd /usr/local/cherryrepo/tmp
81 python setup.py install
82 cp /usr/local/cherryrepo/scripts/cherryrepo.init /etc/init.d
83
84 if [ $1 = 1 ]; then
85   # this is a fresh install -- start cherryrepo
86   /etc/init.d/cherryrepo.init start
87 else
88   # this is an upgrade -- restart cherryrepo
89   /etc/init.d/cherryrepo.init restart
90 fi
91
92 %preun
93 if [ $1 = 0 ]; then
94   /etc/init.d/cherryrepo.init stop
95   rm /usr/local/cherryrepo/scripts/cherryrepo.init
96 fi
97
98
99 %files
100 %defattr(-,root,root)
101
102 /usr/local/cherryrepo/tmp/browse.py
103 /usr/local/cherryrepo/tmp/compat.py
104 /usr/local/cherryrepo/tmp/debug.py
105 /usr/local/cherryrepo/tmp/errorpage.py
106 /usr/local/cherryrepo/tmp/home.py
107 /usr/local/cherryrepo/tmp/login.py
108 /usr/local/cherryrepo/tmp/passfile.py
109 /usr/local/cherryrepo/tmp/repobackend.py
110 /usr/local/cherryrepo/tmp/repoclassify.py
111 /usr/local/cherryrepo/tmp/repoconfig.py
112 /usr/local/cherryrepo/tmp/repoevent.py
113 /usr/local/cherryrepo/tmp/repoeventdaemon.py
114 /usr/local/cherryrepo/tmp/repofrontend.py
115 /usr/local/cherryrepo/tmp/repometafileupdate.py
116 /usr/local/cherryrepo/tmp/repoplc.py
117 /usr/local/cherryrepo/tmp/repopublish.py
118 /usr/local/cherryrepo/tmp/repoutil.py
119 /usr/local/cherryrepo/tmp/search.py
120 /usr/local/cherryrepo/tmp/storkcontrol.py
121 /usr/local/cherryrepo/tmp/uploadpage.py
122
123 /usr/local/cherryrepo/tmp/cherryrepo.init
124 /usr/local/cherryrepo/tmp/setup.py
125 /usr/local/cherryrepo/tmp/pseprlib2.py
126 /usr/local/cherryrepo/tmp/pseprmessages.py
127 /usr/local/cherryrepo/tmp/storkpackage.py
128 /usr/local/cherryrepo/tmp/storktransaction.py
129 /usr/local/cherryrepo/tmp/package/storkrpm.py
130 /usr/local/cherryrepo/tmp/package/storktar.py
131 /usr/local/cherryrepo/tmp/package/__init__.py
132
133 /usr/local/cherryrepo/tmp/etc/*.stemp
134 /usr/local/cherryrepo/tmp/etc/app.conf
135 /usr/local/cherryrepo/tmp/static/*.css
136 /usr/local/cherryrepo/tmp/static/*.png
137