summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b703d534704828a6d7e2cf8d73bcd42de1734c9e (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
# Maintainer: Mark Wagie <mark dot wagie at tutanota dot com>
pkgname=('starlabstheme-backgrounds-git'
         'starlabstheme-extensions-git'
         'starlabstheme-font-git'
         'starlabstheme-gnome-shell-git'
         'starlabstheme-grub-git'
         'starlabstheme-gtk-git'
         'starlabstheme-icons-git'
         'starlabstheme-plymouth-git'
         'starlabstheme-session-git'
         'starlabstheme-sounds-git')
pkgbase=starlabstheme-git
pkgver=r1.4f2bcc7
pkgrel=1
pkgdesc="Star Labs GNOME Shell and GTK Theme"
arch=('any')
url="https://github.com/StarLabsLtd/StarLabsTheme"
license=('GPL')
makedepends=('git' 'meson' 'sassc')
provides=("${pkgbase%-git}")
conflicts=("${pkgbase%-git}")
source=("${pkgbase%-git}::git+https://github.com/StarLabsLtd/StarLabsTheme.git")
sha256sums=('SKIP')

pkgver() {
	printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

prepare() {
	cd "$srcdir/${pkgbase%-git}"
	git submodule init extensions/gnome-shell-extension-lockkeys
	git config submodule.gnome-shell-extension-lockkeys.url \
		"$srcdir/gnome-shell-extension-lockkeys"
	git submodule update
}

build() {

	echo '  _____ _             _           _'
	echo ' /  ___| |           | |         | |'
	echo ' \ `--.| |_ __ _ _ __| |     __ _| |__  ___'
	echo '  `--. \ __/ _` | '"'"'__| |    / _` | '"'"'_ \/ __|'
	echo ' /\__/ / || (_| | |  | |___| (_| | |_) \__ \'
	echo ' \____/ \__\__,_|_|  \_____/\__,_|_.__/|___/'
	echo
	echo '************** Star Labs Theme *************'

	cd "$srcdir/${pkgbase%-git}"
	arch-meson build
	ninja -C build
}

package_starlabstheme-backgrounds-git() {
	pkgdesc="Star Labs Desktop Wallpapers"
	provides=("${pkgname%-git}")
	conflicts=("${pkgname%-git}")

	cd "$srcdir/${pkgbase%-git}"
	DESTDIR="$pkgdir" ninja -C build install 2>&1 >> install.log

	rm -r "$pkgdir/"usr/share/{gnome-shell,glib-2.0,fonts,icons,plymouth,sounds,themes,wayland-sessions,xsessions}
	rm -r "$pkgdir/"{boot,etc}
}

package_starlabstheme-extensions-git() {
	pkgdesc="Star Labs GNOME extensions"
	depends=('dconf')
	provides=("${pkgname%-git}")
	conflicts=("${pkgname%-git}")

	cd "$srcdir/${pkgbase%-git}"
	DESTDIR="$pkgdir" ninja -C build install 2>&1 >> install.log

	rm -r "$pkgdir/"usr/share/{backgrounds,gnome-background-properties,gnome-shell/extensions/ubuntu-dock@ubuntu.com,gnome-shell/theme,gnome-shell/modes,fonts,icons,plymouth,sounds,themes,wayland-sessions,xsessions}
	rm -r "$pkgdir/"{boot,etc}
	rm -f "$pkgdir/"usr/share/glib-2.0/schemas/99_StarLabs.gschema.override
}

package_starlabstheme-font-git() {
	pkgdesc="Star Labs Font"
	depends=('fontconfig')
	provides=("${pkgname%-git}")
	conflicts=("${pkgname%-git}")

	cd "$srcdir/${pkgbase%-git}"
	DESTDIR="$pkgdir" ninja -C build install 2>&1 >> install.log

	rm -r "$pkgdir/"usr/share/{backgrounds,gnome-background-properties,gnome-shell,glib-2.0,icons,plymouth,sounds,themes,wayland-sessions,xsessions}
	rm -r "$pkgdir/"{boot,etc}
}

package_starlabstheme-gnome-shell-git() {
	pkgdesc="Star Labs GNOME Shell Theme"
	depends=('gnome-shell' 'starlabstheme-session')
	provides=("${pkgname%-git}")
	conflicts=("${pkgname%-git}")

	cd "$srcdir/${pkgbase%-git}"
	DESTDIR="$pkgdir" ninja -C build install 2>&1 >> install.log

	rm -r "$pkgdir/"usr/share/{backgrounds,gnome-background-properties,gnome-shell/extensions,gnome-shell/modes,glib-2.0,fonts,icons,plymouth,sounds,themes,wayland-sessions,xsessions}
	rm -r "$pkgdir/"{boot,etc}
}

package_starlabstheme-grub-git() {
	pkgdesc="Star Labs GRUB Theme"
	depends=('grub')
	provides=("${pkgname%-git}")
	conflicts=("${pkgname%-git}")

	cd "$srcdir/${pkgbase%-git}"
	DESTDIR="$pkgdir" ninja -C build install 2>&1 >> install.log

	sed -r 's/^&nbspi915.fastboot=1//' "$pkgdir/etc/grub.d/47_starlabs"

	rm -r "$pkgdir/"usr
}

package_starlabstheme-gtk-git() {
	pkgdesc="Star Labs GTK Theme"
	depends=('gtk3')
	optdepends=('starlabstheme-font' 'starlabstheme-icons' 'starlabstheme-sounds')
	provides=("${pkgname%-git}")
	conflicts=("${pkgname%-git}")

	cd "$srcdir/${pkgbase%-git}"
	DESTDIR="$pkgdir" ninja -C build install 2>&1 >> install.log

	rm -r "$pkgdir/"usr/share/{backgrounds,gnome-background-properties,gnome-shell,glib-2.0,fonts,icons,plymouth,sounds,wayland-sessions,xsessions}
	rm -r "$pkgdir/"{boot,etc}
}

package_starlabstheme-icons-git() {
	pkgdesc="Star Labs Icon Set & Cursor Theme"
	depends=('gtk-update-icon-cache' 'hicolor-icon-theme')
	provides=("${pkgname%-git}")
	conflicts=("${pkgname%-git}")

	cd "$srcdir/${pkgbase%-git}"
	DESTDIR="$pkgdir" ninja -C build install 2>&1 >> install.log

	rm -r "$pkgdir/"usr/share/{backgrounds,gnome-background-properties,gnome-shell,glib-2.0,fonts,plymouth,sounds,themes,wayland-sessions,xsessions}
	rm -r "$pkgdir/"{boot,etc}
}

package_starlabstheme-plymouth-git() {
	pkgdesc="Star Labs Plymouth Theme"
	depends=('plymouth')
	provides=("${pkgname%-git}")
	conflicts=("${pkgname%-git}")

	"$srcdir/${pkgbase%-git}"
	DESTDIR="$pkgdir" ninja -C build install 2>&1 >> install.log

	rm -r "$pkgdir/"usr/share/{backgrounds,gnome-background-properties,gnome-shell,glib-2.0,fonts,icons,sounds,themes,wayland-sessions,xsessions}
	rm -r "$pkgdir/"{boot,etc}
}

package_starlabstheme-session-git() {
	pkgdesc="Star Labs Session"
	depends=('dconf' 'starlabstheme-backgrounds' 'starlabstheme-gnome-shell' 'starlabstheme-gtk' 'starlabstheme-icons' 'starlabstheme-sounds')
	optdepends=('starlabstheme-extensions' 'gnome-shell-extension-appindicator' 'gnome-shell-extension-desktop-icons' 'gnome-shell-extension-dash-to-dock' 'starlabstheme-font')
	provides=("${pkgname%-git}")
	conflicts=("${pkgname%-git}")

	"$srcdir/${pkgbase%-git}"
	DESTDIR="$pkgdir" ninja -C build install 2>&1 >> install.log

	# Comment out Ubuntu-specific dconf entry
	sed -i '26,27 s/^/#/' "$pkgdir/"usr/share/glib-2.0/schemas/99_StarLabs.gschema.override

	# Replace Ubuntu Dock with Dash to Dock
	install -d $pkgdir/usr/gnome-shell/extensions/dash-to-dock@micxgx.gmail.com
	cp $pkgdir/usr/share/gnome-shell/extensions/ubuntu-dock@ubuntu.com/starlabs.css $pkgdir/usr/gnome-shell/extensions/dash-to-dock@micxgx.gmail.com/
	sed -i 's/ubuntu-dock@ubuntu.com/dash-to-dock@micxgx.gmail.com/g' "$pkgdir/"usr/share/gnome-shell/modes/starlabs.json

	# Replace Ubuntu Appindicators with AppIndicator Support
	sed -i 's/ubuntu-appindicators@ubuntu.com/appindicatorsupport@rgcjonas.gmail.com/g' "$pkgdir/"usr/share/gnome-shell/modes/starlabs.json

	rm -r "$pkgdir/"usr/share/{backgrounds,gnome-background-properties,gnome-shell/extensions/ubuntu-dock@ubuntu.com,gnome-shell/extensions/lockkeys@vaina.lt,gnome-shell/theme,fonts,icons,plymouth,sounds,themes}
	rm -r "$pkgdir/"{boot,etc}
	rm -f "$pkgdir/"usr/share/glib-2.0/schemas/org.gnome.shell.extensions.lockkeys.gschema.xml
}

package_starlabstheme-sounds-git() {
	pkgdesc="Star Labs Sound Theme"
	provides=("${pkgname%-git}")
	conflicts=("${pkgname%-git}")

	"$srcdir/${pkgbase%-git}"
	DESTDIR="$pkgdir" ninja -C build install 2>&1 >> install.log

	rm -r "$pkgdir/"usr/share/{backgrounds,gnome-background-properties,gnome-shell,glib-2.0,fonts,icons,plymouth,themes,wayland-sessions,xsessions}
	rm -r "$pkgdir/"{boot,etc}
}