-
Notifications
You must be signed in to change notification settings - Fork 0
/
plasma_themes.mk
170 lines (160 loc) · 6.8 KB
/
plasma_themes.mk
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
%-Plasma-Themes:
rm -rf ./$@
git clone --depth 1 https://github.com/L4ki/[email protected]
ls $@
%-kde_all: % %-Plasma-Themes
echo "Packaging $@..."
rm -rf $@
mkdir -p $@/usr/share/plasma/desktoptheme/
if [[ -d $<-Plasma-Themes/$<\ Plasma\ Themes ]]; then\
cp -r ./$<-Plasma-Themes/$<\ Plasma\ Themes/* $@/usr/share/plasma/desktoptheme/;\
fi
if [[ -d $<-Plasma-Themes/$<-Plasma-Themes ]]; then\
cp -r ./$<-Plasma-Themes/$<-Plasma-Themes/* $@/usr/share/plasma/desktoptheme/;\
fi
if [[ -d $<-Plasma-Themes/$<\ Global\ Themes ]]; then\
cp -r ./$<-Plasma-Themes/$<\ Global\ Themes/* $@/usr/share/plasma/desktoptheme/;\
fi
if [[ -d $<-Plasma-Themes/$<-Global-6 ]]; then\
cp -r ./$<-Plasma-Themes/$<-Global-6/* $@/usr/share/plasma/desktoptheme/;\
fi
mkdir -p $@/usr/share/plasma/look-and-feel/
if [[ -d $<-Plasma-Themes/$<\ Splshscreens ]]; then\
cp -r ./$<-Plasma-Themes/$<\ Splshscreens/* $@/usr/share/plasma/look-and-feel/;\
fi
if [[ -d $<-Plasma-Themes/$<\ SDDM\ Themes ]]; then\
mkdir -p $@/usr/share/sddm/themes/;\
cp -r ./$<-Plasma-Themes/$<\ SDDM\ Themes/* $@/usr/share/sddm/themes/;\
fi
mkdir -p $@/usr/share/aurorae/themes/
if [[ -d $<-Plasma-Themes/$<\ Window\ Decorations ]]; then\
cp -r ./$<-Plasma-Themes/$<\ Window\ Decorations/* $@/usr/share/aurorae/themes/;\
fi
if [[ -d $<-Plasma-Themes/$<\ Windows\ Decorations ]]; then\
cp -r ./$<-Plasma-Themes/$<\ Windows\ Decorations/* $@/usr/share/aurorae/themes/;\
fi
if [[ -d $<-Plasma-Themes/Window\ Decorations\ For\ Plasma\ 6 ]]; then\
cp -r ./$<-Plasma-Themes/Window\ Decorations\ For\ Plasma\ 6/* $@/usr/share/aurorae/themes/;\
fi
if [[ -d $<-Plasma-Themes/$<\ Color\ Schemes ]]; then\
mkdir -p $@/usr/share/color-schemes/;\
cp -r ./$<-Plasma-Themes/$<\ Color\ Schemes/* $@/usr/share/color-schemes/;\
fi
mkdir -p $@/DEBIAN
cp kde_control $@/DEBIAN/control
sed -i "s/%package%/\l$</g" $@/DEBIAN/control
sed -i "s/%name%/$</g" $@/DEBIAN/control
sed -i "s/%version%/$$(cat $<)/g" $@/DEBIAN/control
%-gtk-theme_all: % %-Plasma-Themes
echo "Packaging $@..."
rm -rf $@
mkdir -p $@/usr/share/themes/
if [[ -d $<-Plasma-Themes/$<\ GTK\ Themes ]]; then\
cp -r ./$<-Plasma-Themes/$<\ GTK\ Themes/* $@/usr/share/themes/;\
fi
if [[ -d $<-Plasma-Themes/$<-GTK-Themes ]]; then\
cp -r ./$<-Plasma-Themes/$<-GTK-Themes/* $@/usr/share/themes/;\
fi
if [[ -d $<-Plasma-Themes/$<-GTK ]]; then\
cp -r ./$<-Plasma-Themes/$<-GTK/* $@/usr/share/themes/;\
fi
if [[ -f $@/usr/share/themes/settings.ini ]]; then\
mkdir $@/usr/share/themes/$<-GTK;\
mv $@/usr/share/themes/assets $@/usr/share/themes/$<-GTK || true;\
mv $@/usr/share/themes/gtk-2.0 $@/usr/share/themes/$<-GTK || true;\
mv $@/usr/share/themes/gtk-3.0 $@/usr/share/themes/$<-GTK || true;\
mv $@/usr/share/themes/gtk-4.0 $@/usr/share/themes/$<-GTK || true;\
mv $@/usr/share/themes/index.theme $@/usr/share/themes/$<-GTK || true;\
mv $@/usr/share/themes/settings.ini $@/usr/share/themes/$<-GTK || true;\
fi
if [[ -f $@/usr/share/themes/Text\ File.txt ]]; then\
rm $@/usr/share/themes/Text\ File.txt;\
fi
mkdir -p $@/DEBIAN
cp gtk-theme_control $@/DEBIAN/control
sed -i "s/%package%/\l$</g" $@/DEBIAN/control
sed -i "s/%name%/$</g" $@/DEBIAN/control
sed -i "s/%version%/$$(cat $<)/g" $@/DEBIAN/control
$(REPO)/%-gtk-theme_all.deb: %-gtk-theme_all
-rm $@ &> /dev/null
if [[ ! -z "$$( ls -A $</usr/share/themes/ )" ]]; then\
dpkg-deb --build $<;\
mv $<.deb $(REPO);\
fi
%-icon-theme_all: % %-Plasma-Themes
echo "Packaging $@..."
rm -rf $@
mkdir -p $@/usr/share/icons/
if [[ -d $<-Plasma-Themes/$<\ Icons\ Themes ]]; then\
cp -r ./$<-Plasma-Themes/$<\ Icons\ Themes/* $@/usr/share/icons/;\
fi
if [[ -d $<-Plasma-Themes/$<\ Icon\ Themes ]]; then\
cp -r ./$<-Plasma-Themes/$<\ Icon\ Themes/* $@/usr/share/icons/;\
fi
if [[ -d $<-Plasma-Themes/$<-Icon-Themes ]]; then\
cp -r ./$<-Plasma-Themes/$<-Icon-Themes/* $@/usr/share/icons/;\
fi
if [[ -d $<-Plasma-Themes/$<-Icons ]]; then\
cp -r ./$<-Plasma-Themes/$<-Icons/* $@/usr/share/icons/;\
fi
if [[ -f $@/usr/share/icons/Text\ File.txt ]]; then\
rm $@/usr/share/icons/Text\ File.txt;\
fi
if [[ -f $@/usr/share/icons/index.theme ]]; then\
mkdir $@/usr/share/icons/$<;\
mv $@/usr/share/icons/16x16 $@/usr/share/icons/$< || true;\
mv $@/usr/share/icons/22x22 $@/usr/share/icons/$< || true;\
mv $@/usr/share/icons/8x8 $@/usr/share/icons/$< || true;\
mv $@/usr/share/icons/actions $@/usr/share/icons/$< || true;\
mv $@/usr/share/icons/animations $@/usr/share/icons/$< || true;\
mv $@/usr/share/icons/applets $@/usr/share/icons/$< || true;\
mv $@/usr/share/icons/apps $@/usr/share/icons/$< || true;\
mv $@/usr/share/icons/categories $@/usr/share/icons/$< || true;\
mv $@/usr/share/icons/devices $@/usr/share/icons/$< || true;\
mv $@/usr/share/icons/emblems $@/usr/share/icons/$< || true;\
mv $@/usr/share/icons/emotes $@/usr/share/icons/$< || true;\
mv $@/usr/share/icons/mimetypes $@/usr/share/icons/$< || true;\
mv $@/usr/share/icons/places $@/usr/share/icons/$< || true;\
mv $@/usr/share/icons/preferences $@/usr/share/icons/$< || true;\
mv $@/usr/share/icons/status $@/usr/share/icons/$< || true;\
mv $@/usr/share/icons/icon-theme.cache $@/usr/share/icons/$< || true;\
mv $@/usr/share/icons/index.theme $@/usr/share/icons/$< || true;\
fi
mkdir -p $@/DEBIAN
cp icon-theme_control $@/DEBIAN/control
sed -i "s/%package%/\l$</g" $@/DEBIAN/control
sed -i "s/%name%/$</g" $@/DEBIAN/control
sed -i "s/%version%/$$(cat $<)/g" $@/DEBIAN/control
$(REPO)/%-icon-theme_all.deb: %-icon-theme_all
-rm $@ &> /dev/null
if [[ ! -z "$$( ls -A $</usr/share/icons/ )" ]]; then\
dpkg-deb --build $<;\
mv $<.deb $(REPO);\
fi
%-wallpapers_all: % %-Plasma-Themes
echo "Packaging $@..."
rm -rf $@
mkdir -p $@/usr/share/backgrounds/
if [[ -d $<-Plasma-Themes/$<\ Wallpapers ]]; then\
cp -r ./$<-Plasma-Themes/$<\ Wallpapers/* $@/usr/share/backgrounds/;\
fi
if [[ -d $<-Plasma-Themes/$<-Wallpapers ]]; then\
cp -r ./$<-Plasma-Themes/$<-Wallpapers/* $@/usr/share/backgrounds/;\
fi
mkdir -p $@/DEBIAN
cp wallpaper_control $@/DEBIAN/control
sed -i "s/%package%/\l$</g" $@/DEBIAN/control
sed -i "s/%name%/$</g" $@/DEBIAN/control
sed -i "s/%version%/$$(cat $<)/g" $@/DEBIAN/control
$(REPO)/%-wallpapers_all.deb: %-wallpapers_all
-rm $@ &> /dev/null
if [[ ! -z "$$( ls -A $</usr/share/backgrounds/ )" ]]; then\
dpkg-deb --build $<;\
mv $<.deb $(REPO);\
fi
THEME_TARGETS=Infinity_themes Wings_themes Relax_themes Cool_themes Gradient_themes Flight_themes Vivid_themes Colorful_themes \
Magna_themes Gently-Color_themes Bluish_themes Silvery_themes Viola_themes Vortex_themes Aretha_themes \
Pax_themes Shadows_themes Fancy_themes Desert_themes Bonny_themes Mega_themes
$(THEME_TARGETS):: %_themes: $(REPO)/%-kde_all.deb $(REPO)/%-icon-theme_all.deb \
$(REPO)/%-wallpapers_all.deb $(REPO)/%-gtk-theme_all.deb
plasma_theme_set: $(THEME_TARGETS)