summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: ee43da3a8870511d8fd068c9cb98ad2c63c71482 (plain)
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
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
# Maintainer: Yauhen Kirylau <yawghen AT gmail.com>
# Upstream URL: https://github.com/actionless/oomox

pkgname=oomox-git
pkgver=1.4.3
pkgrel=3
pkgdesc="Graphical application for generating different color variations
of Numix and Materia (ex-Flat-Plat) themes (GTK2, GTK3),
gnome-colors and ArchDroid icon themes.
Have a hack for HiDPI in gtk2."
arch=('x86_64' 'i686')
url="https://github.com/actionless/oomox"
license=('GPLv3')
source=(
	"git+https://github.com/actionless/oomox.git#branch=master"
	"git+https://github.com/actionless/oomox-gtk-theme.git#branch=master"
	"git+https://github.com/nana-4/materia-theme.git#branch=master"
	"git+https://github.com/actionless/oomox-archdroid-icon-theme.git#branch=master"
	"git+https://github.com/actionless/oomox-gnome-colors-icon-theme.git#branch=master"
)
md5sums=(
	"SKIP"
	"SKIP"
	"SKIP"
	"SKIP"
	"SKIP"
)
depends=(
	'coreutils'
	'bash'
	'grep'
	'sed'
	'bc'
	'zip'
	'glib2'
	'gdk-pixbuf2'
	'sassc'
	'python-gobject'
	'gtk-engine-murrine'
	'gtk-engines'
	'polkit'
	'parallel'
	'optipng'
	'inkscape'
	'imagemagick'
)
makedepends=(
	'git'
)
optdepends=(
	'xorg-xrdb: for the `xresources` theme'
	'breeze-icons: more fallback icons'
	'gksu: for applying Spotify theme from GUI without polkit'
)
options=(
	'!strip'
)

pkgver() {
	cd oomox
	git describe | sed 's/^v//;s/-/+/g'
}

prepare(){
	cd "${srcdir}/oomox"
	git submodule init
	git config submodule.gtk-theme.url $srcdir/oomox-gtk-theme
	git config submodule.materia-theme.url $srcdir/materia-theme
	git config submodule.archdroid-icon-theme.url $srcdir/oomox-archdroid-icon-theme
	git config submodule.gnome-colors-icon-theme.url $srcdir/oomox-gnome-colors-icon-theme
	git submodule update
}

package() {
	mkdir -p ${pkgdir}/opt/oomox
	cd ./oomox
	make -f po.mk install

	cp -prf \
		./CREDITS \
		./LICENSE \
		./README.md \
		./colors \
		./gui.sh \
		./locale \
		./oomox_gui \
		./oomoxify.sh \
		./po \
		./scripts \
			${pkgdir}/opt/oomox

	mkdir ${pkgdir}/opt/oomox/gtk-theme
	cd ./gtk-theme
	cp -prf \
		./CHANGES \
		./CREDITS \
		./LICENSE \
		./Makefile \
		./README.md \
		./change_color.sh \
		./scripts \
		./src \
			${pkgdir}/opt/oomox/gtk-theme
	cd ..

	mkdir ${pkgdir}/opt/oomox/materia-theme
	cd ./materia-theme
	cp -prf \
		./COPYING \
		./HACKING.md \
		./README.md \
		./change_color.sh \
		./install.sh \
		./parse-sass.sh \
		./scripts \
		./src \
			${pkgdir}/opt/oomox/materia-theme
	cd ..

	mkdir ${pkgdir}/opt/oomox/archdroid-icon-theme
	cd ./archdroid-icon-theme
	cp -prf \
		./archdroid-icon-theme \
		./LICENSE \
		./README.md \
		./change_color.sh \
		./copyright \
			${pkgdir}/opt/oomox/archdroid-icon-theme
	cd ..

	mkdir ${pkgdir}/opt/oomox/gnome-colors-icon-theme
	cd ./gnome-colors-icon-theme
	cp -prf \
		./gnome-colors \
		./README.md \
		./change_color.sh \
			${pkgdir}/opt/oomox/gnome-colors-icon-theme
	cd ..

	python -O -m compileall ${pkgdir}/opt/oomox/oomox_gui
	mkdir -p ${pkgdir}/usr/bin/
	mkdir -p ${pkgdir}/usr/share/applications/


	cat > ${pkgdir}/usr/bin/oomox-gui <<EOF
#!/bin/sh
cd /opt/oomox/
exec ./gui.sh "\$@"
EOF
	chmod +x ${pkgdir}/usr/bin/oomox-gui


	cat > ${pkgdir}/usr/bin/oomox-cli <<EOF
#!/bin/sh
cd /opt/oomox/
exec ./gtk-theme/change_color.sh "\$@"
EOF
	chmod +x ${pkgdir}/usr/bin/oomox-cli


	cat > ${pkgdir}/usr/bin/oomox-materia-cli <<EOF
#!/bin/sh
cd /opt/oomox/
exec ./materia-theme/change_color.sh "\$@"
EOF
	chmod +x ${pkgdir}/usr/bin/oomox-materia-cli


	cat > ${pkgdir}/usr/bin/oomox-gnome-colors-icons-cli <<EOF
#!/bin/sh
cd /opt/oomox/
exec ./gnome-colors-icon-theme/change_color.sh "\$@"
EOF
	chmod +x ${pkgdir}/usr/bin/oomox-gnome-colors-icons-cli


	cat > ${pkgdir}/usr/bin/oomox-archdroid-icons-cli <<EOF
#!/bin/sh
cd /opt/oomox/
exec ./archdroid-icon-theme/change_color.sh "\$@"
EOF
	chmod +x ${pkgdir}/usr/bin/oomox-archdroid-icons-cli


	cat > ${pkgdir}/usr/bin/oomoxify-cli <<EOF
#!/bin/sh
cd /opt/oomox/
exec ./oomoxify.sh "\$@"
EOF
	chmod +x ${pkgdir}/usr/bin/oomoxify-cli


	cat > ${pkgdir}/usr/share/applications/oomox.desktop <<EOF
[Desktop Entry]
Name=Oomox: customize icons and GTK themes
GenericName=Oomox
Comment=Graphical application for generating different color variations of Numix theme (GTK2, GTK3), gnome-colors and ArchDroid icon themes
Exec=oomox-gui
Terminal=false
Type=Application
Icon=preferences-desktop-theme
Categories=GNOME;GTK;Settings;DesktopSettings;X-XFCE-SettingsDialog;X-XFCE-PersonalSettings;
Keywords=color;gtk;highlight;theme;widget;numix;
StartupWMClass=oomox
X-GNOME-Gettext-Domain=oomox
X-Desktop-File-Install-Version=0.22
EOF

}