download and install GeoIP city database
[plstackapi.git] / opencloud.spec
index cee6193..3420bdf 100644 (file)
@@ -1,6 +1,6 @@
 Summary: OpenCloud core services
 Name: opencloud
-Version: 1.0.6
+Version: 1.0.7
 Release: 1
 License: GPL+
 Group: Development/Tools
@@ -17,6 +17,7 @@ requires: python-pip
 requires: tar
 requires: gcc
 requires: python-httplib2
+requires: GeoIP
 
 %description
 %{summary}
@@ -44,6 +45,7 @@ pip-python install django-extensions
 pip-python install django-suit
 pip-python install django-evolution
 pip-python install django-bitfield
+pip-python install django-ipware
 
 easy_install django_evolution
 easy_install python_gflags
@@ -51,6 +53,10 @@ easy_install google_api_python_client
 
 wget -P /usr/lib/python2.7/site-packages/suit/static/suit/js http://code.jquery.com/jquery-1.9.1.min.js
 
+rm -f /usr/share/GeoIP/GeoLiteCity*
+wget -P /usr/share/GeoIP http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz
+gzip -d /usr/share/GeoIP/GeoLiteCity*.gz
+
 %install
 rm -rf %{buildroot}
 mkdir -p  %{buildroot}
@@ -72,6 +78,7 @@ rm -rf %{buildroot}
 
 %preun
 if [ "$1" = 0 ] ; then
+    echo "doing preuninstall"
     rm -rf /opt/planetstack
 fi