summarylogtreecommitdiffstats
path: root/Makefile
blob: ad7dece57d1fc826d2271a91452ed6c77a2ce9ec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
IMAGE_NAME ?= makepkg.local
IMAGE_TAG ?= latest
UID = $(shell id -u)
GID = $(shell id -g)

.PHONY: build
build: clean
	makepkg --nodeps
	makepkg --nodeps --printsrcinfo > .SRCINFO

.PHONY: clean
clean:
	rm -rf *.tar.* *.pkg.* src pkg

.PHONY: in-docker
in-docker: clean
	docker build -t $(IMAGE_NAME):$(IMAGE_TAG) .
	docker run -it --rm \
		--volume $(PWD):/src \
		--workdir /src \
		--user $(UID):$(GID) \
		$(IMAGE_NAME):$(IMAGE_TAG) \
		make build