From 10d1aa3b64f61408bb092d998fb8c5f453a7749c Mon Sep 17 00:00:00 2001 From: Richard Jones Date: Tue, 24 Aug 2010 11:19:55 +0100 Subject: [PATCH] build: Add 'bindist' rule for building binary distribution. --- Makefile.am | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Makefile.am b/Makefile.am index 58736f8..55e3ed1 100644 --- a/Makefile.am +++ b/Makefile.am @@ -208,3 +208,21 @@ quickcheck: LIBGUESTFS_PATH=appliance \ test-tool/libguestfs-test-tool \ --helper test-tool/libguestfs-test-tool-helper + +# Binary distribution. +# Note we remove the supermin appliance and adjust some +# directories to make them non-Fedora-specific. + +BINTMPDIR = /tmp/libguestfs-bin +bindist: + rm -rf $(BINTMPDIR) + mkdir $(BINTMPDIR) + $(MAKE) + $(MAKE) DESTDIR=$(BINTMPDIR) install + rm -r $(BINTMPDIR)/$(libdir)/guestfs/supermin.d + rm $(BINTMPDIR)/$(libdir)/guestfs/kmod.whitelist + mv $(BINTMPDIR)/$(prefix)/lib64/* $(BINTMPDIR)/$(libdir) + mv $(BINTMPDIR)/usr/lib64/* $(BINTMPDIR)/$(libdir) + -find $(BINTMPDIR) -type d -exec rmdir --ignore-fail-on-non-empty {} \; + (cd $(BINTMPDIR) && tar zcf - .) \ + > libguestfs-$(VERSION)-$(host_cpu).tar.gz -- 1.8.3.1