aports/data/gitea-theme/APKBUILD
2021-01-16 15:25:33 +00:00

45 lines
1.9 KiB
Plaintext

# Contributor: Alex Denes <caskd@redxen.eu>
# Maintainer: Alex Denes <caskd@redxen.eu>
pkgname=redxen-data-gitea-theme
pkgver=2021.01.16
pkgrel=0
pkgdesc="Gitea customization files"
url="https://git.redxen.eu/RedXen"
arch="noarch"
license="none"
depeds="gitea-redxen-config"
makedepends="imagemagick"
_commit="bcbbfa30bbdecdeb6223248b4aae91ba17e6adf2"
options="!check" # No checks possible
source="
logo.svg
$pkgname-$_commit.tar.gz::https://git.redxen.eu/RedXen/gitea-theme/archive/$_commit.tar.gz
"
builddir="$srcdir"
_customroot="usr/share/gitea/custom"
build() {
sizes="120 180 192 512 880"
for i in $sizes; do
msg "Scaling svg to $i"
magick -size "$i"x"$i" logo.svg \( +clone -threshold 101% -fill white -draw 'circle %[fx:int(w/2)],%[fx:int(h/2)] %[fx:int(w/2)],%[fx:80+int(h/2)]' \) -channel-fx '| gray=>alpha' logo-"$i".png
done
}
package() {
install -Dm644 logo-120.png "$pkgdir"/"$_customroot"/public/img/gitea-sm.png
install -Dm644 logo-180.png "$pkgdir"/"$_customroot"/public/img/favicon.png
install -Dm644 logo-180.png "$pkgdir"/"$_customroot"/public/img/apple-touch-icon.png
install -Dm644 logo-192.png "$pkgdir"/"$_customroot"/public/img/gitea-192.png
install -Dm644 logo-512.png "$pkgdir"/"$_customroot"/public/img/gitea-512.png
install -Dm644 logo-880.png "$pkgdir"/"$_customroot"/public/img/gitea-lg.png
install -Dm644 logo.svg "$pkgdir"/"$_customroot"/public/img/favicon.svg
install -Dm644 logo.svg "$pkgdir"/"$_customroot"/public/img/gitea-safari.svg
install -Dm644 gitea-theme/redxen.css "$pkgdir"/"$_customroot"/public/css/theme-redxen.css
}
sha512sums="d706ce4edaeccf6fbcea779a55046a20af136a3b9235e35f84c41e6f0aa7ddcae8fa3568d87e8d2f8be4f799c7cfd9f8b4b0ac653c0b4687d498eda25fc3864b logo.svg
a3799fe12ccf6950cac4dce0e44253a2d1cb2e0c25d7dbabb72887b0610220499241e8f27c73f1278047f6ce8af4af25782ca16c359733918bc596dfd796a48b redxen-data-gitea-theme-bcbbfa30bbdecdeb6223248b4aae91ba17e6adf2.tar.gz"