diff options
Diffstat (limited to 'community/libcgns')
-rw-r--r-- | community/libcgns/PKGBUILD | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/community/libcgns/PKGBUILD b/community/libcgns/PKGBUILD new file mode 100644 index 000000000..02f225b6a --- /dev/null +++ b/community/libcgns/PKGBUILD @@ -0,0 +1,50 @@ +# Maintainer: Thomas Dziedzic < gostrc at gmail > +# Contributor: Klimov Max <cleemmi@gmail.com> + +pkgname=libcgns +_basever=3.1.3 +_relver=3 +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') +makedepends=('cmake') +source=("http://downloads.sourceforge.net/project/cgns/cgnslib_${_basever:0:3}/cgnslib_${_basever}-${_relver}.tar.gz") +md5sums=('8d19e0c69779d7ea74b1731e09a96b9d') + +# 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 +} |