-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
32 lines (23 loc) · 816 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
# all targets are phony (no files to check)
.PHONY: default build clean copy-conf install uninstall
SHELL := /bin/bash
APP := $(shell jq -er '.name' < config.json | grep -oP '(?<=docker-).+?(?=-builder)')
VERSION := $(shell jq -er '.version' < config.json)
TAG := $(shell jq -er '"\(.image):\(.version)"' < config.json)
ARCH := $(shell dpkg --print-architecture)
default: build
build:
@./build-deb.sh
clean:
rm -f "$(APP)_$(VERSION)"-1_*.deb
docker rmi "$(TAG)"
copy-conf:
cp tmux.conf /etc
cp tmux.pin /etc/apt/preferences.d/tmux
install:
@dpkg -i "$(APP)_$(VERSION)"-1_$(ARCH).deb
@apt-get -y install "$$(apt-cache search libevent-core | awk '{print $$1}')"
uninstall:
apt-get purge "$(APP)"
rm /etc/apt/preferences.d/tmux
apt-get purge "$$(apt-cache search libevent-core | awk '{print $$1}')"