-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
80 lines (74 loc) · 3.5 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# DEFINE FIRST THE CURRENT USER NAME
C_USER = $(shell ls -l "$(shell pwd)"| cut -d' ' -f3 | sed -n "2p")
GIT = /usr/bin/git
PREFIX = /usr/local
USER_DIR = /home/$(C_USER)
CONF_DIR = $(USER_DIR)/.winestarter
.PHONY: install update uninstall safeuninstall
all: install
install:
mkdir -p $(CONF_DIR)
mkdir -p $(CONF_DIR)/icons
mkdir -p $(CONF_DIR)/configs
mkdir -p $(CONF_DIR)/desktop
mkdir -p $(CONF_DIR)/resources
mkdir -p $(CONF_DIR)/png/defaults
cp -Rf ./emblems $(CONF_DIR)/
cp -Rf ./png/defaults/* $(CONF_DIR)/png/defaults/
cp -f ./color.conf $(CONF_DIR)/
cp -f ./options.list $(CONF_DIR)/resources
cp -f ./mime-* $(CONF_DIR)/resources/
cp -Rf ./.git $(CONF_DIR)/
chown -R $(C_USER):$(C_USER) $(CONF_DIR)
install -Dm755 -t $(PREFIX)/bin/ winestarter
install -Dm755 -t $(PREFIX)/bin/ winestarter_conf
install -Dm755 -t $(PREFIX)/bin/ winestarter_kill
install -Dm755 -t $(PREFIX)/bin/ winetricks
install -Dm755 -t $(PREFIX)/bin/ update_winestarter
install -Dm644 -t $(PREFIX)/share/applications/ winestarter.desktop
install -Dm644 -t $(PREFIX)/share/applications/ winestarter_kill.desktop
install -Dm644 -t $(PREFIX)/share/pixmaps/ png/defaults/winestarter_128.png
install -Dm644 -t $(PREFIX)/share/pixmaps/ png/defaults/winestarter_128k.png
install -Dm644 -t $(PREFIX)/share/pixmaps/ png/defaults/wine48w.png
install -Dm644 -t /usr/share/polkit-1/actions/ com.github.pkexec.winestarter_wipe.policy
install -Dm644 -t $(USER_DIR)/.config/autostart/ update_winestarter.desktop
chown $(C_USER):$(C_USER) $(USER_DIR)/.config/autostart/ update_winestarter.desktop
# sudo -u $(C_USER) cp -Rf ./.git $(CONF_DIR)/
update:
sudo -u $(C_USER) git pull
install -Dm755 -t $(PREFIX)/bin/ winestarter
install -Dm755 -t $(PREFIX)/bin/ winestarter_conf
install -Dm755 -t $(PREFIX)/bin/ winestarter_kill
install -Dm755 -t $(PREFIX)/bin/ winetricks
install -Dm755 -t $(PREFIX)/bin/ update_winestarter
install -Dm644 -t $(PREFIX)/share/applications/ winestarter.desktop
install -Dm644 -t $(PREFIX)/share/applications/ winestarter_kill.desktop
install -Dm644 -t $(PREFIX)/share/pixmaps/ png/defaults/winestarter_128.png
install -Dm644 -t $(PREFIX)/share/pixmaps/ png/defaults/winestarter_128k.png
install -Dm644 -t $(PREFIX)/share/pixmaps/ png/defaults/wine48w.png
install -Dm644 -t /usr/share/polkit-1/actions/ com.github.pkexec.winestarter_wipe.policy
install -Dm644 -t $(USER_DIR)/.config/autostart/ update_winestarter.desktop
cp -Ru ./png/defaults/* $(CONF_DIR)/png/defaults/
chown $(C_USER):$(C_USER) $(USER_DIR)/.config/autostart/ update_winestarter.desktop
# sudo -u $(C_USER) cp -Rf ./.git $(CONF_DIR)/
bash ./changelog.sh
uninstall:
rm -Rf $(CONF_DIR)
rm -f $(PREFIX)/bin/winestarter
rm -f $(PREFIX)/bin/winestarter_conf
rm -f $(PREFIX)/bin/update_winestarter
rm -f $(PREFIX)/share/applications/winestarter.desktop
rm -f $(PREFIX)/share/applications/winestarter_kill.desktop
rm -f $(PREFIX)/share/pixmaps/winestarter_128*
rm -f $(PREFIX)/share/pixmaps/wine48w.png
rm -f /usr/share/polkit-1/actions/com.github.pkexec.winestarter_wipe.policy
rm -f $(USER_DIR)/.config/autostart/update_winestarter.desktop
safeuninstall:
rm -f $(PREFIX)/bin/winestarter
rm -f $(PREFIX)/bin/winestarter_conf
rm -f $(PREFIX)/bin/update_winestarter
rm -f $(PREFIX)/share/applications/winestarter.desktop
rm -f $(PREFIX)/share/applications/winestarter_kill.desktop
rm -f $(PREFIX)/share/pixmaps/winestarter_128*
rm -f /usr/share/polkit-1/actions/com.github.pkexec.winestarter_cache.policy
rm -f $(USER_DIR)/.config/autostart/update_winestarter.desktop