# Maintainer: Antonio Rojas # Contributor: Andrea Scarpino # Contributor: Tobias Powalowski pkgname=cfitsio pkgver=4.2.0 pkgrel=1 epoch=1 pkgdesc='A library of C and Fortran subroutines for reading and writing data files in FITS (Flexible Image Transport System) data format' arch=(x86_64) url='https://heasarc.gsfc.nasa.gov/fitsio/' license=(custom) depends=(curl) source=(https://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/$pkgname-$pkgver.tar.gz) sha256sums=('eba53d1b3f6e345632bb09a7b752ec7ced3d63ec5153a848380f3880c5d61889') prepare() { cd $pkgname-$pkgver sed -e 's|LDFLAGS=.*|LDFLAGS="$LDFLAGS"|g' -i configure.in # Fix LDFLAGS autoreconf -vi } build() { cd $pkgname-$pkgver ./configure --prefix=/usr --enable-reentrant make shared make utils } check() { cd $pkgname-$pkgver LD_LIBRARY_PATH=. ./testprog > testprog.lis [[ -z $(diff testprog.lis testprog.out) ]] || return 1 [[ -z $(cmp testprog.fit testprog.std) ]] || return 1 } package() { cd $pkgname-$pkgver make DESTDIR="$pkgdir" install install -D -m644 License.txt \ "$pkgdir"/usr/share/licenses/$pkgname/LICENSE # Fix conflicts with ccfits and smem rm "$pkgdir"/usr/bin/{cookbook,smem,testprog} }