summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Dockerfile4
-rw-r--r--Makefile17
2 files changed, 21 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 000000000000..64605e9b9980
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,4 @@
+FROM archlinux:base-devel
+
+RUN pacman --noconfirm -Sy fakeroot binutils make
+RUN pacman --noconfirm -S libevdev
diff --git a/Makefile b/Makefile
index 7d2f3c0fee1b..3a1f7f788a45 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,23 @@
+IMAGE_NAME ?= makepkg.local
+IMAGE_TAG ?= latest
+UID = $(shell id -u)
+GID = $(shell id -g)
+
+.PHONY: build
build: clean
makepkg
makepkg --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