From: Frantisek Hrbata Date: Tue, 22 Dec 2020 11:18:22 +0000 (+0100) Subject: make: add deb target X-Git-Tag: v0.2~2 X-Git-Url: http://www.hrbata.com/gitweb/?a=commitdiff_plain;h=f8bf00f133ed0075e43633bae9a4a40894a09f0c;p=gimrr.git make: add deb target This builds just a very basic debian binary package. Signed-off-by: Frantisek Hrbata --- diff --git a/Makefile b/Makefile index 1815b3e..d0851b3 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ VERSION = 0.2 RELEASE = 1 -.PHONY: clean rpm doc man html install uninstall clean_man clean_html help +.PHONY: clean rpm deb doc man html install uninstall clean_man clean_html help all: help @@ -11,6 +11,7 @@ help: @echo 'doc - man + html' @echo 'rpm - generate binary rpm package' @echo 'clean - remove man and html pages' + @echo ' - remove rpm and deb building directory' @echo 'install - install gimrr to system or DESTDIR' @echo 'uninstall - remove gimrr from system or DESTDIR' @@ -90,10 +91,17 @@ rpm: sed -i s'/%%VERSION%%/$(VERSION)/;s/%%RELEASE%%/$(RELEASE)/' $(RPM_TOP_DIR)/SPECS/gimrr.spec $(RPMBUILD) -bb --build-in-place --define "_topdir $(RPM_TOP_DIR)" $(RPM_TOP_DIR)/SPECS/gimrr.spec +DEB_TOP_DIR = $(CURDIR)/debian +deb: + make install DESTDIR=$(DEB_TOP_DIR)/build bindir="/usr/bin" mandir="/usr/share/man" + $(INSTALL) -d -m 755 $(DEB_TOP_DIR)/build/DEBIAN + $(INSTALL) -m 644 gimrr.control $(DEB_TOP_DIR)/build/DEBIAN/control + dpkg-deb --build $(DEB_TOP_DIR)/build $(DEB_TOP_DIR)/gimrr_$(VERSION)-$(RELEASE)_all.deb + doc: man html clean: clean_man clean_html - $(RM) -r $(RPM_TOP_DIR) + $(RM) -r $(RPM_TOP_DIR) $(DEB_TOP_DIR) install: $(BIN_FILES) $(MAN1_FILES) $(INSTALL) -d -m 755 $(DESTDIR)$(bindir)