nerd-fonts-hack/PKGBUILD

47 lines
2.9 KiB
Bash

# Maintainer: Yiyang Kang <kkyy%40kkyy.me>
pkgname=nerd-fonts-hack
pkgver=2.1.0
pkgrel=2
pkgdesc="Patched font Hack from the nerd-fonts library"
arch=("any")
url="https://github.com/ryanoasis/nerd-fonts"
license=('MIT')
depends=('fontconfig')
provides=('nerd-fonts-hack')
conflicts=('nerd-fonts-git' 'nerd-fonts-complete')
groups=("nerd-fonts")
_commit=ee8ddf46b9f0143ab2dc9816e9e150bf434d875e
source=(
"https://git.gensokyo.cafe/kkyy/nerd-fonts-patched-fonts/raw/commit/$_commit/Hack/Hack%20Regular%20Nerd%20Font%20Complete.ttf"
"https://git.gensokyo.cafe/kkyy/nerd-fonts-patched-fonts/raw/commit/$_commit/Hack/Hack%20Regular%20Nerd%20Font%20Complete%20Mono.ttf"
"https://git.gensokyo.cafe/kkyy/nerd-fonts-patched-fonts/raw/commit/$_commit/Hack/Hack%20Italic%20Nerd%20Font%20Complete.ttf"
"https://git.gensokyo.cafe/kkyy/nerd-fonts-patched-fonts/raw/commit/$_commit/Hack/Hack%20Italic%20Nerd%20Font%20Complete%20Mono.ttf"
"https://git.gensokyo.cafe/kkyy/nerd-fonts-patched-fonts/raw/commit/$_commit/Hack/Hack%20Bold%20Nerd%20Font%20Complete.ttf"
"https://git.gensokyo.cafe/kkyy/nerd-fonts-patched-fonts/raw/commit/$_commit/Hack/Hack%20Bold%20Nerd%20Font%20Complete%20Mono.ttf"
"https://git.gensokyo.cafe/kkyy/nerd-fonts-patched-fonts/raw/commit/$_commit/Hack/Hack%20Bold%20Italic%20Nerd%20Font%20Complete.ttf"
"https://git.gensokyo.cafe/kkyy/nerd-fonts-patched-fonts/raw/commit/$_commit/Hack/Hack%20Bold%20Italic%20Nerd%20Font%20Complete%20Mono.ttf"
"${url}/raw/v$pkgver/LICENSE"
)
b2sums=(
662bdcbf942e60572aac801d9bb1e23d5442b45863f80c87466b6767637e3706647a6711ace38407eb3977a1acd46beb6cbbd6502415d61c118073403b2799be
23b971dc647318e0e7e6d32b4b2a5da37b9620b8935ea3d3e8b39b2381f1955c47a6f3bbf80d1e4b6e86f894fe27f0a8ed1de2342758d2d5e00fb1bd8406bc22
9fe2b2644c5a7452e09adb1a6c29b40c49adaef5a80f3937d2dbb218b81e501a1ea94307bc75085ca403af4212039c8d24b03ac4d594662a38f6f5e519ed295a
c1fed857d771d15a5faa090949dec4403488ebc1f7f37461ac38f8eb34f8d48316cadcf79739695f82dd3abe2fcf60d8d805827d4988ade0b7a33f51de4e35b9
9ae1a39dad7530de5b0d930a1c877a89b9b9fd283aa96b5caaac9368ce7dd78c8f52a9732dec7cb4448919ec009970b515b175c3de1b0a49a8269e593c1a9970
dce1913ec33fc207679370f12a13ae70ab301351dbb379919f4d19adab7a57d05817a78242ccf2618bdffdc03780745481cf4550512a5b860df47b715a66a8c2
ea41d51b4e848c6ad608783520f5abbaee671444e42d44517ab1a50a70fbf31749abb1fe17b7938c78747ed9047ec0d2693da63d0cadf59b1a07340dd0dbb012
611a3706c4b66f80c019d9f674b1bd7f84d9495afeff1d2ad2551d0d11ea6c0914599698b5c09057502a7052d29366d424d560dfd8a5766a9091f9ca08216983
ece38b21e41c31a10260b2a99ea23661a945c11b5edbcb625b0e317be59050cc3bc04d72d4b36f94d89c263fd742d31b55f449057ad54a7e912cd1b472a38a84
)
package() {
for f in *.ttf; do
mv "$f" "${f//%20/ }"
done
find . -iname "*.ttf" -execdir install -Dm644 {} "$pkgdir/usr/share/fonts/TTF/{}" \;
install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}