You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

42 lines
1.1 KiB

  1. VERSION:=1.10.1
  2. WORKDIR:=gitea
  3. DEB_OUTDIR:=debian_out
  4. BINFILE:=gitea
  5. DIRNAME:=$(shell dirname "$0")
  6. V:=@
  7. all: $(WORKDIR)/$(BINFILE)
  8. $(WORKDIR)/$(BINFILE):
  9. $(V)mkdir -p $(WORKDIR)
  10. $(V)curl \
  11. -L \
  12. https://github.com/go-gitea/gitea/releases/download/v$(VERSION)/gitea-$(VERSION)-linux-amd64 \
  13. -o $(WORKDIR)/$(BINFILE)
  14. install:
  15. $(V)mkdir -p $(DESTDIR)/usr/bin
  16. $(V)install -D -m 0755 $(WORKDIR)/$(BINFILE) $(DESTDIR)/usr/bin/$(BINFILE)
  17. debian/changelog:
  18. echo "gitea ($(VERSION)) xenial; urgency=medium" > debian/changelog
  19. echo "" >> debian/changelog
  20. echo " * Gitea version $(VERSION)" >> debian/changelog
  21. echo "" >> debian/changelog
  22. echo " -- Xil Builder <dockerbuilder@xil.se> `LANG=C date -R`" >> debian/changelog
  23. echo "" >> debian/changelog
  24. echo "" >> debian/changelog
  25. .PHONY: debian/changelog
  26. dockerdebbuild: debian/changelog
  27. docker build -f Dockerfile --tag build/gitea_deb $(DIRNAME)
  28. DOCKER_ID=$$(docker create build/gitea_deb); \
  29. docker cp $$DOCKER_ID:/opt/build/$(DEB_OUTDIR) $(DIRNAME) && \
  30. docker rm -v $$DOCKER_ID
  31. clean:
  32. $(V)rm -rf $(WORKDIR) $(DEB_OUTDIR)