import repository from arizona
[raven.git] / rpm_builds / SPECS / arizona-lib.spec.template
1 Summary: arizona library package
2 Name: arizona-lib
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/arizona-lib-@VER@.tar.gz
9 Vendor: University of Arizona
10 BuildRoot: %{_tmppath}/%{name}-root
11 Requires: python >= 2.5, ravenlib = @VER@-@REL@
12
13 %description
14 TODO: add description of this library
15
16 %prep
17 %setup -q
18
19 %build
20
21 %install
22 rm -rf %\{buildroot]
23 install -d -o 0 -g 0 %{buildroot}/usr
24 install -d -o 0 -g 0 %{buildroot}/usr/bin
25 install -d -o 0 -g 0 %{buildroot}/usr/local
26 install -d -o 0 -g 0 %{buildroot}/usr/local/stork
27 install -d -o 0 -g 0 %{buildroot}/usr/local/stork/bin
28 install -d -o 0 -g 0 %{buildroot}/usr/local/stork/bin/transfer
29 install -d -o 0 -g 0 %{buildroot}/usr/local/stork/bin/package
30 install -d -o 0 -g 0 %{buildroot}/usr/local/stork/bin/share
31 install -d -o 0 -g 0 %{buildroot}/usr/local/stork/var/certificates
32
33 # this doesn't work --> python setup.py install --root=$RPM_BUILD_ROOT --record=ARIZONALIB_INSTALLED_FILES
34
35 install -d -o 0 -g 0 %{buildroot}/usr/local/stork/install/arizonalib
36 install -d -o 0 -g 0 %{buildroot}/usr/local/stork/install/arizonalib/transfer
37 install arizonacomm.py %{buildroot}/usr/local/stork/install/arizonalib
38 install arizonaconfig.py %{buildroot}/usr/local/stork/install/arizonalib
39 install arizonacrypt.py %{buildroot}/usr/local/stork/install/arizonalib
40 install arizonacurl.py %{buildroot}/usr/local/stork/install/arizonalib
41 install arizonaerror.py %{buildroot}/usr/local/stork/install/arizonalib
42 install arizonageneral.py %{buildroot}/usr/local/stork/install/arizonalib
43 install arizonareport.py %{buildroot}/usr/local/stork/install/arizonalib
44 install arizonatemplate.py %{buildroot}/usr/local/stork/install/arizonalib
45 install arizonatransfer.py %{buildroot}/usr/local/stork/install/arizonalib
46 install arizonaunittest.py %{buildroot}/usr/local/stork/install/arizonalib
47 install arizonawarning.py %{buildroot}/usr/local/stork/install/arizonalib
48 install arizonaxml.py %{buildroot}/usr/local/stork/install/arizonalib
49 install download_indicator.py %{buildroot}/usr/local/stork/install/arizonalib
50 install planetlabAPI.py %{buildroot}/usr/local/stork/install/arizonalib
51 install planetlabCall.py %{buildroot}/usr/local/stork/install/arizonalib
52 install securerandom.py %{buildroot}/usr/local/stork/install/arizonalib
53 install setup.py %{buildroot}/usr/local/stork/install/arizonalib
54 install __init__.py %{buildroot}/usr/local/stork/install/arizonalib/transfer
55 install transfer/arizonatransfer_coblitz.py %{buildroot}/usr/local/stork/install/arizonalib/transfer
56 install transfer/arizonatransfer_coral.py %{buildroot}/usr/local/stork/install/arizonalib/transfer
57 install transfer/arizonatransfer_ftp.py %{buildroot}/usr/local/stork/install/arizonalib/transfer
58 install transfer/arizonatransfer_http.py %{buildroot}/usr/local/stork/install/arizonalib/transfer
59 install transfer/arizonatransfer_https.py %{buildroot}/usr/local/stork/install/arizonalib/transfer
60 install transfer/arizonatransfer_nestproxy.py %{buildroot}/usr/local/stork/install/arizonalib/transfer
61 install transfer/arizonatransfer_bittorrent.py %{buildroot}/usr/local/stork/install/arizonalib/transfer
62 install transfer/arizonatransfer_s3.py %{buildroot}/usr/local/stork/install/arizonalib/transfer
63 install storkbtdownloadheadless.py %{buildroot}/usr/local/stork/install/arizonalib
64 install aztransfer.py %{buildroot}/usr/bin/aztransfer
65
66 # owl scripts
67 install -d -o 0 -g 0 %{buildroot}/etc/owl
68 install -d -o 0 -g 0 %{buildroot}/etc/owl/scripts.d
69 install -d -o 0 -g 0 %{buildroot}/etc/owl/conf.d
70 install arizonatransfer_owl.conf %{buildroot}/etc/owl/conf.d/arizonatransfer.conf
71 install arizonatransfer_owl %{buildroot}/etc/owl/scripts.d/arizonatransfer
72
73 %clean
74 rm -rf %{buildroot}
75
76 %post
77 cd /usr/local/stork/install/arizonalib
78 python setup.py install
79
80 # remove the compiled python from old-style arizonalib.
81 rm -f /usr/local/stork/bin/*.pyc
82 rm -f /usr/local/stork/bin/transfer/*.pyc
83
84 # remove the python files from old-style arizonalib. Normally this would
85 # be done by rpm during uninstall of the old version. However, when upgrading
86 # stork-client, rpm causes pacman to be launched, which recreates the
87 # compiled python files that we just deleted.
88 rm -f /usr/local/stork/bin/arizona*.py
89 rm -f /usr/local/stork/bin/transfer/arizona*.py
90
91 %preun
92
93 # this doesn't work --> %files -f ARIZONALIB_INSTALLED_FILES
94
95 %files
96 %defattr(-,root,root)
97
98 /usr/local/stork/install/arizonalib/arizonacomm.py
99 /usr/local/stork/install/arizonalib/arizonaconfig.py
100 /usr/local/stork/install/arizonalib/arizonacrypt.py
101 /usr/local/stork/install/arizonalib/arizonacurl.py
102 /usr/local/stork/install/arizonalib/arizonaerror.py
103 /usr/local/stork/install/arizonalib/arizonageneral.py
104 /usr/local/stork/install/arizonalib/arizonareport.py
105 /usr/local/stork/install/arizonalib/arizonatemplate.py
106 /usr/local/stork/install/arizonalib/arizonatransfer.py
107 /usr/local/stork/install/arizonalib/arizonaunittest.py
108 /usr/local/stork/install/arizonalib/arizonawarning.py
109 /usr/local/stork/install/arizonalib/arizonaxml.py
110 /usr/local/stork/install/arizonalib/download_indicator.py
111 /usr/local/stork/install/arizonalib/planetlabAPI.py
112 /usr/local/stork/install/arizonalib/planetlabCall.py
113 /usr/local/stork/install/arizonalib/securerandom.py
114 /usr/local/stork/install/arizonalib/setup.py
115 /usr/local/stork/install/arizonalib/transfer/__init__.py
116 /usr/local/stork/install/arizonalib/transfer/arizonatransfer_coral.py
117 /usr/local/stork/install/arizonalib/transfer/arizonatransfer_ftp.py
118 /usr/local/stork/install/arizonalib/transfer/arizonatransfer_http.py
119 /usr/local/stork/install/arizonalib/transfer/arizonatransfer_https.py
120 /usr/local/stork/install/arizonalib/transfer/arizonatransfer_nestproxy.py
121 /usr/local/stork/install/arizonalib/transfer/arizonatransfer_bittorrent.py
122 /usr/local/stork/install/arizonalib/transfer/arizonatransfer_coblitz.py
123 /usr/local/stork/install/arizonalib/transfer/arizonatransfer_s3.py
124 /usr/local/stork/install/arizonalib/storkbtdownloadheadless.py
125 /etc/owl/scripts.d/arizonatransfer
126 /etc/owl/conf.d/arizonatransfer.conf
127 /usr/bin/aztransfer
128
129