From: Julien Danjou Date: Fri, 25 Nov 2011 14:52:57 +0000 (+0100) Subject: Import Debian packaging X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=0a1e717e7088c75b2a5e7aead50da7af76971fb7;p=openstack-build%2Fhorizon-build.git Import Debian packaging Signed-off-by: Julien Danjou Rewritten-From: 63c37af215fe1ff5ca477394d0a1fb9a507bbb0c --- 0a1e717e7088c75b2a5e7aead50da7af76971fb7 diff --git a/trusty/debian/changelog b/trusty/debian/changelog new file mode 100644 index 0000000..aef4a4a --- /dev/null +++ b/trusty/debian/changelog @@ -0,0 +1,5 @@ +horizon (2012.1~e1-1) unstable; urgency=low + + * Initial release (Closes: #649897, #649994) + + -- Julien Danjou Fri, 25 Nov 2011 11:30:34 +0100 diff --git a/trusty/debian/compat b/trusty/debian/compat new file mode 100644 index 0000000..45a4fb7 --- /dev/null +++ b/trusty/debian/compat @@ -0,0 +1 @@ +8 diff --git a/trusty/debian/control b/trusty/debian/control new file mode 100644 index 0000000..20fd216 --- /dev/null +++ b/trusty/debian/control @@ -0,0 +1,27 @@ +Source: horizon +Section: python +Priority: extra +Maintainer: PKG OpenStack +Uploaders: Julien Danjou , + Thomas Goirand , + Ghe Rivero +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/trusty/debian/copyright b/trusty/debian/copyright new file mode 100644 index 0000000..587be25 --- /dev/null +++ b/trusty/debian/copyright @@ -0,0 +1,30 @@ +Format: http://dep.debian.net/deps/dep5 +Upstream-Name: horizon +Source: + +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 +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/trusty/debian/docs b/trusty/debian/docs new file mode 100644 index 0000000..e845566 --- /dev/null +++ b/trusty/debian/docs @@ -0,0 +1 @@ +README diff --git a/trusty/debian/openstack-dashboard.install b/trusty/debian/openstack-dashboard.install new file mode 100644 index 0000000..2824557 --- /dev/null +++ b/trusty/debian/openstack-dashboard.install @@ -0,0 +1 @@ +usr/share/openstack-dashboard \ No newline at end of file diff --git a/trusty/debian/patches/3e8413be302d8c75da8996a6e3b73d619b2e7b34 b/trusty/debian/patches/3e8413be302d8c75da8996a6e3b73d619b2e7b34 new file mode 100644 index 0000000..00982e7 --- /dev/null +++ b/trusty/debian/patches/3e8413be302d8c75da8996a6e3b73d619b2e7b34 @@ -0,0 +1,93 @@ +Description: Remove crappy upstream Debian packaging stuff + This is cherry-picked from 3e8413be302d8c75da8996a6e3b73d619b2e7b34 +Author: Julien Danjou + +--- +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/trusty/debian/patches/fix_django.wsgi_sys.path b/trusty/debian/patches/fix_django.wsgi_sys.path new file mode 100644 index 0000000..1b60116 --- /dev/null +++ b/trusty/debian/patches/fix_django.wsgi_sys.path @@ -0,0 +1,19 @@ +Description: Fix django.wsgi +Author: Julien Danjou + +--- +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/trusty/debian/patches/series b/trusty/debian/patches/series new file mode 100644 index 0000000..632fc78 --- /dev/null +++ b/trusty/debian/patches/series @@ -0,0 +1,2 @@ +3e8413be302d8c75da8996a6e3b73d619b2e7b34 +fix_django.wsgi_sys.path diff --git a/trusty/debian/python-django-horizon.install b/trusty/debian/python-django-horizon.install new file mode 100644 index 0000000..7077017 --- /dev/null +++ b/trusty/debian/python-django-horizon.install @@ -0,0 +1 @@ +usr/lib/python*/dist-packages/horizon \ No newline at end of file diff --git a/trusty/debian/rules b/trusty/debian/rules new file mode 100755 index 0000000..a6937e5 --- /dev/null +++ b/trusty/debian/rules @@ -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/trusty/debian/source/format b/trusty/debian/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/trusty/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/trusty/debian/watch b/trusty/debian/watch new file mode 100644 index 0000000..4d283c5 --- /dev/null +++ b/trusty/debian/watch @@ -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