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.
 
 

41 lines
1.1 KiB

VERSION:=1.10.1
WORKDIR:=gitea
DEB_OUTDIR:=debian_out
BINFILE:=gitea
DIRNAME:=$(shell dirname "$0")
V:=@
all: $(WORKDIR)/$(BINFILE)
$(WORKDIR)/$(BINFILE):
$(V)mkdir -p $(WORKDIR)
$(V)curl \
-L \
https://github.com/go-gitea/gitea/releases/download/v$(VERSION)/gitea-$(VERSION)-linux-amd64 \
-o $(WORKDIR)/$(BINFILE)
install:
$(V)mkdir -p $(DESTDIR)/usr/bin
$(V)install -D -m 0755 $(WORKDIR)/$(BINFILE) $(DESTDIR)/usr/bin/$(BINFILE)
debian/changelog:
echo "gitea ($(VERSION)) xenial; urgency=medium" > debian/changelog
echo "" >> debian/changelog
echo " * Gitea version $(VERSION)" >> debian/changelog
echo "" >> debian/changelog
echo " -- Xil Builder <dockerbuilder@xil.se> `LANG=C date -R`" >> debian/changelog
echo "" >> debian/changelog
echo "" >> debian/changelog
.PHONY: debian/changelog
dockerdebbuild: debian/changelog
docker build -f Dockerfile --tag build/gitea_deb $(DIRNAME)
DOCKER_ID=$$(docker create build/gitea_deb); \
docker cp $$DOCKER_ID:/opt/build/$(DEB_OUTDIR) $(DIRNAME) && \
docker rm -v $$DOCKER_ID
clean:
$(V)rm -rf $(WORKDIR) $(DEB_OUTDIR)