59 lines
3.5 KiB
Python
59 lines
3.5 KiB
Python
pkgname = "material-design-icons" # this too ai gen, ye man im lazy as fuuuuuuu # ig except new part
|
|
pkgver = "4.0.0"
|
|
source = "https://github.com/githubtraining/hellogitworld.git"
|
|
builddir = f"/tmp/fempkgbuild/hellogitworld"
|
|
source_type = "git"
|
|
fembuilddir = builddir
|
|
outputdir = "/home/gabry/lfs-repo/binpkg"
|
|
manifestdir = "/home/gabry/lfs-repo/manifests"
|
|
destdir = f"{fembuilddir}/DESTDIR"
|
|
deps = ["wget"]
|
|
|
|
build = [
|
|
# Create destination dir
|
|
f"install -d {destdir}/usr/share/fonts/material-symbols",
|
|
f"cd {builddir} && mkdir fonts",
|
|
|
|
# Download classic Material Icons fonts
|
|
f"cd {builddir}/fonts && wget -O MaterialIcons-Regular.ttf "
|
|
"https://github.com/google/material-design-icons/raw/refs/heads/master/font/MaterialIcons-Regular.ttf",
|
|
f"cd {builddir}/fonts && wget -O MaterialIconsOutlined-Regular.otf "
|
|
"https://github.com/google/material-design-icons/raw/refs/heads/master/font/MaterialIconsOutlined-Regular.otf",
|
|
f"cd {builddir}/fonts && wget -O MaterialIconsRound-Regular.otf "
|
|
"https://github.com/google/material-design-icons/raw/refs/heads/master/font/MaterialIconsRound-Regular.otf",
|
|
f"cd {builddir}/fonts && wget -O MaterialIconsSharp-Regular.otf "
|
|
"https://github.com/google/material-design-icons/raw/refs/heads/master/font/MaterialIconsSharp-Regular.otf",
|
|
f"cd {builddir}/fonts && wget -O MaterialIconsTwoTone-Regular.otf "
|
|
"https://github.com/google/material-design-icons/raw/refs/heads/master/font/MaterialIconsTwoTone-Regular.otf",
|
|
|
|
# Download Material Symbols variable fonts (TTF + WOFF2)
|
|
f"cd {builddir}/fonts && wget -O MaterialSymbolsOutlined.ttf "
|
|
"https://github.com/google/material-design-icons/raw/refs/heads/master/variablefont/MaterialSymbolsOutlined%5BFILL,GRAD,opsz,wght%5D.ttf",
|
|
f"cd {builddir}/fonts && wget -O MaterialSymbolsOutlined.woff2 "
|
|
"https://github.com/google/material-design-icons/raw/refs/heads/master/variablefont/MaterialSymbolsOutlined%5BFILL,GRAD,opsz,wght%5D.woff2",
|
|
f"cd {builddir}/fonts && wget -O MaterialSymbolsRounded.ttf "
|
|
"https://github.com/google/material-design-icons/raw/refs/heads/master/variablefont/MaterialSymbolsRounded%5BFILL,GRAD,opsz,wght%5D.ttf",
|
|
f"cd {builddir}/fonts && wget -O MaterialSymbolsRounded.woff2 "
|
|
"https://github.com/google/material-design-icons/raw/refs/heads/master/variablefont/MaterialSymbolsRounded%5BFILL,GRAD,opsz,wght%5D.woff2",
|
|
f"cd {builddir}/fonts && wget -O MaterialSymbolsSharp.ttf "
|
|
"https://github.com/google/material-design-icons/raw/refs/heads/master/variablefont/MaterialSymbolsSharp%5BFILL,GRAD,opsz,wght%5D.ttf",
|
|
f"cd {builddir}/fonts && wget -O MaterialSymbolsSharp.woff2 "
|
|
"https://github.com/google/material-design-icons/raw/refs/heads/master/variablefont/MaterialSymbolsSharp%5BFILL,GRAD,opsz,wght%5D.woff2",
|
|
|
|
f"install -v -d -m755 {destdir}/usr/share/licenses/{pkgname}/",
|
|
f"wget https://raw.githubusercontent.com/google/material-design-icons/refs/heads/master/LICENSE -O {destdir}/usr/share/licenses/{pkgname}/LICENSE",
|
|
|
|
# Install fonts
|
|
f"cp -v {builddir}/fonts/* {destdir}/usr/share/fonts/material-symbols/",
|
|
|
|
# Make tarball + manifests
|
|
f"mkdir -p {outputdir} && cd {destdir} && tar --transform 's|^\\.||' -I zstd -cf {outputdir}/{pkgname}-{pkgver}.tar.zst .",
|
|
f"mkdir -p {manifestdir} && tar -tf {outputdir}/{pkgname}-{pkgver}.tar.zst | grep -v '/$' > {manifestdir}/{pkgname}.txt",
|
|
|
|
# Cleanup
|
|
f"rm -rf {builddir}"
|
|
]
|
|
|
|
triggers = [
|
|
f"cd /tmp && gtk-update-icon-cache && gtk4-update-icon-cache && fc-cache -f",
|
|
] |