From: Richard Jones Date: Tue, 24 Aug 2010 10:19:55 +0000 (+0100) Subject: build: Add 'bindist' rule for building binary distribution. X-Git-Tag: 1.5.4~2 X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=10d1aa3b64f61408bb092d998fb8c5f453a7749c;p=libguestfs.git build: Add 'bindist' rule for building binary distribution. --- 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