]> review.fuel-infra Code Review - openstack-build/horizon-build.git/commitdiff
Import Debian packaging
authorJulien Danjou <julien@danjou.info>
Fri, 25 Nov 2011 14:52:57 +0000 (15:52 +0100)
committerJulien Danjou <julien@danjou.info>
Fri, 25 Nov 2011 16:21:48 +0000 (17:21 +0100)
Signed-off-by: Julien Danjou <julien@danjou.info>
Rewritten-From: 63c37af215fe1ff5ca477394d0a1fb9a507bbb0c

13 files changed:
xenial/debian/changelog [new file with mode: 0644]
xenial/debian/compat [new file with mode: 0644]
xenial/debian/control [new file with mode: 0644]
xenial/debian/copyright [new file with mode: 0644]
xenial/debian/docs [new file with mode: 0644]
xenial/debian/openstack-dashboard.install [new file with mode: 0644]
xenial/debian/patches/3e8413be302d8c75da8996a6e3b73d619b2e7b34 [new file with mode: 0644]
xenial/debian/patches/fix_django.wsgi_sys.path [new file with mode: 0644]
xenial/debian/patches/series [new file with mode: 0644]
xenial/debian/python-django-horizon.install [new file with mode: 0644]
xenial/debian/rules [new file with mode: 0755]
xenial/debian/source/format [new file with mode: 0644]
xenial/debian/watch [new file with mode: 0644]

