aports/data/gitea-theme/APKBUILD

38 lines
1.1 KiB
Plaintext

# Contributor: Alex Denes <caskd@redxen.eu>
# Maintainer: Alex Denes <caskd@redxen.eu>
. ../APKBUILD-data.template
pkgver=2021.06.01.03
pkgrel=0
makedepends="imagemagick"
source="logo.svg"
_customroot="/usr/share/gitea/custom"
_rx_installdir="$_customroot/public/img"
_rx_fperm=444 # Public, static resources
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() {
rx_install logo-120.png gitea-sm.png
rx_install logo-180.png favicon.png
rx_install logo-180.png apple-touch-icon.png
rx_install logo-192.png gitea-192.png
rx_install logo-512.png gitea-512.png
rx_install logo-880.png gitea-lg.png
rx_install logo.svg logo.svg
rx_install logo.svg favicon.svg
rx_install logo.svg gitea-safari.svg
}
sha512sums="
d706ce4edaeccf6fbcea779a55046a20af136a3b9235e35f84c41e6f0aa7ddcae8fa3568d87e8d2f8be4f799c7cfd9f8b4b0ac653c0b4687d498eda25fc3864b logo.svg
"