import repository from arizona
[raven.git] / rpm_builds / SPECS / stork-repository.spec.template
1 Summary: stork package repository
2 Name: stork-repository
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/stork-repository-@VER@.tar.gz
9 Vendor: University of Arizona
10 BuildRoot: %{_tmppath}/%{name}-root
11 requires: arizona-lib httpd php BitTorrent
12
13 %description
14 This rpm provides the basic setup of a stork package repository. It requires both BitTorrent, Apache, and php5 to run. For questions, please email jplichta@cs.arizona.edu
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
27 install -d -o 0 -g 0 %{buildroot}/repository
28 install -d -o 0 -g 0 %{buildroot}/repository/keys
29 install -d -o 0 -g 0 %{buildroot}/repository/packages
30 install -d -o 0 -g 0 %{buildroot}/repository/metadata
31 install -d -o 0 -g 0 %{buildroot}/repository/packageinfo
32 install -d -o 0 -g 0 %{buildroot}/repository/symdir
33 install -d -o 0 -g 0 %{buildroot}/repository/info
34 install -d -o 0 -g 0 %{buildroot}/repository/torrents
35 install -d -o 0 -g 0 %{buildroot}/repository/old-files
36 install -d -o 0 -g 0 %{buildroot}/repository/user-upload
37 install -d -o 0 -g 0 %{buildroot}/repository/user-upload/tpfiles
38 install -d -o 0 -g 0 %{buildroot}/repository/user-upload/conf
39 install -d -o 0 -g 0 %{buildroot}/repository/user-upload/pubkeys
40 install -d -o 0 -g 0 %{buildroot}/repository/user-upload/pacman
41 install -d -o 0 -g 0 %{buildroot}/repository/user-upload/tmp
42 install -d -o 0 -g 0 %{buildroot}/repository/stork
43 install -d -o 0 -g 0 %{buildroot}/repository/stork/images
44
45 # stuff for S3
46 install -d -o 0 -g 0 %{buildroot}/usr/local/stork/bin/s3
47 install S3.py %{buildroot}/usr/local/stork/bin/s3
48 install __init__.py %{buildroot}/usr/local/stork/bin/s3
49 install storks3.py %{buildroot}/usr/local/stork/bin
50
51 install index.html %{buildroot}/repository
52 install browse.php %{buildroot}/repository/stork
53 install directorytool.php %{buildroot}/repository/stork
54 install fileobject.php %{buildroot}/repository/stork
55 install filetools.php %{buildroot}/repository/stork
56 install getSliceNames.php %{buildroot}/repository/stork
57 install global_config.php %{buildroot}/repository/stork
58 install gui_getslices.php %{buildroot}/repository/stork
59 install infotool.php %{buildroot}/repository/stork
60 install instructions %{buildroot}/repository/stork
61 install authenticate.php %{buildroot}/repository/stork
62 install links.php %{buildroot}/repository/stork
63 install login.php %{buildroot}/repository/stork
64 install packageselector %{buildroot}/repository/stork
65 install packagetools.php %{buildroot}/repository/stork
66 install search.php %{buildroot}/repository/stork
67 install searchtools.php %{buildroot}/repository/stork
68 install stork.css %{buildroot}/repository/stork
69 install thanks.html %{buildroot}/repository/stork
70 install upload_handler.php %{buildroot}/repository/stork
71 install upload.php %{buildroot}/repository/stork
72 install xmlrpc.inc %{buildroot}/repository/stork
73 install stork-header.png %{buildroot}/repository/stork/images
74 install powered_by_pl_grey.png %{buildroot}/repository/stork/images
75 install template_logo_small_grey.png %{buildroot}/repository/stork/images
76 install bigrotation2.gif %{buildroot}/repository/stork/images
77 install stork-sort-down.png  %{buildroot}/repository/stork/images
78 install stork-sort-up.png  %{buildroot}/repository/stork/images
79
80 install storkvalidatepubkey.py %{buildroot}/usr/local/stork/bin
81 install storksignedfiletype.py %{buildroot}/usr/local/stork/bin
82 install storkvalidatepackage.py %{buildroot}/usr/local/stork/bin
83 install storkverifysignedfile.py %{buildroot}/usr/local/stork/bin
84 install storkextractmeta.py %{buildroot}/usr/local/stork/bin
85 install storkmetafileupdate.py %{buildroot}/usr/local/stork/bin
86 install storklinkrepository.py %{buildroot}/usr/local/stork/bin
87 install attemptpsepr.init %{buildroot}/usr/local/stork/bin
88 install storkpseprattempt.py %{buildroot}/usr/local/stork/bin
89 install pseprpusher.py %{buildroot}/usr/local/stork/bin
90 install pseprlib2.py %{buildroot}/usr/local/stork/bin
91 install pseprmessages.py %{buildroot}/usr/local/stork/bin
92 install check_space %{buildroot}/usr/local/stork/bin
93 install stork_fsck.sh %{buildroot}/usr/local/stork/bin
94 install storkmakemetalive.sh %{buildroot}/usr/local/stork/bin
95 install storkrepbuild.py %{buildroot}/usr/local/stork/bin
96
97
98 %clean
99 rm -rf %{buildroot}
100
101
102 %post
103 mkdir /repository/packageinfo 2>/dev/null
104 mkdir /repository/packages    2>/dev/null
105 mkdir /repository/metadata    2>/dev/null
106 mkdir /repository/info        2>/dev/null
107 mkdir /repository/keys        2>/dev/null
108 mkdir /repository/symdir      2>/dev/null
109 mkdir /repository/torrents    2>/dev/null
110 mkdir /repository/old-files   2>/dev/null
111 mkdir /repository/user-upload 2>/dev/null
112 mkdir /repository/user-upload/tpfiles 2>/dev/null
113 mkdir /repository/user-upload/conf    2>/dev/null
114 mkdir /repository/user-upload/pacman  2>/dev/null
115 mkdir /repository/user-upload/pubkeys 2>/dev/null
116 mkdir /repository/user-upload/tmp     2>/dev/null
117 mkdir -p /usr/local/stork/tar_packinfo 2>/dev/null
118
119 echo " ************************* IMPORTANT ******************************"
120 echo " *                                                                *"
121 echo " * To complete the configuration of the stork package repository  *"
122 echo " * please go to:                                                  *"
123 echo " * http://www.cs.arizona.edu/stork/newdesign/repositorysetup.html *"
124 echo " *                                                                *"
125 echo " ******************************************************************"
126
127
128
129 %preun
130
131
132 %files
133 %defattr(-,root,root)
134 /repository/index.html
135 /repository/stork/browse.php
136 /repository/stork/directorytool.php
137 /repository/stork/fileobject.php
138 /repository/stork/filetools.php
139 /repository/stork/getSliceNames.php
140 /repository/stork/global_config.php
141 /repository/stork/gui_getslices.php
142 /repository/stork/infotool.php
143 /repository/stork/instructions
144 /repository/stork/links.php
145 /repository/stork/login.php
146 /repository/stork/authenticate.php
147 /repository/stork/packageselector
148 /repository/stork/packagetools.php
149 /repository/stork/search.php
150 /repository/stork/searchtools.php
151 /repository/stork/stork.css
152 /repository/stork/thanks.html
153 /repository/stork/upload_handler.php
154 /repository/stork/upload.php
155 /repository/stork/xmlrpc.inc
156 /repository/stork/images/stork-header.png
157 /repository/stork/images/powered_by_pl_grey.png
158 /repository/stork/images/template_logo_small_grey.png
159 /repository/stork/images/bigrotation2.gif
160 /repository/stork/images/stork-sort-down.png 
161 /repository/stork/images/stork-sort-up.png 
162
163
164 /usr/local/stork/bin/storkvalidatepubkey.py
165 /usr/local/stork/bin/storksignedfiletype.py
166 /usr/local/stork/bin/storkvalidatepackage.py
167 /usr/local/stork/bin/storkverifysignedfile.py
168 /usr/local/stork/bin/storkextractmeta.py
169 /usr/local/stork/bin/storkmetafileupdate.py
170 /usr/local/stork/bin/storklinkrepository.py
171 /usr/local/stork/bin/attemptpsepr.init
172 /usr/local/stork/bin/storkpseprattempt.py
173 /usr/local/stork/bin/pseprpusher.py
174 /usr/local/stork/bin/pseprlib2.py
175 /usr/local/stork/bin/pseprmessages.py
176 /usr/local/stork/bin/check_space
177 /usr/local/stork/bin/stork_fsck.sh
178 /usr/local/stork/bin/storkmakemetalive.sh
179 /usr/local/stork/bin/storkrepbuild.py
180 /usr/local/stork/bin/storks3.py
181 /usr/local/stork/bin/s3/S3.py
182 /usr/local/stork/bin/s3/__init__.py
183