-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile
39 lines (30 loc) · 1.22 KB
/
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
VERSION=1.3.1
NAMESPACE=seanhoughton
TAG=$(VERSION)
UNAME_A=$(shell uname -a)
ifneq (,$(findstring armv,$(UNAME_A)))
NAME=rpi-indiserver
DOCKERFILE=Dockerfile.rpi
DRIVERS_TO_INSTALL=libsbigudrv2_2.1.1_armhf.deb libqhy_0.1.8_armhf.deb
IMAGE_DEPS=libindi-rpi.tgz
else
NAME=indiserver
DOCKERFILE=Dockerfile.x86
DRIVERS_TO_INSTALL=libsbigudrv2 libqhy
endif
.PHONY: image push installdrivers-rpi rpi-indiserver-bootstrap indiserver-bootstrap bootstrap
default: image
libindi-rpi.tgz:
# note: the version isn't part of the URL so this might not always work...
curl http://indilib.org/download/raspberry-pi/send/6-raspberry-pi/9-indi-library-for-raspberry-pi.html > libindi-rpi.tgz
image: $(IMAGE_DEPS)
docker build -t $(NAMESPACE)/$(NAME):$(TAG) -f $(DOCKERFILE) .
push: image
docker push $(NAMESPACE)/$(NAME):$(TAG)
rpi-indiserver-bootstrap: libindi-rpi.tgz
sudo apt-get update && sudo apt-get install -y docker-engine fxload
tar -C /tmp -xzf libindi-rpi.tgz
cd /tmp/libindi_$(VERSION)_rpi && sudo dpkg -i $(DRIVERS_TO_INSTALL) && rm -r /tmp/libindi_$(VERSION)_rpi
indiserver-bootstrap:
sudo apt-get update && sudo apt-get install -y docker-engine fxload $(DRIVERS_TO_INSTALL)
bootstrap: $(NAME)-bootstrap