X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=opencloud.spec;h=3b9d35aee75669fa2b042c5897b521f77bc8d3de;hb=refs%2Fheads%2Fobserver3.0;hp=16f1b232176d9e97f89597ad57e77ba5cbdcad94;hpb=e7df4a126ce66678255a4607d0135535427d1120;p=plstackapi.git diff --git a/opencloud.spec b/opencloud.spec index 16f1b23..3b9d35a 100644 --- a/opencloud.spec +++ b/opencloud.spec @@ -1,7 +1,7 @@ Summary: OpenCloud core services Name: opencloud -Version: 1.0.10 -Release: 2 +Version: 1.0.20 +Release: 1 License: GPL+ Group: Development/Tools Source0: %{_tmppath}/%{name}-%{version}.tar.gz @@ -29,7 +29,7 @@ requires: GeoIP # Empty section. %pre -pip-python install django==1.5 +#pip-python install django==1.5 pip-python install djangorestframework pip-python install markdown # Markdown support for the browseable API. pip-python install pyyaml # YAML content-type support. @@ -59,6 +59,13 @@ if [ ! -f /usr/share/GeoIP/GeoLiteCity.dat ]; then gzip -d /usr/share/GeoIP/GeoLiteCity*.gz fi +if [ "$1" == 2 ] ; then + if [[ -e /opt/planetstack/scripts/opencloud ]]; then + echo "UPGRADE - saving current state" + /opt/planetstack/scripts/opencloud dumpdata + fi +fi + %install rm -rf %{buildroot} mkdir -p %{buildroot} @@ -67,19 +74,16 @@ install -d %{buildroot}/opt/planetstack # in builddir cp -rp ./planetstack %{buildroot}/opt/. -find %{buildroot}/opt/planetstack -type f -print | sed "s@^$RPM_BUILD_ROOT@@g" > %{_tmppath}/tmp-filelist +find %{buildroot}/opt/planetstack -type f -print | sed "s@^$RPM_BUILD_ROOT@@g" > %{_tmppath}/tmp-filelist +cp %{_tmppath}/tmp-filelist /tmp/tmp-filelist %clean rm -rf %{buildroot} %files -f %{_tmppath}/tmp-filelist %defattr(-,root,root,-) - -%pre -if [ "$1" == 2 ] ; then - echo "UPGRADE - saving current state" - /opt/planetstack/scripts/opencloud dumpdata -fi +%config /opt/planetstack/plstackapi_config +%config /opt/planetstack/deployment_auth.py %post if [ "$1" == 1 ] ; then