summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrian Perez de Castro2015-06-13 18:28:42 +0200
committerAdrian Perez de Castro2015-06-13 18:28:42 +0200
commitc6f1c666a887b0d1be5758f498d0a4e3d032c928 (patch)
tree8c0152a18ef93577ce1b6c2e16a1f70779af334b
downloadaur-c6f1c666a887b0d1be5758f498d0a4e3d032c928.tar.gz
Initial import from my own existing AUR3 package
-rw-r--r--.SRCINFO24
-rw-r--r--PKGBUILD40
-rw-r--r--fontbuilder-python3.patch16
-rw-r--r--ttf-monoid-git.install15
4 files changed, 95 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..3434ef3d2dfe
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,24 @@
+pkgbase = ttf-monoid-git
+ pkgdesc = Open Source coding font
+ pkgver = r184.4f68767
+ pkgrel = 1
+ url = http://larsenwork.github.io/monoid/
+ install = ttf-monoid-git.install
+ arch = any
+ license = custom:MIT
+ makedepends = git
+ makedepends = fontforge
+ makedepends = python
+ depends = xorg-font-utils
+ depends = fontconfig
+ provides = ttf-mono16
+ provides = ttf-mono16-git
+ conflicts = ttf-mono16
+ conflicts = ttf-mono16-git
+ source = ttf-monoid-git::git://github.com/larsenwork/monoid.git
+ source = fontbuilder-python3.patch
+ sha512sums = SKIP
+ sha512sums = 7f06b8827ed12b3070512ae58424b92a05635eefe0dee0d6314f1b92230f431e2fde5a2d70adbff324bbcb4ce70b135ccda2a6dfaaeb7b6e4219a447034f00c0
+
+pkgname = ttf-monoid-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..d2e388b79998
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,40 @@
+# Maintainer: Adrián Pérez de Castro <aperez@igalia.com>
+pkgname='ttf-monoid-git'
+pkgdesc='Open Source coding font'
+pkgver=r184.4f68767
+pkgrel=1
+arch=('any')
+license=('custom:MIT')
+url='http://larsenwork.github.io/monoid/'
+source=("${pkgname}::git://github.com/larsenwork/monoid.git"
+ 'fontbuilder-python3.patch')
+install="${pkgname}.install"
+depends=('xorg-font-utils' 'fontconfig')
+makedepends=('git' 'fontforge' 'python')
+conflicts=('ttf-mono16' 'ttf-mono16-git')
+provides=( "${conflicts[@]}" )
+sha512sums=('SKIP'
+ '7f06b8827ed12b3070512ae58424b92a05635eefe0dee0d6314f1b92230f431e2fde5a2d70adbff324bbcb4ce70b135ccda2a6dfaaeb7b6e4219a447034f00c0')
+
+pkgver () {
+ cd "${pkgname}"
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+prepare () {
+ cd "${pkgname}"
+ patch -p1 < "${srcdir}/fontbuilder-python3.patch"
+}
+
+build () {
+ cd "${pkgname}"
+ python3 -c 'import fontbuilder; fontbuilder.build("_release", "Source", "Monoid.sfdir");'
+}
+
+package () {
+ cd "${pkgname}"
+ install -Dm644 _release/Monoid.ttf \
+ "${pkgdir}/usr/share/fonts/TTF/Monoid.ttf"
+ install -Dm644 License.txt \
+ "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}
diff --git a/fontbuilder-python3.patch b/fontbuilder-python3.patch
new file mode 100644
index 000000000000..38ee86fc43d1
--- /dev/null
+++ b/fontbuilder-python3.patch
@@ -0,0 +1,16 @@
+diff --git a/fontbuilder.py b/fontbuilder.py
+index c8d8ea5..5442246 100755
+--- a/fontbuilder.py
++++ b/fontbuilder.py
+@@ -58,9 +58,9 @@ def permutations():
+ bitmap_max = 1 << count
+
+ # Iterate over all possible permutations
+- for i in xrange(bitmap_max):
++ for i in range(bitmap_max):
+ # Map the iteration's permutations using a bitmap
+- bitmap = [i >> n & 1 for n in xrange(count)]
++ bitmap = [i >> n & 1 for n in range(count)]
+ for opts in _expand_options(bitmap):
+ yield(int(float(i)/bitmap_max*100), opts)
+
diff --git a/ttf-monoid-git.install b/ttf-monoid-git.install
new file mode 100644
index 000000000000..edc423eaa57f
--- /dev/null
+++ b/ttf-monoid-git.install
@@ -0,0 +1,15 @@
+post_install() {
+ echo "Updating font cache..."
+ fc-cache -s
+ mkfontscale /usr/share/fonts/TTF
+ mkfontdir /usr/share/fonts/TTF
+ echo "Done."
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+post_remove() {
+ post_install $1
+}