From 92eeeab15859af0a55b4b42fc99e0930dbabfc5e Mon Sep 17 00:00:00 2001 From: Anthony Young Date: Wed, 22 Jun 2011 17:24:36 -0700 Subject: [PATCH] stub out build files --- openstack-dashboard/Makefile | 43 ++++++++++++++++++++++++++++ openstack-dashboard/debian/changelog | 5 ++++ openstack-dashboard/debian/compat | 1 + openstack-dashboard/debian/control | 17 +++++++++++ openstack-dashboard/debian/copyright | 0 openstack-dashboard/debian/rules | 12 ++++++++ openstack-dashboard/setup.py | 31 ++++++++++++++++++++ 7 files changed, 109 insertions(+) create mode 100644 openstack-dashboard/Makefile create mode 100644 openstack-dashboard/debian/changelog create mode 100644 openstack-dashboard/debian/compat create mode 100644 openstack-dashboard/debian/control create mode 100644 openstack-dashboard/debian/copyright create mode 100755 openstack-dashboard/debian/rules create mode 100755 openstack-dashboard/setup.py diff --git a/openstack-dashboard/Makefile b/openstack-dashboard/Makefile new file mode 100644 index 000000000..4b00d036d --- /dev/null +++ b/openstack-dashboard/Makefile @@ -0,0 +1,43 @@ +PYTHON=`which python` +DESTDIR=/ +BUILDIR=$(CURDIR)/debian/openstack-dashboard +PROJECT=openstack-dashboard + +all: + @echo "make buildout - Run through buildout" + @echo "make test - Run tests" + @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 + ./bin/buildout + +./bin/buildout: + $(PYTHON) bootstrap.py + +source: + $(PYTHON) setup.py sdist $(COMPILE) + +install: + $(PYTHON) setup.py install --root $(DESTDIR) $(COMPILE) + +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 diff --git a/openstack-dashboard/debian/changelog b/openstack-dashboard/debian/changelog new file mode 100644 index 000000000..e485e7b0d --- /dev/null +++ b/openstack-dashboard/debian/changelog @@ -0,0 +1,5 @@ +openstack-dashboard (0.2.0) UNRELEASED; urgency=low + + * Initial release. (Closes: #XXXXXX) + + -- anthony Mon, 20 Jun 2011 20:29:57 +0000 diff --git a/openstack-dashboard/debian/compat b/openstack-dashboard/debian/compat new file mode 100644 index 000000000..7f8f011eb --- /dev/null +++ b/openstack-dashboard/debian/compat @@ -0,0 +1 @@ +7 diff --git a/openstack-dashboard/debian/control b/openstack-dashboard/debian/control new file mode 100644 index 000000000..63045bbf8 --- /dev/null +++ b/openstack-dashboard/debian/control @@ -0,0 +1,17 @@ +Source: openstack-dashboard +Section: python +Priority: optional +Maintainer: Anthony Young (sleepsonthefloor) +Build-Depends: debhelper (>=7.0.50~), python-support (>= 0.6), cdbs (>= 0.4.49), python-all-dev +XS-Python-Version: >=2.5 +Standards-Version: 3.9.1 + +Package: openstack-dashboard +Architecture: all +Homepage: https://github.com/4P/openstack-dashboard +XB-Python-Version: ${python:Versions} +Depends: ${misc:Depends}, ${python:Depends} +Description: Dashboard for Openstack + Here you should put a long description your package. This line *MUST* (this is + for default printing) begin with a single space. + Look for more information about this. diff --git a/openstack-dashboard/debian/copyright b/openstack-dashboard/debian/copyright new file mode 100644 index 000000000..e69de29bb diff --git a/openstack-dashboard/debian/rules b/openstack-dashboard/debian/rules new file mode 100755 index 000000000..f9ad92e1c --- /dev/null +++ b/openstack-dashboard/debian/rules @@ -0,0 +1,12 @@ +#!/usr/bin/make -f +# -*- makefile -*- + +DEB_PYTHON_SYSTEM := pysupport + +include /usr/share/cdbs/1/rules/debhelper.mk +include /usr/share/cdbs/1/class/python-distutils.mk + +clean:: + rm -rf build build-stamp configure-stamp build/ MANIFEST + dh_clean + diff --git a/openstack-dashboard/setup.py b/openstack-dashboard/setup.py new file mode 100755 index 000000000..bd87cd79f --- /dev/null +++ b/openstack-dashboard/setup.py @@ -0,0 +1,31 @@ +import os +from setuptools import setup, find_packages, findall + +def read(fname): + return open(os.path.join(os.path.dirname(__file__), fname)).read() + +setup( + name = "openstack-dashboard", + version = "0.2", + url = 'https://github.com/cloudbuilders/openstack-dashboard.git', + license = 'Apache 2.0', + description = "A Django interface for OpenStack.", + long_description = read('README'), + author = 'Devin Carlen', + author_email = 'devin.carlen@gmail.com', + packages = find_packages(), + package_data = {'django_openstack': + [s[len('django_openstack/'):] for s in + findall('django_openstack/templates')]}, + install_requires = ['setuptools', 'mox>=0.5.0'], + classifiers = [ + 'Development Status :: 4 - Beta', + 'Framework :: Django', + 'Intended Audience :: Developers', + 'License :: OSI Approved :: Apache License', + 'Operating System :: OS Independent', + 'Programming Language :: Python', + 'Topic :: Internet :: WWW/HTTP', + ] +) +