| 1 | defpkgbuild(mkfontscale, |
| 2 | #:pkgname, "mkfontscale", |
| 3 | #:pkgver, "1.2.3", |
| 4 | #:pkgrel, 2, |
| 5 | #:pkgdesc, "Scalable font index generator for X", |
| 6 | #:arch, [#:x86-64, #:aarch64], |
| 7 | #:license, "MIT", |
| 8 | #:url, "https://www.x.org/", |
| 9 | #:depends, ["libfontenc", "freetype", "zlib", "bzip2"], |
| 10 | #:makedepends, ["xorgproto"], |
| 11 | #:source, ["https://xorg.freedesktop.org/archive/individual/app/mkfontscale-1.2.3.tar.xz", "update-x11-misc-fonts.hook"], |
| 12 | #:sha256sums, [ |
| 13 | "2921cdc344f1acee04bcd6ea1e29565c1308263006e134a9ee38cf9c9d6fe75e", |
| 14 | "0ae9b28e5c63ef460ab4c847b81b36610eb0935df3b333f1f8a3f2d2d3af53e4" |
| 15 | ], |
| 16 | |
| 17 | #:build, fn() { |
| 18 | run("vinix-configure", "mkfontscale-1.2.3/configure") |
| 19 | run("make") |
| 20 | }, |
| 21 | #:check, fn() { |
| 22 | run("vinix-run", "./mkfontscale", "-v") |
| 23 | }, |
| 24 | #:package, fn() { |
| 25 | run("make", "install", string-append("DESTDIR=", pkgdir())) |
| 26 | ; Own the live index even when no bitmap fonts are installed. The hook |
| 27 | ; rebuilds it on font changes and after this package replaces the index. |
| 28 | fonts := string-append(pkgdir(), "/usr/share/fonts/X11/misc") |
| 29 | run("mkdir", "-p", fonts) |
| 30 | run("vinix-run", "./mkfontscale", "-b", "-s", "-l", fonts) |
| 31 | run("grep", "-Fx", "0", string-append(fonts, "/fonts.dir")) |
| 32 | run("install", "-Dm644", "update-x11-misc-fonts.hook", |
| 33 | string-append(pkgdir(), "/usr/share/libalpm/hooks/60-update-x11-misc-fonts.hook")) |
| 34 | run("install", "-Dm644", "mkfontscale-1.2.3/COPYING", |
| 35 | string-append(pkgdir(), "/usr/share/licenses/mkfontscale/COPYING")) |
| 36 | }) |
| 37 | |