summaryrefslogtreecommitdiff
path: root/extra/cfitsio/PKGBUILD
blob: 2f83c56eab28ddb384c10e851d3fd30c2d3cfed9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# $Id: PKGBUILD 148037 2012-01-30 10:37:49Z eric $
# Maintainer: Andrea Scarpino <andrea@archlinux.org>
# Contributor: Tobias Powalowski <tpowa@archlinux.org>

pkgname=cfitsio
pkgver=3.290
pkgrel=1
pkgdesc="A library of C and Fortran subroutines for reading and writing data files in FITS (Flexible Image Transport System) data format"
arch=('i686' 'x86_64' 'mips64el')
url="http://heasarc.gsfc.nasa.gov/docs/software/fitsio/fitsio.html"
license=('custom')
depends=('glibc')
options=('!libtool')
source=("ftp://heasarc.gsfc.nasa.gov/software/fitsio/c/${pkgname}${pkgver/./}.tar.gz")
md5sums=('bba93808486cf5edac236a941283b3c3')

build() {
  cd "${srcdir}"/${pkgname}
  export CFLAGS="$CFLAGS -lm"
  ./configure --prefix=/usr
  make  shared 
}

check() {
  cd "${srcdir}"/${pkgname}
  make testprog
  LD_LIBRARY_PATH=. ./testprog > testprog.lis
  [[ -z $(diff testprog.lis testprog.out) ]] || return 1
  [[ -z $(cmp testprog.fit testprog.std) ]] || return 1
}

package() {
  cd "${srcdir}"/${pkgname}
  make DESTDIR="${pkgdir}" install
  install -D -m644 License.txt "${pkgdir}/usr/share/licenses/${pkgname}/License.txt"
}