# Maintainer: Thomas Dziedzic < gostrc at gmail > # Contributor: Klimov Max pkgname=libcgns _basever=3.1.3 _relver=4 pkgver=${_basever}.${_relver} pkgrel=1 pkgdesc='General purpose library for the storage and retrieval of computational fluid dynamics analysis data by CGNS standard' arch=('i686' 'x86_64') url='http://www.cgns.org' license=('custom') conflicts=('libcgns2') makedepends=('cmake') source=("http://downloads.sourceforge.net/project/cgns/cgnslib_${_basever:0:3}/cgnslib_${_basever}-${_relver}.tar.gz") md5sums=('442bba32b576f3429cbd086af43fd4ae') # need to tell cmake when to build 64bit version [[ "$CARCH" == "i686" ]] && _64bits=OFF [[ "$CARCH" == "x86_64" ]] && _64bits=ON build() { mkdir build cd build cmake \ -DCMAKE_INSTALL_PREFIX:PATH=/usr \ -DCMAKE_SKIP_RPATH:BOOL=ON \ -DENABLE_64BIT:BOOL=${_64bits} \ -DENABLE_TESTS:BOOL=ON \ ../cgnslib_${_basever} make } check() { cd build make test } package() { cd build make DESTDIR=${pkgdir} install # install license install -d ${pkgdir}/usr/share/licenses/libcgns install -m644 ${srcdir}/cgnslib_${_basever}/license.txt \ ${pkgdir}/usr/share/licenses/libcgns }