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

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

.PHONY: clean
clean:
	rm -rf *.tar.* *.pkg.* src pkg *.zst ./gamescope-session-opengamepadui

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