forked from UbuntuBudgie/pocillo-gtk-theme
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
174 lines (147 loc) · 4.66 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
SHELL = /bin/bash
COLOR_VARIANTS = '' '-dark' '-light'
SIZE_VARIANTS = '' '-slim'
SASSC_OPT=-M -t expanded
BASE_DIR=/usr/share/themes
REPODIR=$(CURDIR)
SRCDIR=$(REPODIR)/src
GNOMEVER=3.26
OLDESTGTK=3.22
all: sass assets
#install-gnome-shell:
# cp -v /usr/share/themes/Pocillo/gnome-shell/pocillo.css /usr/share/gnome-shell/theme
assets: recolor
@echo "** Generating the Assets..."
cd ./src/gtk-3.0/gtk-common/ && find . -type f -name *.png -exec rm -v '{}' + > /dev/null
cd ./src/gtk-2.0/ && find . -type f -name *.png -exec rm -v '{}' + > /dev/null
cd ./src/gtk-3.0/gtk-common/ && ./render-assets.sh > /dev/null
cd ./src/gtk-2.0/ && ./render-assets.sh > /dev/null
clean:
-rm -rf ./src/gtk-2.0/assets/*.png
-rm -rf ./src/gtk-2.0/assets-dark/*.png
-rm -rf ./src/gtk-3.0/gtk-common/assets/*.png
-rm -rf ./src/gtk-3.0/**/*.css
#-rm -rf ./src/gnome-shell/**/*.css
uninstall:
-rm -rf $(DESTDIR)/usr/share/themes/Pocillo
-rm -rf $(DESTDIR)/usr/share/themes/Pocillo-dark
-rm -rf $(DESTDIR)/usr/share/themes/Pocillo-light
-rm -rf $(DESTDIR)/usr/share/themes/Pocillo-compact
-rm -rf $(DESTDIR)/usr/share/themes/Pocillo-light-compact
-rm -rf $(DESTDIR)/usr/share/themes/Pocillo-dark-compact
-rm -rf $(DESTDIR)/usr/share/themes/Pocillo-slim
-rm -rf $(DESTDIR)/usr/share/themes/Pocillo-dark-slim
-rm -rf $(DESTDIR)/usr/share/themes/Pocillo-light-slim
install:
@echo "** Installing the theme..."
# Setup
for color in $(COLOR_VARIANTS); do \
for size in $(SIZE_VARIANTS); do \
export themedir=$(DESTDIR)$(BASE_DIR)/Pocillo$$color$$size; \
install -d $$themedir; \
# cp -ur COPYING $$themedir; \
cp -ur src/index$$color$$size.theme $$themedir/index.theme; \
done; \
done
# Install GTK2 Theme
for color in $(COLOR_VARIANTS); do \
for size in $(SIZE_VARIANTS); do \
export themedir=$(DESTDIR)$(BASE_DIR)/Pocillo$$color$$size; \
install -d $$themedir/gtk-2.0; \
cd $(SRCDIR)/gtk-2.0; \
cp -ur \
apps.rc \
hacks.rc \
main.rc \
xfce-notify.rc \
panel.rc \
menubar-toolbar \
$$themedir/gtk-2.0; \
if [ "$$color" != '-dark' ]; then \
cp -ur \
assets \
$$themedir/gtk-2.0; \
else \
cp -ur \
assets-dark \
$$themedir/gtk-2.0/assets; \
fi; \
cp -ur \
gtkrc$$color \
$$themedir/gtk-2.0/gtkrc; \
done; \
done
# Install GTK3 Theme
for color in $(COLOR_VARIANTS); do \
for size in $(SIZE_VARIANTS); do \
export themedir=$(DESTDIR)$(BASE_DIR)/Pocillo$$color$$size; \
install -d $$themedir/gtk-common; \
cd $$themedir; \
ln -s gtk-$(OLDESTGTK)/ ./gtk-3.0; \
cd $(SRCDIR)/gtk-3.0/gtk-common; \
cp -ur \
assets \
$$themedir/gtk-common; \
for version in '$(OLDESTGTK)'; do \
install -d $$themedir/gtk-$$version; \
cd $(SRCDIR)/gtk-3.0/$$version; \
cp -ur \
assets \
$$themedir/gtk-$$version; \
cp -ur \
gtk$$color$$size.css \
$$themedir/gtk-$$version/gtk.css; \
if [ "$$color" != '-dark' ]; then \
cp -ur \
gtk-dark$$size.css \
$$themedir/gtk-$$version/gtk-dark.css; \
fi; \
done; \
done; \
done
# Install Plank Theme
for color in $(COLOR_VARIANTS); do \
for size in $(SIZE_VARIANTS); do \
export themedir=$(DESTDIR)$(BASE_DIR)/Pocillo$$color$$size; \
install -d $$themedir/plank; \
cd $(SRCDIR)/plank; \
cp -ur \
dock.theme \
$$themedir/plank; \
done; \
done
@echo
@echo Done.
assets-gtk2:
assets-gtk3:
recolor:
@echo "** Matching Colors"
cd ./src/gtk-3.0/gtk-common/ && ./recolor-assets.sh > /dev/null
# cd ./src/gtk-2.0/ && ./recolor-assets.sh > /dev/null
sass: gtk2 gtk3
@echo "** Generating the CSS..."
gtk2: recolor
@echo "** Generating GTK2..."
#cd ./src/gtk-2.0 && ./recolor-assets.sh
gtk3:
@echo "** Generating GTK3..."
for color in $(COLOR_VARIANTS); do \
for size in $(SIZE_VARIANTS); do \
for version in '$(OLDESTGTK)'; do \
sassc $(SASSC_OPT) src/gtk-3.0/$$version/gtk$$color$$size.{scss,css}; \
done; \
done; \
done
#gnome-shell:
# @echo "** Generating GNOME Shell..."
# for color in $(COLOR_VARIANTS); do \
# for size in $(SIZE_VARIANTS); do \
# # Skip gnome-shell 3.20 and 3.22 \
# for version in '3.24' '3.26'; do \
# sassc $(SASSC_OPT) src/gnome-shell/$$version/gnome-shell$$color$$size.{scss,css}; \
# sassc $(SASSC_OPT) src/gnome-shell/$$version/extensions/workspaces-to-dock/workspaces-to-dock.{scss,css}; \
# sassc $(SASSC_OPT) src/gnome-shell/$$version/pad-osd.{scss,css}; \
# done; \
# done; \
# done
.PHONY: all install uninstall gtk3 gtk2 sass recolor assets-gtk3 assets-gtk2 clean