Add a new default build target

Also override dh_auto_clean to avoid removing the awx/ui/dist during DEB
package builds.

Update the `.spec` file to call the same Makefile targets used by in `debian/rules`.
This commit is contained in:
James Laska
2015-08-26 16:15:07 -04:00
parent 6512c76564
commit 265802322d

View File

@@ -90,6 +90,15 @@ OFFLINE_TAR_NAME=$(NAME)-offline-$(DIST_FULL)-$(VERSION)-$(RELEASE)
OFFLINE_TAR_FILE=$(OFFLINE_TAR_NAME).tar.gz
OFFLINE_TAR_LINK=$(NAME)-setup-latest.tar.gz
DISTRO := $(shell source /etc/os-release 2>/dev/null && echo $${ID} || echo redhat)
ifeq ($(DISTRO),ubuntu)
SETUP_INSTALL_ARGS = --skip-build --no-compile --root=$(DESTDIR) -v --install-layout=deb
else
SETUP_INSTALL_ARGS = --skip-build --no-compile --root=$(DESTDIR) -v
endif
.DEFAULT_GOAL := build
.PHONY: clean rebase push requirements requirements_dev requirements_jenkins \
real-requirements real-requirements_dev real-requirements_jenkins \
develop refresh adduser syncdb migrate dbchange dbshell runserver celeryd \
@@ -153,10 +162,6 @@ push:
# Install runtime, development and jenkins requirements
requirements requirements_dev requirements_jenkins: %: real-%
# Create missing __init__.py files
awx/lib/site-packages/%/__init__.py:
touch $@
# Install third-party requirements needed for development environment.
# NOTE:
# * --target is only supported on newer versions of pip
@@ -502,5 +507,11 @@ virtualbox-centos-7: packaging/packer/output-virtualbox-iso/centos-7.ovf
docker-dev:
docker build --no-cache=true --rm=true -t ansible/tower_devel:latest tools/docker
# TODO - figure out how to build the front-end and python requirements with
# 'build'
build:
$(PYTHON) setup.py build
# TODO - only use --install-layout=deb on Debian
install:
$(PYTHON) setup.py install egg_info -b ""
$(PYTHON) setup.py install $(SETUP_INSTALL_ARGS)