1 # Maintainer: Andrew Crerar <crerar@archlinux.org>
2 # Contributor: Kyle Keen <keenerd@gmail.com>
3 # Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
8 pkgdesc="Arbitrary precision console calculator"
10 url="http://www.isthe.com/chongo/tech/comp/calc/"
13 makedepends=('chrpath')
14 source=("http://www.isthe.com/chongo/src/calc/calc-$pkgver.tar.bz2")
15 b2sums=('bf16d50703293f3070aed9f7ce671a82e169c560c1ed6a744518f9d0ac9b15732a804d05d9470e79f7dd04d2fe4104dc369a20a0df83f81d0d953a44e28c6bf7')
18 cd "$srcdir/calc-$pkgver"
20 sed -i 's/${CC} ${LIBCALC_SHLIB}/${CC} ${LDFLAGS} ${LIBCALC_SHLIB}/' Makefile
21 sed -i 's/${CC} ${LIBCUSTCALC_SHLIB}/${CC} ${LDFLAGS} ${LIBCUSTCALC_SHLIB}/' custom/Makefile
25 cd "$srcdir/calc-$pkgver"
27 make USE_READLINE="-DUSE_READLINE" \
28 READLINE_LIB="-lreadline" \
29 READLINE_EXTRAS="-lhistory -lncurses" \
30 EXTRA_CFLAGS="$CPPFLAGS $CFLAGS" \
31 EXTRA_LDFLAGS="$LDFLAGS" \
38 cd "$srcdir/calc-$pkgver"
40 make T="$pkgdir" install
41 mv "$pkgdir/usr/bin/cscript" "$pkgdir/usr/share/calc/"
42 chrpath -d "$pkgdir/usr/bin/calc"