From a504e52da92616937d709c8c34a2fd8636efc60a Mon Sep 17 00:00:00 2001 From: Cleber Rosa Date: Wed, 31 Aug 2016 07:33:19 -0300 Subject: [PATCH] Makefile: move Debian package related rules to contrib The support for Debian packages have already been moved to a contrib dir, their Makefile rules were kept but not even updated. Let's move those to the contrib dir. Notice: the status of these rules are equal to the other Debian package files, that is, they're unsupported and we do not guarantee they're actually working. Signed-off-by: Cleber Rosa --- Makefile | 27 --------------------------- contrib/packages/debian/Makefile | 29 +++++++++++++++++++++++++++++ contrib/packages/debian/README | 10 ++++++++++ 3 files changed, 39 insertions(+), 27 deletions(-) create mode 100644 contrib/packages/debian/Makefile create mode 100644 contrib/packages/debian/README diff --git a/Makefile b/Makefile index 4200629c..bf68c189 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 00000000..0fe91638 --- /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 00000000..eacb32b6 --- /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. -- GitLab