Makefile 815 B

12345678910111213141516171819202122232425
  1. # Keep this short to avoid bloating beam files with long file path info
  2. TOPDIR := /tmp/kuiper
  3. SRCDIR := $(TOPDIR)/$(PKG_VSN)
  4. BUILT := $(SRCDIR)/BUILT
  5. TARGET_PKG := kuiper-$(PKG_VSN)-linux-$(shell go env GOARCH).deb
  6. .PHONY: all
  7. all: | $(BUILT)
  8. cp -r debian $(SRCDIR)/
  9. sed -i "s#<DATETIME>#$(shell date -u '+%a, %d %b %Y %T %z')#g" $(SRCDIR)/debian/changelog
  10. sed -i "s#<VERSION>#$(PKG_VSN)#g" $(SRCDIR)/debian/changelog
  11. cd $(SRCDIR) && dpkg-buildpackage -us -uc
  12. mkdir -p $(KUIPER_SOURCE)/_packages/
  13. cp $(SRCDIR)/../*.deb $(KUIPER_SOURCE)/_packages/$(TARGET_PKG)
  14. $(BUILT):
  15. mkdir -p $(TOPDIR) $(SRCDIR)
  16. cp -r $(KUIPER_SOURCE)/. $(SRCDIR)
  17. rm -rf $(SRCDIR)/plugins/source/*
  18. rm -rf $(SRCDIR)/plugins/sinks/*
  19. rm -rf $(SRCDIR)/plugins/functions/*
  20. rm -rf $(SRCDIR)/plugins/portable/*
  21. clean:
  22. rm -rf $(TOPDIR)