-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
48 lines (30 loc) · 844 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# BUILD TRANSMISSION PACKAGE FOR DEBIAN AFTER APPLYING PATCHES
# https://github.com/sio/transmission-debian-patched
DOCKER?=docker
TAG=transmission-patched
BUILD_ARTIFACTS=\
pkg \
.image-is-ready
pkg: | image check-deps
CONTAINER=$$($(DOCKER) create $(TAG)) && \
$(DOCKER) cp $$CONTAINER:/packages/. $@/ && \
$(DOCKER) rm $$CONTAINER
cd $@; sha256sum * > checksums.sha256
.image-is-ready: Dockerfile $(wildcard *.patch)
$(DOCKER) build --rm -t $(TAG) .
touch $@
.PHONY: image
image: .image-is-ready
.PHONY: check-deps
check-deps:
$(DOCKER) --version
.PHONY: inspect
inspect:
$(DOCKER) run --rm -it $(TAG) /bin/sh
.PHONY: clean
clean: docker-clean
-$(RM) -r $(BUILD_ARTIFACTS)
.PHONY: docker-clean
docker-clean:
-$(DOCKER) rmi $(TAG)
-$(DOCKER) image prune -f --filter label=github=sio/transmission-debian-patched