1 # Maintainer: George Rawlinson <george@rawlinson.net.nz>
2 # Contributor: Severen Redwood <severen@shrike.me>
7 pkgdesc='A customisable coding font'
9 license=('MIT' 'custom:OFL')
10 makedepends=('fontforge' 'python')
11 url='https://larsenwork.com/monoid/'
12 source=("${pkgname}-${pkgver}.tar.gz::https://github.com/larsenwork/monoid/archive/${pkgver}.tar.gz"
13 "fontbuilder-python3.patch")
14 sha512sums=('2acae11b3d0a86ac1d0588de986fbcf13a83bdcb857b0eb1deaeae55615fdccbfd8f19b5618ee61abd1261c3f203cadcaa7b37f44f535a3fe462240602ab51dc'
15 '7f06b8827ed12b3070512ae58424b92a05635eefe0dee0d6314f1b92230f431e2fde5a2d70adbff324bbcb4ce70b135ccda2a6dfaaeb7b6e4219a447034f00c0')
20 # extract LICENSE from README
21 sed -n '/Monoid is dual licensed/,/OTHER DEALINGS IN THE FONT SOFTWARE./p' \
25 # patch fontbuilder script
27 patch -sp1 < "${srcdir}/fontbuilder-python3.patch"
33 # ensure python can find fontbuilder module
34 export PYTHONPATH="$(pwd)/Scripts"
36 # list of fonts to build
37 # note: Monoid-Diacritic variants are buggy, so they are skipped
40 "Source/Monoid-Bold.sfdir"
41 "Source/Monoid-Italic.sfdir"
42 "Source/Monoid-Retina.sfdir"
43 "Monoisome/Monoisome.sfdir"
47 for FONT_FILE in "${FONT_FILES[@]}"; do
48 python3 -c "import fontbuilder; fontbuilder.build('_build', '"${FONT_FILE}"');"
56 install -vDm644 _build/*.ttf -t "${pkgdir}/usr/share/fonts/TTF"
59 install -Dm644 LICENSE \
60 "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"