updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / abipdf / PKGBUILD
blobfc2034b49c42274bc01ecd2143c693e1a83ec4c3
1 # Maintainer: Dan Serban
3 pkgname=abipdf
4 pkgver=0.1
5 pkgrel=1
6 pkgdesc="Convert .txt to .pdf"
7 arch=(any)
8 url=http://127.0.0.1/
9 license=(CC-BY-SA)
10 depends=(abiword ghostscript)
12 build()
14   mkdir -p "$pkgdir/usr/bin"
15   USRBINFILE="$pkgdir/usr/bin/abipdf"
16   echo '#!/bin/bash' > "$USRBINFILE"
17   echo '_tempfile=$(mktemp -u)' >> "$USRBINFILE"
18   echo 'abiword --to=ps --to-name="${_tempfile}" "${1}"' >> "$USRBINFILE"
19   echo 'ps2pdf "${_tempfile}" "${1}.pdf"' >> "$USRBINFILE"
20   echo 'rm "${_tempfile}"' >> "$USRBINFILE"
21   chmod +x "$USRBINFILE"