archrelease: copy trunk to community-any
[ArchLinux/community.git] / calc / trunk / PKGBUILD
blob4fafb9f88cfac56456f9ad25528fd50b8c3700a6
1 # Maintainer: Andrew Crerar <crerar@archlinux.org>
2 # Contributor: Kyle Keen <keenerd@gmail.com>
3 # Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
5 pkgname=calc
6 pkgver=2.14.1.5
7 pkgrel=1
8 pkgdesc="Arbitrary precision console calculator"
9 arch=('x86_64')
10 url="http://www.isthe.com/chongo/tech/comp/calc/"
11 license=('GPL')
12 depends=('readline')
13 makedepends=('chrpath')
14 source=("http://www.isthe.com/chongo/src/calc/calc-$pkgver.tar.bz2")
15 b2sums=('bf16d50703293f3070aed9f7ce671a82e169c560c1ed6a744518f9d0ac9b15732a804d05d9470e79f7dd04d2fe4104dc369a20a0df83f81d0d953a44e28c6bf7')
17 prepare() {
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
24 build() {
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" \
32        ARCH_CFLAGS='' \
33        LD_SHARE='' \
34        DEBUG=''
37 package() {
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"