Having been experimenting with archlinux on eeepc for a few months now. I've been itching to package something up for fun to see how easy/hard it would be. I've finally got a chance make a package. Here's the resulting PKGBUILD file for ttyrec

# Maintainer: Jimmy Tang <jtang@tchpc.tcd.ie>

pkgdesc="ttyrec is a tty recorder - this is not the official upstream version"
arch=('i686' 'x86_64')


build() {
  cd "$srcdir"
  msg "Connecting to GIT server...."

  if [ -d $_gitname ] ; then
    cd $_gitname && git pull origin
    msg "The local files are updated."
    git clone $_gitroot

  msg "GIT checkout done or server timeout"
  msg "Starting make..."

  rm -rf "$srcdir/$_gitname-build"
  git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build"
  cd "$srcdir/$_gitname-build"

  make CFLAGS="-O2 -Wall -DSVR4 -D_XOPEN_SOURCE=500" || return 1
  install -d $pkgdir/usr/share/doc/$pkgname $pkgdir/usr/share/man/man1 $pkgdir/usr/bin
  install -D ttyrec.1 ttyplay.1 ttytime.1 $pkgdir/usr/share/man/man1
  install -D README $pkgdir/usr/share/doc/$pkgname
  install -Dm755 ttyrec ttyplay ttytime $pkgdir/usr/bin

It's actually a butchered version of what I found inside the PKGBUILD file for ikiwiki-git. The above isn't for the official version of ttyrec, but rather a patched up verion from Joey Hess. I had stumbled on his repo for it when I was reading his blog post on termcasting and got interested in ttyrec. I can think up a few useful things to do with ttyrec already, such as replacing a user's shell with ttyrec to record their sessions to playback :)

Bookmark and Share