diff options
author | D3SOX | 2020-12-29 15:54:41 +0100 |
---|---|---|
committer | D3SOX | 2020-12-29 15:54:41 +0100 |
commit | e312615809ae8365a19f4d8b45340e517e3c78a1 (patch) | |
tree | 83f93c9e1783f3f6ce267dcc82f7be431b9be8e8 /PKGBUILD | |
download | aur-e312615809ae8365a19f4d8b45340e517e3c78a1.tar.gz |
initial commit
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..22011a8815fc --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,70 @@ +# Maintainer: Helder Bertoldo <helder.bertoldo@gmail.com> + +_gitname=kora +_author=bikass +pkgname=kora-icon-theme-git +pkgver=r543.949ea18 +pkgrel=1 +pkgdesc="Kora icon theme for GNU/Linux os" +arch=("any") +url="https://github.com/${_author}/${_gitname}" +license=("GPL3") +depends=("gtk-update-icon-cache") +optdepends=( + "hicolor-icon-theme: fallback Freedesktop.org Hicolor icon theme" + "breeze-icons: fallback Breeze icon theme for Plasma Desktop" + "gnome-icon-theme: fallback Gnome icon theme for Gnome Desktop") +makedepends=("git") +provides=("kora-icon-theme") +conflicts=("kora-icon-theme") +install="$pkgname.install" +source=("git+${url}.git") +md5sums=("SKIP") + +_iconpath=usr/share/icons +_iconcache=icon-theme.cache +_iconnewcachescript=create-new-icon-theme.cache.sh + +pkgver(){ + cd "${_gitname}" + ( set -o pipefail + git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' || + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" + ) +} + +package() { + cd "$srcdir/kora" + + # Delete useless files from source folder + rm -f "kora/$_iconnewcachescript" + rm -f "kora/$_iconcache" + rm -f "kora-light/$_iconnewcachescript" + rm -f "kora-light/$_iconcache" + rm -f "kora-light-panel/$_iconnewcachescript" + rm -f "kora-light-panel/$_iconcache" + rm -f "kora-pgrey/$_iconnewcachescript" + rm -f "kora-pgrey/$_iconcache" + + install -dm755 "$pkgdir/$_iconpath" + install -dm755 "$pkgdir/usr/share/licenses/$pkgname" + + # The following --no-preserve=mode option is necessary since the creator works with + # the theme locally and he messed with modes in the past making some icons unreadable + # and some directories not executable if installed system wide while he didn't notice + # any issue because he installed the theme under the local icon folder on his system. + cp -dr --no-preserve=mode "kora" "$pkgdir/$_iconpath/kora" + cp -dr --no-preserve=mode "kora-light" "$pkgdir/$_iconpath/kora-light" + cp -dr --no-preserve=mode "kora-light-panel" "$pkgdir/$_iconpath/kora-light-panel" + cp -dr --no-preserve=mode "kora-pgrey" "$pkgdir/$_iconpath/kora-pgrey" + + # Create empty icon cache files, they will be filled during post_install and + # post_upgrade scripts + touch -a "$pkgdir/$_iconpath/kora/$_iconcache" + touch -a "$pkgdir/$_iconpath/kora-light/$_iconcache" + touch -a "$pkgdir/$_iconpath/kora-light-panel/$_iconcache" + touch -a "$pkgdir/$_iconpath/kora-pgrey/$_iconcache" + + install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE" +} + |