melawy-plasma-desktop-theme/PKGBUILD

45 lines
1.2 KiB
Bash

# Maintainer: Valeria Fadeeva <valeria@fadeeva.me>
_gitname="$(basename $(pwd))"
pkgname=("melawy-$_gitname")
pkgver=1.3
pkgrel=1
pkgdesc="$(head -n 2 README.md | tail -n 1)"
url="https://github.com/Melawy/$_gitname"
arch=("any")
license=("AGPL3")
depends=("plasma-desktop")
optdepends=()
makedepends=("git")
backup=()
provides=("${pkgname}")
conflicts=("${pkgname}")
source=("git+$url.git")
sha256sums=("SKIP")
THEME_NAME="Melawy"
THEME_PATH1="/usr/share/plasma/desktoptheme"
THEME_PATH2="/usr/share/aurorae/themes"
THEME_PATH3="/usr/share/Kvantum"
# pkgver() {
# cd "$srcdir/$_gitname"
# printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
# }
pkgver() {
cd "$srcdir/$_gitname"
printf "1.%s" "$(git rev-list --count HEAD)"
}
package() {
install -d "$pkgdir$THEME_PATH1"
cp -vrf --no-dereference --preserve=links "$srcdir/$_gitname/$THEME_NAME" "$pkgdir$THEME_PATH1/"
install -d "$pkgdir$THEME_PATH2"
cp -vrf --no-dereference --preserve=links "$srcdir/$_gitname/aurorae/themes/$THEME_NAME-dark" "$pkgdir$THEME_PATH2/"
install -d "$pkgdir$THEME_PATH3"
cp -vrf --no-dereference --preserve=links "$srcdir/$_gitname/Kvantum/$THEME_NAME-dark" "$pkgdir$THEME_PATH3/"
}