Merge branch 'master' of ssh://git.planet-lab.org/git/plstackapi
[plstackapi.git] / opencloud.spec
1 Summary: OpenCloud core services
2 Name: opencloud
3 Version: 1.0
4 Release: 1
5 License: GPL+
6 Group: Development/Tools
7 Source0: %{_tmppath}/%{name}-%{version}.tar.gz
8 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}
9 requires: postgresql
10 requires: postgresql-server
11 requires: python-psycopg2
12 requires: graphviz
13 requires: graphviz-devel
14 requires: graphviz-python
15 requires: libxslt-devel
16 requires: python-pip
17 requires: tar
18 requires: gcc
19
20 %description
21 %{summary}
22
23 %prep
24 %setup -q
25
26 %build
27 # Empty section.
28
29 %pre
30 pip-python install django==1.5
31 pip-python install djangorestframework
32 pip-python install markdown  # Markdown support for the browseable API.
33 pip-python install pyyaml    # YAML content-type support.
34 pip-python install django-filter  # Filtering support
35 pip-python install lxml  # XML manipulation library
36 pip-python install netaddr # IP Addr library
37 pip-python install pytz
38 pip-python install django-timezones
39 pip-python install requests
40 pip-python install django-crispy-forms
41 pip-python install django-geoposition
42 pip-python install django-extensions
43 pip-python install django-suit
44 pip-python install django-evolution
45
46 easy_install django_evolution
47
48 %install
49 rm -rf %{buildroot}
50 mkdir -p  %{buildroot}
51 install -d %{buildroot}/opt/planetstack
52
53 # in builddir
54 cp -rp /opt/plstackapi/planetstack %{buildroot}/opt/.
55
56 find %{buildroot}/opt/planetstack -type f -print | sed "s@^$RPM_BUILD_ROOT@@g"  > %{_tmppath}/tmp-filelist
57
58 %clean
59 rm -rf %{buildroot}
60
61 %files -f %{_tmppath}/tmp-filelist
62 %defattr(-,root,root,-)
63
64 %post
65 /opt/planetstack/scripts/opencloud initdb
66
67 %preun
68 rm -rf /opt/planetstack
69
70 %changelog
71 * Sat Feb 22 2014  Siobhan Tully  1.0.0
72 - First Build
73