-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
61 lines (47 loc) · 1.44 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
all:
@echo Usage:
@echo make dependencies
@echo make install
@echo make aliases
@echo make radio-stations
@echo make restart
@echo make keyboard-dev
@echo make test
@echo make docker-build
@echo make docker-run
dependencies:
sudo apt install curl virtualenv espeak mpc mpd mpg123 neovim
virtualenv -p /usr/bin/python3 virtualenv
./virtualenv/bin/pip install --upgrade -r requirements.txt
echo "Reboot is recommended now"
install:
# Install the systemd service
# For the program to run in the background and start on boot
sudo cp spotify-alarm-clock.service /etc/systemd/system
sudo systemctl daemon-reload
sudo systemctl enable spotify-alarm-clock
install-keyboard:
sudo cp keyboard-controls.service /etc/systemd/system
sudo systemctl daemon-reload
sudo systemctl enable keyboard-controls
aliases:
cat bash_aliases >> ~/.bash_aliases
source ~/.bashrc
radio-stations:
mpc add https://stream-relay-geo.ntslive.net/stream
mpc add https://stream-relay-geo.ntslive.net/stream2
mpc repeat on
restart:
sudo systemctl restart spotify-alarm-clock
dev:
/home/pi/Developer/spotify-alarm-clock/virtualenv/bin/python /home/pi/Developer/spotify-alarm-clock/server.py
numpad:
nohup make keyboard-dev > /dev/null 2>&1 &
keyboard-dev:
sudo -E ./virtualenv/bin/python keyboard_input.py
test:
./virtualenv/bin/pytest
docker-build:
docker build -t spotify-alarm-clock:latest .
docker-run:
docker run -it -p 3141:3141 spotify-alarm-clock:latest