diff --git a/Makefile b/Makefile index 4200629c9623d8460c6dc1c5385bffbe14ed83dd..bf68c189503036b8af7c6bf83aa3794d9b298f1f 100644 --- a/Makefile +++ b/Makefile @@ -14,13 +14,10 @@ PYTHON=$(shell which python) PYTHON26=$(shell $(PYTHON) -V 2>&1 | grep 2.6 -q && echo true || echo false) VERSION=$(shell $(PYTHON) setup.py --version 2>/dev/null) DESTDIR=/ -BUILDIR=$(CURDIR)/debian/avocado -PROJECT=avocado AVOCADO_DIRNAME=$(shell echo $${PWD\#\#*/}) AVOCADO_PLUGINS=$(filter-out ../$(AVOCADO_DIRNAME), $(wildcard ../*)) RELEASE_COMMIT=$(shell git log --pretty=format:'%H' -n 1 $(VERSION)) RELEASE_SHORT_COMMIT=$(shell git log --pretty=format:'%h' -n 1 $(VERSION)) - COMMIT=$(shell git log --pretty=format:'%H' -n 1) SHORT_COMMIT=$(shell git log --pretty=format:'%h' -n 1) @@ -49,11 +46,6 @@ all: @echo "srpm: Generate a source RPM package (.srpm)" @echo "rpm: Generate binary RPMs" @echo - @echo "Debian related targets:" - @echo "deb: Generate both source and binary debian packages" - @echo "deb-src: Generate a source debian package" - @echo "deb-bin: Generate a binary debian package" - @echo @echo "Release related targets:" @echo "source-release: Create source package for the latest tagged release" @echo "srpm-release: Generate a source RPM package (.srpm) for the latest tagged release" @@ -83,25 +75,6 @@ pypi: source-pypi develop install: $(PYTHON) setup.py install --root $(DESTDIR) $(COMPILE) -deb-prepare-source: - # build the source package in the parent directory - # then rename it to project_version.orig.tar.gz - dch -D "vivid" -M -v "$(VERSION)" "Automated (make builddeb) build." - $(PYTHON) setup.py sdist $(COMPILE) --dist-dir=../ - rename -f 's/$(PROJECT)-(.*)\.tar\.gz/$(PROJECT)_$$1\.orig\.tar\.gz/' ../* - -deb-src: deb-prepare-source - # build the source package - dpkg-buildpackage -S -elookkas@gmail.com -rfakeroot - -deb-bin: deb-prepare-source - # build binary package - dpkg-buildpackage -b -rfakeroot - -deb: deb-prepare-source - # build both source and binary packages - dpkg-buildpackage -i -I -rfakeroot - srpm: source if test ! -d BUILD/SRPM; then mkdir -p BUILD/SRPM; fi mock --resultdir BUILD/SRPM -D "commit $(COMMIT)" --buildsrpm --spec avocado.spec --sources SOURCES diff --git a/contrib/packages/debian/Makefile b/contrib/packages/debian/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..0fe9163863a17d2d84ccb9042b51b9600360b1e4 --- /dev/null +++ b/contrib/packages/debian/Makefile @@ -0,0 +1,29 @@ +BUILDIR=$(CURDIR)/debian/avocado +PROJECT=avocado + +all: + @echo + @echo "Debian related targets:" + @echo "deb: Generate both source and binary debian packages" + @echo "deb-src: Generate a source debian package" + @echo "deb-bin: Generate a binary debian package" + @echo + +deb-prepare-source: + # build the source package in the parent directory + # then rename it to project_version.orig.tar.gz + dch -D "vivid" -M -v "$(VERSION)" "Automated (make builddeb) build." + $(PYTHON) setup.py sdist $(COMPILE) --dist-dir=../ + rename -f 's/$(PROJECT)-(.*)\.tar\.gz/$(PROJECT)_$$1\.orig\.tar\.gz/' ../* + +deb-src: deb-prepare-source + # build the source package + dpkg-buildpackage -S -elookkas@gmail.com -rfakeroot + +deb-bin: deb-prepare-source + # build binary package + dpkg-buildpackage -b -rfakeroot + +deb: deb-prepare-source + # build both source and binary packages + dpkg-buildpackage -i -I -rfakeroot diff --git a/contrib/packages/debian/README b/contrib/packages/debian/README new file mode 100644 index 0000000000000000000000000000000000000000..eacb32b66897a1f55c12e976716796d9bd2bcb06 --- /dev/null +++ b/contrib/packages/debian/README @@ -0,0 +1,10 @@ +This is a collection of files that are useful to generate packages for +Debian(-like) systems. Their "contrib" status mean that they should +work, but there's no support for them. + +If there are users out there interested in keeping Debian(-like) +packages update, please step up. + +The basic usage is to run the various targets defined in the Makefile, +such as running `make deb` to have both source and binary packages +generated.