summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorGeorge Rawlinson2021-03-23 06:44:18 +0000
committerGeorge Rawlinson2021-03-23 06:44:18 +0000
commit40bd2d55fe32becbfb73b9200d17a8281a03d8e5 (patch)
tree97e3d3552b66b8624b527586fb91e4f7f2a200f1 /PKGBUILD
parent6e6085813d7201003646f36c013cde49b69f8f00 (diff)
downloadaur-ttf-monoid.tar.gz
upgpkg: ttf-monoid 0.61-6
add ttf-monoisome to package
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD40
1 files changed, 30 insertions, 10 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 71d43827e3e4..4960474f7851 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,43 +3,63 @@
pkgname='ttf-monoid'
pkgver=0.61
-pkgrel=5
+pkgrel=6
pkgdesc='A customisable coding font'
arch=('any')
license=('MIT' 'custom:OFL')
depends=('fontconfig')
makedepends=('fontforge' 'python')
-url='http://larsenwork.com/monoid/'
-source=("${pkgname}-${pkgver}.tar.gz::https://github.com/larsenwork/monoid/archive/${pkgver}.tar.gz"
-'fontbuilder-python3.patch')
+url='https://github.com/larsenwork/monoid'
+source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/${pkgver}.tar.gz"
+ "fontbuilder-python3.patch")
sha512sums=('2acae11b3d0a86ac1d0588de986fbcf13a83bdcb857b0eb1deaeae55615fdccbfd8f19b5618ee61abd1261c3f203cadcaa7b37f44f535a3fe462240602ab51dc'
'7f06b8827ed12b3070512ae58424b92a05635eefe0dee0d6314f1b92230f431e2fde5a2d70adbff324bbcb4ce70b135ccda2a6dfaaeb7b6e4219a447034f00c0')
prepare () {
- # Create LICENSE file
cd "monoid-${pkgver}"
+
+ # extract LICENSE from README
sed -n '/Monoid is dual licensed/,/OTHER DEALINGS IN THE FONT SOFTWARE./p' \
'Readme.md' > \
'LICENSE'
- # Patch fontbuilder script
+ # patch fontbuilder script
cd "Scripts"
patch -sp1 < "${srcdir}/fontbuilder-python3.patch"
}
build () {
cd "monoid-${pkgver}"
+
+ # ensure python can find fontbuilder module
export PYTHONPATH="$(pwd)/Scripts"
- python3 -c 'import fontbuilder; fontbuilder.build("_build", "Source/Monoid.sfdir");'
- python3 -c 'import fontbuilder; fontbuilder.build("_build", "Source/Monoid-Bold.sfdir");'
- python3 -c 'import fontbuilder; fontbuilder.build("_build", "Source/Monoid-Italic.sfdir");'
- python3 -c 'import fontbuilder; fontbuilder.build("_build", "Source/Monoid-Retina.sfdir");'
+
+ # list of fonts to build
+ # note: Monoid-Diacritic variants are buggy, so they are skipped
+ FONT_FILES=(
+ "Source/Monoid.sfdir"
+ "Source/Monoid-Bold.sfdir"
+ "Source/Monoid-Italic.sfdir"
+ "Source/Monoid-Retina.sfdir"
+ "Monoisome/Monoisome.sfdir"
+ )
+
+ # build fonts
+ for FONT_FILE in "${FONT_FILES[@]}"; do
+ python3 -c "import fontbuilder; fontbuilder.build('_build', '"${FONT_FILE}"');"
+ done
}
package () {
cd "monoid-${pkgver}"
+
+ # create directories
install -dm755 "${pkgdir}/usr/share/fonts/TTF"
+
+ # fonts
install -m644 _build/*.ttf "${pkgdir}/usr/share/fonts/TTF"
+
+ # license
install -Dm644 LICENSE \
"${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}