diff --git a/xenial/debian/changelog b/xenial/debian/changelog
new file mode 100644 (file)
index 0000000..aef4a4a
--- /dev/null
@@ -0,0 +1,5 @@
+horizon (2012.1~e1-1) unstable; urgency=low
+
+  * Initial release (Closes: #649897, #649994)
+
+ -- Julien Danjou <acid@debian.org>  Fri, 25 Nov 2011 11:30:34 +0100
diff --git a/xenial/debian/compat b/xenial/debian/compat
new file mode 100644 (file)
index 0000000..45a4fb7
--- /dev/null
@@ -0,0 +1 @@
+8
diff --git a/xenial/debian/control b/xenial/debian/control
new file mode 100644 (file)
index 0000000..20fd216
--- /dev/null
@@ -0,0 +1,27 @@
+Source: horizon
+Section: python
+Priority: extra
+Maintainer: PKG OpenStack <openstack-devel@lists.alioth.debian.org>
+Uploaders: Julien Danjou <acid@debian.org>,
+           Thomas Goirand <zigo@debian.org>,
+           Ghe Rivero <ghe@debian.org>
+Build-Depends: debhelper (>= 8.0.0), python (>= 2.6)
+X-Python-Version: >= 2.6
+Standards-Version: 3.9.2
+Homepage: http://launchpad.net/horizon
+Vcs-Browser: http://anonscm.debian.org/gitweb/?p=openstack/horizon.git;a=summary
+Vcs-Git: git://anonscm.debian.org/openstack/horizon.git
+
+Package: python-django-horizon
+Architecture: all
+Depends: ${shlibs:Depends}, ${misc:Depends}, ${python:Depends}
+Description: Django module to provide web interaction with OpenStack
+ Horizon is a Django module that permits interaction with an OpenStack
+ cloud. It can be used to build a dashboard to control an OpenStack cloud.
+
+Package: openstack-dashboard
+Architecture: all
+Depends: ${shlibs:Depends}, ${misc:Depends}, ${python:Depends}, python-django-horizon, python-django
+Description: OpenStack Dashboard
+ The OpenStack Dashboard is a Web application allowing to control an
+ OpenStack cloud.
\ No newline at end of file
diff --git a/xenial/debian/copyright b/xenial/debian/copyright
new file mode 100644 (file)
index 0000000..587be25
--- /dev/null
@@ -0,0 +1,30 @@
+Format: http://dep.debian.net/deps/dep5
+Upstream-Name: horizon
+Source: <https://code.launchpad.net/swift>
+
+Files: *
+Copyright: 2011 OpenStack LLC
+           2011 Nebula, Inc
+           2011 United States Government as represented by the Administrator
+                of the National Aeronautics and Space Administration
+License: Apache-2.0
+
+Files: debian/*
+Copyright: 2011 Julien Danjou <acid@debian.org>
+License: Apache-2.0
+
+License: Apache-2.0
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+ .
+ http://www.apache.org/licenses/LICENSE-2.0
+ .
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ .
+ On Debian systems, the complete text of the Apache version 2.0 license
+ can be found in "/usr/share/common-licenses/Apache-2.0".
diff --git a/xenial/debian/docs b/xenial/debian/docs
new file mode 100644 (file)
index 0000000..e845566
--- /dev/null
@@ -0,0 +1 @@
+README
diff --git a/xenial/debian/openstack-dashboard.install b/xenial/debian/openstack-dashboard.install
new file mode 100644 (file)
index 0000000..2824557
--- /dev/null
@@ -0,0 +1 @@
+usr/share/openstack-dashboard
\ No newline at end of file
diff --git a/xenial/debian/patches/3e8413be302d8c75da8996a6e3b73d619b2e7b34 b/xenial/debian/patches/3e8413be302d8c75da8996a6e3b73d619b2e7b34
new file mode 100644 (file)
index 0000000..00982e7
--- /dev/null
@@ -0,0 +1,93 @@
+Description: Remove crappy upstream Debian packaging stuff
+ This is cherry-picked from 3e8413be302d8c75da8996a6e3b73d619b2e7b34
+Author: Julien Danjou <acid@debian.org>
+
+---
+Origin: upstream
+Forwarded: not-needed
+Last-Update: 2011-11-25
+
+--- horizon-2012.1~e1.orig/horizon/Makefile
++++ horizon-2012.1~e1/horizon/Makefile
+@@ -1,6 +1,5 @@
+ PYTHON=`which python`
+ DESTDIR=/
+-BUILDIR=$(CURDIR)/debian/horizon
+ PROJECT=horizon
+ all:
+@@ -9,7 +8,6 @@ all:
+       @echo "make source - Create source package"
+       @echo "make install - Install on local system"
+       @echo "make buildrpm - Generate a rpm package"
+-      @echo "make builddeb - Generate a deb package"
+       @echo "make clean - Get rid of scratch and byte files"
+ buildout: ./bin/buildout
+@@ -27,17 +25,7 @@ install:
+ buildrpm:
+       $(PYTHON) setup.py bdist_rpm --post-install=rpm/postinstall --pre-uninstall=rpm/preuninstall
+-builddeb:
+-      # build the source package in the parent directory
+-      # then rename it to project_version.orig.tar.gz
+-      $(PYTHON) setup.py sdist $(COMPILE) --dist-dir=../
+-      rename -f 's/$(PROJECT)-(.*)\.tar\.gz/$(PROJECT)_$$1\.orig\.tar\.gz/' ../*
+-      # build the package
+-      #dpkg-buildpackage -i -I -rfakeroot
+-      dpkg-buildpackage -b -rfakeroot -tc -uc -D
+-
+ clean:
+       $(PYTHON) setup.py clean
+-      $(MAKE) -f $(CURDIR)/debian/rules clean
+       rm -rf build/ MANIFEST
+       find . -name '*.pyc' -delete
+--- horizon-2012.1~e1.orig/openstack-dashboard/Makefile
++++ horizon-2012.1~e1/openstack-dashboard/Makefile
+@@ -1,6 +1,5 @@
+ PYTHON=`which python`
+ DESTDIR=/
+-BUILDIR=$(CURDIR)/debian/openstack-dashboard
+ PROJECT=openstack-dashboard
+ all:
+@@ -9,7 +8,6 @@ all:
+       @echo "make source - Create source package"
+       @echo "make install - Install on local system"
+       @echo "make buildrpm - Generate a rpm package"
+-      @echo "make builddeb - Generate a deb package"
+       @echo "make clean - Get rid of scratch and byte files"
+ buildout: ./bin/buildout
+@@ -27,15 +25,6 @@ install:
+ buildrpm:
+       $(PYTHON) setup.py bdist_rpm --post-install=rpm/postinstall --pre-uninstall=rpm/preuninstall
+-builddeb:
+-      # build the source package in the parent directory
+-      # then rename it to project_version.orig.tar.gz
+-      $(PYTHON) setup.py sdist $(COMPILE) --dist-dir=../
+-      rename -f 's/$(PROJECT)-(.*)\.tar\.gz/$(PROJECT)_$$1\.orig\.tar\.gz/' ../*
+-      # build the package
+-      #dpkg-buildpackage -i -I -rfakeroot
+-      dpkg-buildpackage -b -rfakeroot -tc -uc -D
+-
+ clean:
+       $(PYTHON) setup.py clean
+       $(MAKE) -f $(CURDIR)/debian/rules clean
+--- horizon-2012.1~e1.orig/openstack-dashboard/setup.py
++++ horizon-2012.1~e1/openstack-dashboard/setup.py
+@@ -26,13 +26,6 @@ def read(fname):
+     return open(os.path.join(os.path.dirname(__file__), fname)).read()
+-dst = 'debian/openstack-dashboard/var/lib/dash'
+-os.system('rm -rf %s' % dst)
+-shutil.copytree('tools', '%s/tools' % dst)
+-shutil.copytree('dashboard', '%s/dashboard' % dst)
+-shutil.copytree('local', '%s/local' % dst)
+-
+-
+ setuptools.setup(
+     name = 'openstack-dashboard',
+     version = '0.4',
diff --git a/xenial/debian/patches/fix_django.wsgi_sys.path b/xenial/debian/patches/fix_django.wsgi_sys.path
new file mode 100644 (file)
index 0000000..1b60116
--- /dev/null
@@ -0,0 +1,19 @@
+Description: Fix django.wsgi
+Author: Julien Danjou <acid@debian.org>
+
+---
+Origin: other
+
+--- horizon-2012.1~e1.orig/openstack-dashboard/dashboard/wsgi/django.wsgi
++++ horizon-2012.1~e1/openstack-dashboard/dashboard/wsgi/django.wsgi
+@@ -4,7 +4,10 @@ import sys
+ import django.core.handlers.wsgi
+ from django.conf import settings
++# Add this file path to sys.path in order to import settings
++sys.path.insert (0, os.path.join (os.path.dirname (os.path.realpath (__file__)), '../..')) 
+ os.environ['DJANGO_SETTINGS_MODULE'] = 'dashboard.settings'
++
+ sys.stdout = sys.stderr
+ DEBUG = False
diff --git a/xenial/debian/patches/series b/xenial/debian/patches/series
new file mode 100644 (file)
index 0000000..632fc78
--- /dev/null
@@ -0,0 +1,2 @@
+3e8413be302d8c75da8996a6e3b73d619b2e7b34
+fix_django.wsgi_sys.path
diff --git a/xenial/debian/python-django-horizon.install b/xenial/debian/python-django-horizon.install
new file mode 100644 (file)
index 0000000..7077017
--- /dev/null
@@ -0,0 +1 @@
+usr/lib/python*/dist-packages/horizon
\ No newline at end of file
diff --git a/xenial/debian/rules b/xenial/debian/rules
new file mode 100755 (executable)
index 0000000..a6937e5
--- /dev/null
@@ -0,0 +1,33 @@
+#!/usr/bin/make -f
+%:
+       dh $@ --with python2
+
+SOURCE_DIRS=horizon openstack-dashboard
+
+override_dh_auto_build:
+       dh_auto_build
+       for d in $(SOURCE_DIRS); \
+       do \
+               cd $(CURDIR)/$$d && python setup.py build; \
+       done
+
+override_dh_auto_install:
+       dh_auto_install
+       for d in $(SOURCE_DIRS); \
+       do \
+               cd $(CURDIR)/$$d && python setup.py install --install-layout=deb --root=$(CURDIR)/debian/tmp; \
+       done
+       # Actually the setup.py from openstack-dashboard does not install anything…
+       install -d -m 755  $(CURDIR)/debian/tmp/usr/share/openstack-dashboard
+       cp -a $(CURDIR)/openstack-dashboard/dashboard $(CURDIR)/debian/tmp/usr/share/openstack-dashboard/
+
+override_dh_auto_clean:
+       dh_auto_clean
+       for d in $(SOURCE_DIRS); \
+       do \
+               cd $(CURDIR)/$$d && python setup.py clean; \
+       done
+       rm -rf $(CURDIR)/horizon/build
+       rm -rf $(CURDIR)/horizon/horizon/*.pyc
+       rm -rf $(CURDIR)/horizon/horizon.egg-info
+       rm -rf $(CURDIR)/openstack-dashboard/openstack_dashboard.egg-info
diff --git a/xenial/debian/source/format b/xenial/debian/source/format
new file mode 100644 (file)
index 0000000..163aaf8
--- /dev/null
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/xenial/debian/watch b/xenial/debian/watch
new file mode 100644 (file)
index 0000000..4d283c5
--- /dev/null
@@ -0,0 +1,3 @@
+version=3
+http://launchpad.net/horizon/+download http://launchpad.net/horizon/.*/horizon-(.*)\.tar\.gz
+http://horizon.openstack.org/tarballs/ horizon-(.*).tar.gz