diff options
author | James Cammarata <jimi@sngx.net> | 2013-06-24 19:03:33 +0200 |
---|---|---|
committer | James Cammarata <jimi@sngx.net> | 2013-06-24 19:06:11 +0200 |
commit | cbc9f183662e72c7c79420214cef95baa5364145 (patch) | |
tree | 00a69a8f1a2268bf3fe4745b14eea1418bfdeef1 /Makefile | |
parent | UI clean-up (diff) | |
download | awx-cbc9f183662e72c7c79420214cef95baa5364145.tar.xz awx-cbc9f183662e72c7c79420214cef95baa5364145.zip |
More debian packaging stuff
* Added ability to do official vs dev builds (need to add to the
RPM builds now)
* Reverted changes to awx/wsgi.py after talking with Chris C.
regarding the pathing issues and created config/wsgi.py instead
that is installed to /var/lib/awx
* Cleaned up package scripts so there's less junk being written to
the screen during the install/uninstall
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 37 |
1 files changed, 29 insertions, 8 deletions
@@ -1,7 +1,23 @@ PYTHON=python SITELIB=$(shell $(PYTHON) -c "from distutils.sysconfig import get_python_lib; print get_python_lib()") -RELEASE=awx-1.2b2 + +# Get the branch information from git +GIT_DATE := $(shell git log -n 1 --format="%ai") +DATE := $(shell date --utc +%Y%m%d%H%M) + VERSION=$(shell $(PYTHON) -c "from awx import __version__; print(__version__.split('-')[0])") +RELEASE=$(shell $(PYTHON) -c "from awx import __version__; print(__version__.split('-')[1])") +ifneq ($(OFFICIAL),yes) +BUILD=-dev$(DATE) +SDIST_TAR_FILE=awx-$(VERSION)$(BUILD).tar.gz +DEB_BUILD_DIR=deb-build/awx-$(VERSION)$(BUILD) +DEB_PKG_RELEASE=$(VERSION)$(BUILD) +else +BUILD= +SDIST_TAR_FILE=awx-$(VERSION).tar.gz +DEB_BUILD_DIR=deb-build/awx-$(VERSION) +DEB_PKG_RELEASE=$(VERSION)-$(RELEASE) +endif .PHONY: clean rebase push setup requirements requirements_pypi develop refresh \ adduser syncdb migrate dbchange dbshell runserver celeryd test \ @@ -112,7 +128,11 @@ release_clean: -(rm -rf ($RELEASE)) sdist: clean - $(PYTHON) setup.py release_build + if [ "$(OFFICIAL)" = "yes" ] ; then \ + $(PYTHON) setup.py release_build; \ + else \ + BUILD=$(BUILD) $(PYTHON) setup.py sdist; \ + fi rpm: sdist @mkdir -p rpm-build @@ -128,12 +148,13 @@ rpm: sdist deb: sdist @mkdir -p deb-build - @cp dist/*.gz deb-build/ - (cd deb-build && tar zxf awx-$(VERSION).tar.gz) - (cd deb-build/awx-$(VERSION) && dh_make --single --yes -f ../awx-$(VERSION).tar.gz) - @rm -rf deb-build/awx-$(VERSION)/debian - @cp -a packaging/debian deb-build/awx-$(VERSION)/ - (cd deb-build/awx-$(VERSION) && dpkg-buildpackage -nc -us -uc -b) + @cp dist/$(SDIST_TAR_FILE) deb-build/ + (cd deb-build && tar zxf $(SDIST_TAR_FILE)) + (cd $(DEB_BUILD_DIR) && dh_make --indep --yes -f ../awx-$(VERSION)$(BUILD).tar.gz -p awx-$(VERSION)$(BUILD)) + @rm -rf $(DEB_BUILD_DIR)/debian + @cp -a packaging/debian $(DEB_BUILD_DIR)/ + @echo "awx_$(DEB_PKG_RELEASE).deb admin optional" > $(DEB_BUILD_DIR)/debian/realfiles + (cd $(DEB_BUILD_DIR) && PKG_RELEASE=$(DEB_PKG_RELEASE) dpkg-buildpackage -nc -us -uc -b --changes-option="-fdebian/realfiles") install: $(PYTHON) setup.py install egg_info -b "" |