-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathMakefile.docker
78 lines (57 loc) · 2 KB
/
Makefile.docker
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# make -f Makefile.docker clean all
CODENAME=sid
BASEIMAGE=debian:$(CODENAME)
IMAGE=wedesoft/aiscm-$(BASEIMAGE)
# make -f Makefile.docker clean all OPTS=--no-cache
OPTS?=
#OPTS+=--no-cache
VERSION=$(shell grep AC_INIT configure.ac | sed -e "s/.*\[\([0-9\.]*\)\].*/\1/")
PACKAGE=aiscm_$(shell dpkg-parsechangelog --show-field Version)
XSOCK=/tmp/.X11-unix
GPGKEY=6F8E1FCF
all: package
cd apt && reprepro -S lisp -P optional includedeb $(CODENAME) ../pkg/$(PACKAGE)_amd64.deb && cd ..
cd apt && reprepro -S lisp -P optional includedsc $(CODENAME) ../pkg/$(PACKAGE).dsc && cd ..
container: docker docker/Dockerfile docker/aiscm.tar.xz docker/aiscm.tar.xz.asc \
docker/debian docker/configure.ac docker/Makefile.package
cd docker && docker build $(OPTS) -t $(IMAGE) . && cd ..
run: container
xhost +local:root
docker run -it --privileged --env="DISPLAY" --env "QT_X11_NO_MITSHM=1" -v $(XSOCK):$(XSOCK):rw \
-v $(shell pwd):/mnt $(IMAGE) /bin/bash
xhost -local:root
sign: package
cd pkg && debsign -k $(GPGKEY) $(PACKAGE)_amd64.changes && cd ..
detach-sig: aiscm-$(VERSION).tar.xz.asc
# "mentors" needs to be defined in ~/.dput.cf (see https://mentors.debian.net/intro-maintainers and etc/dput.cf)
dput: sign
cd pkg && dput -f mentors $(PACKAGE)_amd64.changes && cd ..
report:
uscan --report-status
package: pkg/$(PACKAGE).dsc
pkg/$(PACKAGE).dsc: container
docker run $(IMAGE) tar c pkg | tar x
docker:
mkdir -p $@
docker/Dockerfile: Dockerfile
cp $< $@
docker/aiscm.tar.xz: aiscm-$(VERSION).tar.xz
cp $< $@
docker/aiscm.tar.xz.asc: aiscm-$(VERSION).tar.xz.asc
cp $< $@
docker/debian:: debian
cp -a $< docker
docker/configure.ac: configure.ac
cp $< $@
docker/Makefile.package: Makefile.package
cp $< $@
aiscm-$(VERSION).tar.gz:
make dist
aiscm-$(VERSION).tar.xz:
make dist-xz
aiscm-$(VERSION).tar.gz.asc: aiscm-$(VERSION).tar.gz
gpg --armor --output $@ --detach-sig $<
aiscm-$(VERSION).tar.xz.asc: aiscm-$(VERSION).tar.xz
gpg --armor --output $@ --detach-sig $<
clean:
rm -Rf aiscm-$(VERSION).tar.gz docker