aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorLouis Bouchard <louis.bouchard@canonical.com>2014-10-01 11:51:39 +0200
committerAdam Stokes <adam.stokes@ubuntu.com>2014-10-03 10:45:27 -0400
commiteb45b46bf810e231fa272b05960435998b2af8a2 (patch)
tree7e2bb19d479f5f2d0572b001c7e75587c72055be /Makefile
parent988fee7e6d0c2c91cf1f2c9363d4e3cea7244163 (diff)
downloadsos-eb45b46bf810e231fa272b05960435998b2af8a2.tar.gz
[Makefile] Add debian pkg tarball build
Fixes #418 Signed-off-by: Louis Bouchard <louis.bouchard@canonical.com> Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile13
1 files changed, 12 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 52df5594..df264536 100644
--- a/Makefile
+++ b/Makefile
@@ -25,6 +25,7 @@ RPM_DEFINES = --define "_topdir %(pwd)/$(DIST_BUILD_DIR)" \
RPM = rpmbuild
RPM_WITH_DIRS = $(RPM) $(RPM_DEFINES)
ARCHIVE_DIR = $(DIST_BUILD_DIR)/$(NAME)-$(VERSION)
+DEB_ARCHIVE_DIR = $(DIST_BUILD_DIR)/$(NAME)report-$(VERSION)
SRC_BUILD = $(DIST_BUILD_DIR)/sdist
PO_DIR = $(SRC_BUILD)/sos/po
@@ -52,9 +53,19 @@ updateversion:
$(NAME)-$(VERSION).tar.gz: clean
@mkdir -p $(ARCHIVE_DIR)
- @tar -cv sosreport sos doc man po sos.conf AUTHORS LICENSE README.md sos.spec Makefile | tar -x -C $(ARCHIVE_DIR)
+ @tar -cv sosreport sos docs man po sos.conf AUTHORS LICENSE README.md sos.spec Makefile | tar -x -C $(ARCHIVE_DIR)
@tar Ccvzf $(DIST_BUILD_DIR) $(DIST_BUILD_DIR)/$(NAME)-$(VERSION).tar.gz $(NAME)-$(VERSION) --exclude-vcs
+$(NAME)report_$(VERSION).orig.tar.gz: clean
+ @mkdir -p $(DEB_ARCHIVE_DIR)
+ @tar --exclude-vcs \
+ --exclude=.travis.yml \
+ --exclude=debian \
+ --exclude=$(DIST_BUILD_DIR) -cv . | tar -x -C $(DEB_ARCHIVE_DIR)
+ @tar Ccvzf $(DIST_BUILD_DIR) $(DIST_BUILD_DIR)/$(NAME)report_$(VERSION).orig.tar.gz $(NAME)report-$(VERSION)
+ @mv $(DIST_BUILD_DIR)/$(NAME)report_$(VERSION).orig.tar.gz .
+ @rm -Rf $(DIST_BUILD_DIR)
+
clean:
@rm -fv *~ .*~ changenew ChangeLog.old $(NAME)-$(VERSION).tar.gz sosreport.1.gz sos.conf.5.gz
@rm -rf rpm-build