[arch-commits] Commit in cmatrix/trunk (PKGBUILD cmatrix-tty cmatrix.install)

Kyle Keen kkeen at archlinux.org
Tue Nov 11 00:44:46 UTC 2014


    Date: Tuesday, November 11, 2014 @ 01:44:45
  Author: kkeen
Revision: 122329

upgpkg: cmatrix 1.2a-9

Added:
  cmatrix/trunk/cmatrix-tty
Modified:
  cmatrix/trunk/PKGBUILD
  cmatrix/trunk/cmatrix.install

-----------------+
 PKGBUILD        |   23 +++++++++++++++--------
 cmatrix-tty     |   33 +++++++++++++++++++++++++++++++++
 cmatrix.install |    5 ++++-
 3 files changed, 52 insertions(+), 9 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2014-11-10 23:36:02 UTC (rev 122328)
+++ PKGBUILD	2014-11-11 00:44:45 UTC (rev 122329)
@@ -3,15 +3,21 @@
 
 pkgname=cmatrix
 pkgver=1.2a
-pkgrel=8
+pkgrel=9
 pkgdesc="A curses-based scrolling 'Matrix'-like screen"
 arch=('i686' 'x86_64')
 url="http://www.asty.org/cmatrix/"
 license=('GPL2')
-depends=('ncurses' 'fontconfig')
+depends=('ncurses')
+makedepends=('fontconfig')
+optdepends=('fontconfig: custom font'
+            'kdb: cmatrix-tty custom font'
+            'xterm: cmatrix-tty custom font')
 install=$pkgname.install
-source=(http://www.asty.org/$pkgname/dist/$pkgname-$pkgver.tar.gz)
-md5sums=('ebfb5733104a258173a9ccf2669968a1')
+source=("http://www.asty.org/$pkgname/dist/$pkgname-$pkgver.tar.gz"
+        "cmatrix-tty")
+md5sums=('ebfb5733104a258173a9ccf2669968a1'
+         'db4371d5cb649973bfea31c2b932d260')
 
 build() {
   cd $pkgname-$pkgver
@@ -27,11 +33,12 @@
 
   make DESTDIR="$pkgdir" install
   
-  install -Dm644 mtx.pcf "$pkgdir"/usr/share/fonts/misc/mtx.pcf
-  install -Dm644 matrix.fnt "$pkgdir"/usr/share/kbd/consolefonts/matrix.fnt
-  install -Dm644 matrix.psf.gz "$pkgdir"/usr/share/kbd/consolefonts/matrix.psf.gz
+  install -Dm644 mtx.pcf "$pkgdir/usr/share/fonts/misc/mtx.pcf"
+  install -Dm644 matrix.fnt "$pkgdir/usr/share/kbd/consolefonts/matrix.fnt"
+  install -Dm644 matrix.psf.gz "$pkgdir/usr/share/kbd/consolefonts/matrix.psf.gz"
+  install -Dm755 "$srcdir/cmatrix-tty" "$pkgdir/usr/bin/cmatrix-tty"
 
   for i in AUTHORS NEWS COPYING README ChangeLog TODO INSTALL; do
-    install -Dm644 $i "$pkgdir"/usr/share/doc/$pkgname/$i
+    install -Dm644 $i "$pkgdir/usr/share/doc/$pkgname/$i"
   done
 }

Added: cmatrix-tty
===================================================================
--- cmatrix-tty	                        (rev 0)
+++ cmatrix-tty	2014-11-11 00:44:45 UTC (rev 122329)
@@ -0,0 +1,33 @@
+#!/bin/bash
+
+# a basic script for maximum pretty
+
+# X-based modes
+if [[ -n "$DISPLAY" && -x /usr/bin/aterm ]]; then
+  exec aterm -fn mtx -e cmatrix -abox
+  exit
+fi
+if [[ -n "$DISPLAY" && -x /usr/bin/xterm ]]; then
+  exec xterm -fn mtx -en iso1252 -e cmatrix -abx
+  exit
+fi
+
+# safe mode
+if [[ "$TERM" != "linux" ]]; then
+    exec cmatrix -abo
+    exit
+fi
+
+# custom font mode
+setfont matrix
+cmatrix -abol
+
+# and put the font back, if possible
+default_font=""
+if [[ -f /etc/vconsole.conf ]]; then
+    default_font="$(grep '^[ \t]*FONT' /etc/vconsole.conf | cut -d '=' -f 2)"
+fi
+if [[ -n "$default_font" ]]; then
+    setfont "$default_font"
+fi
+

Modified: cmatrix.install
===================================================================
--- cmatrix.install	2014-11-10 23:36:02 UTC (rev 122328)
+++ cmatrix.install	2014-11-11 00:44:45 UTC (rev 122329)
@@ -1,3 +1,6 @@
 post_install() {
-  fc-cache
+  if [[ -x /usr/bin/fc-cache ]]; then
+    fc-cache
+  fi
 }
+


More information about the arch-commits mailing list