forked from themix-project/themix-gui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
80 lines (65 loc) · 2.6 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
DESTDIR = ./distrib
PREFIX = /usr
APPDIR = /opt/oomox
DISABLE_PLUGIN_MATERIA = 0
DISABLE_PLUGIN_ARC = 0
DISABLE_PLUGIN_SPOTIFY = 0
DISABLE_PLUGIN_IMPORT_IMAGE = 0
.PHONY: install
install:
$(eval DEST_APPDIR := $(DESTDIR)$(APPDIR))
$(eval DEST_PREFIX := $(DESTDIR)$(PREFIX))
$(eval PACKAGING_TMP_DIR := $(shell mktemp -d))
mkdir -p $(DEST_APPDIR)
cp -prf \
CREDITS \
LICENSE \
README.md \
scripted_colors \
colors \
gui.sh \
oomox_gui \
plugins \
po \
po.mk \
terminal_templates \
$(DEST_APPDIR)/
$(RM) -r "$(DEST_APPDIR)/plugins/oomoxify/".git*
$(RM) -r "$(DEST_APPDIR)/plugins"/*/*/.git*
$(RM) -r "$(DEST_APPDIR)/plugins/theme_oomox/gtk-theme/".editorconfig
$(RM) -r "$(DEST_APPDIR)/plugins/theme_oomox/gtk-theme/".*.yml
$(RM) -r "$(DEST_APPDIR)/plugins/theme_oomox/gtk-theme/"{D,d}ocker*
$(RM) -r "$(DEST_APPDIR)/plugins/theme_oomox/gtk-theme/"maintenance*
$(RM) -r "$(DEST_APPDIR)/plugins/theme_oomox/gtk-theme/"screenshot*
$(RM) -r "$(DEST_APPDIR)/plugins/theme_oomox/gtk-theme/"test*
cp -prf \
packaging/ \
$(PACKAGING_TMP_DIR)/
ifeq ($(DISABLE_PLUGIN_MATERIA), 1)
$(RM) -r $(DEST_APPDIR)/plugins/theme_materia/
$(RM) $(PACKAGING_TMP_DIR)/packaging/bin/oomox-materia-cli
endif
ifeq ($(DISABLE_PLUGIN_ARC), 1)
$(RM) -r $(DEST_APPDIR)/plugins/theme_arc/
endif
ifeq ($(DISABLE_PLUGIN_SPOTIFY), 1)
$(RM) -r $(DEST_APPDIR)/plugins/oomoxify/
$(RM) $(PACKAGING_TMP_DIR)/packaging/bin/oomoxify-cli
endif
ifeq ($(DISABLE_PLUGIN_IMPORT_IMAGE), 1)
$(RM) -r $(DEST_APPDIR)/plugins/import_pil/
endif
sed -i -e 's|/opt/oomox/|$(APPDIR)/|g' $(PACKAGING_TMP_DIR)/packaging/bin/*
chmod a+x "$(PACKAGING_TMP_DIR)/packaging/bin/"*
install -Dp -m 755 --target-directory="$(DEST_PREFIX)/bin/" "$(PACKAGING_TMP_DIR)/packaging/bin/"*
install -d $(DEST_PREFIX)/share/applications/
install -Dp -m 644 "$(PACKAGING_TMP_DIR)/packaging/com.github.themix_project.Oomox.desktop" "$(DEST_PREFIX)/share/applications/"
install -d $(DEST_PREFIX)/share/appdata/
install -Dp -m 644 "$(PACKAGING_TMP_DIR)/packaging/com.github.themix_project.Oomox.appdata.xml" "$(DEST_PREFIX)/share/appdata/"
install -Dp -m 644 "$(PACKAGING_TMP_DIR)/packaging/com.github.themix_project.Oomox-symbolic.svg" "$(DEST_PREFIX)/share/icons/hicolor/symbolic/apps/com.github.themix_project.Oomox-symbolic.svg"
install -Dp -m 644 "$(PACKAGING_TMP_DIR)/packaging/com.github.themix_project.Oomox.svg" "$(DEST_PREFIX)/share/icons/hicolor/scalable/apps/com.github.themix_project.Oomox.svg"
$(RM) -r $(PACKAGING_TMP_DIR)
# will update ./po and produce ./locale dir:
make -C $(DEST_APPDIR) -f po.mk install
rm $(DEST_APPDIR)/po.mk
all: install