Makefile: Build debian packages in own directory.
Commit Message
This helps to keep a much cleaner environment.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
---
Makefile.am | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
@@ -421,4 +421,8 @@ $(DEBIAN_TARBALL_NAME): dist
.PHONY: debian
debian: $(DEBIAN_TARBALL_NAME)
- debuild -i -us -uc -b
+ mkdir -pv debian-build/$(PACKAGE_NAME)-$(PACKAGE_VERSION)/debian
+ cp -avf $(DEBIAN_TARBALL_NAME) debian-build
+ cp -avf debian/* debian-build/$(PACKAGE_NAME)-$(PACKAGE_VERSION)/debian
+ cd debian-build && tar -xvf $(DEBIAN_TARBALL_NAME)
+ cd debian-build/$(PACKAGE_NAME)-$(PACKAGE_VERSION) && debuild -us -uc