Add a Makefile, so we can comfortably generate debian packages out of autotest.
Signed-off-by: Lucas Meneghel Rodrigues <[email protected]> --- Makefile | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..2603c51 --- /dev/null +++ b/Makefile @@ -0,0 +1,31 @@ +PYTHON=`which python` +DESTDIR=/ +BUILDIR=$(CURDIR)/debian/autotest +PROJECT=autotest +VERSION=`$(CURDIR)/client/shared/version.py` + +all: + @echo "make source - Create source package" + @echo "make install - Install on local system" + @echo "make builddeb - Generate a deb package" + @echo "make clean - Get rid of scratch and byte files" + +source: + $(PYTHON) setup.py sdist $(COMPILE) + +install: + $(PYTHON) setup.py install --root $(DESTDIR) $(COMPILE) + +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=../ --prune + rename -f 's/$(PROJECT)-(.*)\.tar\.gz/$(PROJECT)_$$1\.orig\.tar\.gz/' ../* + # build the package + dpkg-buildpackage -i -I -rfakeroot + +clean: + $(PYTHON) setup.py clean + $(MAKE) -f $(CURDIR)/debian/rules clean + rm -rf build/ MANIFEST + find . -name '*.pyc' -delete -- 1.8.0 _______________________________________________ Autotest-kernel mailing list [email protected] https://www.redhat.com/mailman/listinfo/autotest-kernel
