-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile
More file actions
35 lines (24 loc) · 819 Bytes
/
Makefile
File metadata and controls
35 lines (24 loc) · 819 Bytes
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
DESTDIR=/
RESOURCE_DIR=$(CURDIR)/resources
WINE_INIT=$(RESOURCE_DIR)/wine-init.sh
UDEV_RULES=98-steelseries.rules 98-steelseries-init.py
UDEV_RULES_DIR=$(DESTDIR)etc/udev/rules.d
WORKDIR=$(CURDIR)/.temp
ENGINE_DOWNLOAD_URI=https://steelseries.com/gg/downloads/gg/latest/windows
ENGINE_EXE=$(WORKDIR)/SteelSeriesSetup.exe
INSTALL_FILES=$(patsubst %,$(UDEV_RULES_DIR)/%,$(UDEV_RULES))
SUDO=sudo
$(UDEV_RULES_DIR)/%: $(RESOURCE_DIR)/%
${SUDO} mkdir -p "$(dir $@)"
${SUDO} cp -f "$<" "$@"
$(ENGINE_EXE):
mkdir -p "$(dir $@)"
curl "${ENGINE_DOWNLOAD_URI}" -L --output "$(ENGINE_EXE)"
chmod +x "$(ENGINE_EXE)"
download: $(ENGINE_EXE)
install: $(INSTALL_FILES) $(ENGINE_EXE)
bash "$(RESOURCE_DIR)/preinstall-check.sh"
echo "Configuring wine"
bash "$(WINE_INIT)"
wine "$(ENGINE_EXE)"
.DEFAULT_GOAL = install