94 lines
3.1 KiB
Bash
94 lines
3.1 KiB
Bash
|
# Maintainer: Stefano Capitani <stefano_at_manjaro_dot_org>
|
||
|
|
||
|
pkgname=manjaro-gdm-theme
|
||
|
pkgver=20190929
|
||
|
_gnome_shell_ver=1:3.34.0+152+g0fdbde910
|
||
|
_pkgrel=1
|
||
|
_theme=manjaro-gnome-theme
|
||
|
_hook=gdm-theme-maia
|
||
|
_commit=7b56487b745a5569a1d5ecf8c486598f2b8d5c02
|
||
|
_comm=2dbdf792db061a2935eb8649fddbb27af6a19da6
|
||
|
pkgrel=1
|
||
|
pkgdesc="Manjaro GDM theme"
|
||
|
arch=(any)
|
||
|
url="https://gitlab.manjaro.org/artwork/themes/$_theme"
|
||
|
license=('GPL3')
|
||
|
depends=(gnome-shell)
|
||
|
conflicts=('manjaro-gnome-maia-theme')
|
||
|
replaces=('manjaro-gnome-maia-theme')
|
||
|
source=("$_theme-$_commit.tar.gz::$url/-/archive/$_commit.tar.gz"
|
||
|
'gnome-shell-theme.gresource.xml'
|
||
|
"git+https://gitlab.gnome.org/GNOME/gnome-shell.git#commit=$_comm")
|
||
|
md5sums=('a24451c5990e95a1c9b117b0c7107495'
|
||
|
'7729b394bc480fa4882618f12d46e60e'
|
||
|
'SKIP')
|
||
|
|
||
|
pkgver() {
|
||
|
date +%Y%m%d
|
||
|
}
|
||
|
|
||
|
prepare() {
|
||
|
|
||
|
#prepare build folder
|
||
|
if [[ -d build ]]; then
|
||
|
rm -R build
|
||
|
mkdir -p build/theme
|
||
|
else mkdir -p build/theme
|
||
|
fi
|
||
|
|
||
|
#move the correct files
|
||
|
cp -f $srcdir/*.xml $srcdir/build/theme/
|
||
|
cp -f $_theme-$_commit/noise-texture.png $srcdir/build/theme/
|
||
|
|
||
|
#generate css files
|
||
|
echo "Generating .css files from gitlab sources..."
|
||
|
workdir=$srcdir/gnome-shell/data
|
||
|
cd $workdir/theme
|
||
|
sed -i '/selected_bg_color: if(\$variant /c\$selected_bg_color: if($variant == 'light', #16a085, #16a085);' gnome-shell-sass/_colors.scss
|
||
|
sassc -a gnome-shell-high-contrast.scss gnome-shell-high-contrast.css
|
||
|
sassc -a gnome-shell.scss gnome-shell.css
|
||
|
|
||
|
# move the css files
|
||
|
echo "replacing the .css files with the new ones..."
|
||
|
cp -f $srcdir/gnome-shell/data/theme/*.css $srcdir/build/theme/
|
||
|
cp -f $srcdir/gnome-shell/data/theme/*.svg $srcdir/build/theme/
|
||
|
#change colors
|
||
|
cd $srcdir/build/theme
|
||
|
|
||
|
echo "Adjusting svg colors..."
|
||
|
find . -type f -name '*.svg' -exec sed -i \
|
||
|
"s/#2c1cff/#16a085/Ig;\
|
||
|
s/#0000ff/#16a085/Ig;\
|
||
|
s/#0b2e52/#244e37/Ig;\
|
||
|
s/#1862af/#138971/Ig;\
|
||
|
s/#3465a4/#3b7666/Ig;\
|
||
|
s/#006098/#1f7a61/Ig;\
|
||
|
s/#2b73cc/#17ab8e/Ig;\
|
||
|
s/#3081e3/#24c891/Ig;\
|
||
|
s/#15539e/#1b7a61/Ig" {} \;
|
||
|
|
||
|
#compiling schemas
|
||
|
echo "compiling the files"
|
||
|
cd $srcdir/build/theme
|
||
|
glib-compile-resources gnome-shell-theme.gresource.xml
|
||
|
|
||
|
}
|
||
|
|
||
|
package() {
|
||
|
|
||
|
install -Dm644 $srcdir/build/theme/gnome-shell-theme.gresource $pkgdir/usr/share/themes/manjaro-gdm-themegnome-shell-theme.gresource
|
||
|
mkdir -p $pkgdir/usr/share/themes
|
||
|
mkdir -p $pkgdir/usr/share/themes/$pkgname
|
||
|
cp -r $srcdir/build/theme/* $pkgdir/usr/share/themes/$pkgname/
|
||
|
|
||
|
cd $_theme-$_commit
|
||
|
|
||
|
#Hook
|
||
|
install -Dm644 $srcdir/$_theme-$_commit/$_hook-install.hook $pkgdir/usr/share/libalpm/hooks/$_hook-install.hook
|
||
|
install -Dm755 $srcdir/$_theme-$_commit/$_hook-install.script $pkgdir/usr/share/libalpm/scripts/$_hook-install
|
||
|
install -Dm644 $srcdir/$_theme-$_commit/$_hook-remove.hook $pkgdir/usr/share/libalpm/hooks/$_hook-remove.hook
|
||
|
install -Dm755 $srcdir/$_theme-$_commit/$_hook-remove.script $pkgdir/usr/share/libalpm/scripts/$_hook-remove
|
||
|
install -Dm644 $srcdir/$_theme-$_commit/gdm-theme-backup.hook $pkgdir/usr/share/libalpm/hooks/gdm-theme-backup.hook
|
||
|
install -Dm755 $srcdir/$_theme-$_commit/gdm-theme-backup.script $pkgdir/usr/share/libalpm/scripts/gdm-theme-backup
|
||
|
|
||
|
}
|