Advertisement
mortbauer

new PKGBUILD for med

Jun 11th, 2013
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.02 KB | None | 0 0
  1. # Maintainer: Michele Mocciola <mickele>
  2. # Contributor: Brice Méalier <mealier_brice@yahoo.fr>
  3. # Modified by: César Vecchio <cesar UNDERSTRIKE vecchio AT yahoo DOT com>
  4. # Modified by: Martin Ortbauer <mortbauer@gmail.com>
  5.  
  6. pkgname=med
  7. pkgver=3.0.6
  8. pkgrel=1
  9. pkgdesc="MED stands for Modelisation et Echanges de Donnees, i.e. Data Modelization and Exchanges - MED is code-aster exchange module linked to hdf5"
  10. url="http://www.code-aster.org/outils/med/"
  11. license="LGPL"
  12. depends=('hdf5' 'zlib')
  13. makedepends=('gcc-fortran' 'coreutils')
  14. provides=()
  15. conflicts=('med_fichier')
  16. replaces=('med_fichier')
  17. backup=()
  18. arch=('i686' 'x86_64')
  19. source=("http://files.salome-platform.org/Salome/other/${pkgname}-${pkgver}.tar.gz")
  20. md5sums=('2b825c78d4d283be3f36b2042ff301b0')
  21.  
  22. build() {
  23.   if [ "$CARCH" = "x86_64" ]; then
  24.     export FFLAGS="-fopenmp -fPIC -fdefault-double-8 -fdefault-integer-8 -fdefault-real-8 -ffixed-line-length-0 ${CFLAGS}"
  25.     export FCFLAGS="-fopenmp -fPIC -fdefault-double-8 -fdefault-integer-8 -fdefault-real-8 -ffixed-line-length-0 ${CFLAGS}"
  26.     export CPPFLAGS="-DHAVE_F77INT64 ${CPPFLAGS}"
  27.   else # i686
  28.     export FFLAGS="-fopenmp -fPIC -ffixed-line-length-0 ${CFLAGS}"
  29.     export FCFLAGS="-fopenmp -fPIC -ffixed-line-length-0 ${CFLAGS}"
  30.   fi
  31.  
  32.   cd ${srcdir}/${pkgname}-${pkgver}_SRC || return 1
  33.  
  34.   ./configure --with-f90=gfortran --prefix=/usr --datadir=/usr/share/med || return 1
  35.   make || return 1
  36. }
  37.  
  38. package() {
  39.   cd ${srcdir}/${pkgname}-${pkgver}_SRC || return 1
  40.  
  41.   make DESTDIR=${pkgdir} install || return 1
  42.   # now move the testprograms to share, we don't want all the stuff in the bindir
  43.   cp -dpr --no-preserve=ownership ${pkgdir}/usr/bin/testc ${pkgdir}/usr/share/med/testc
  44.   cp -dpr --no-preserve=ownership ${pkgdir}/usr/bin/testf ${pkgdir}/usr/share/med/
  45.   cp -dpr --no-preserve=ownership ${pkgdir}/usr/bin/unittests ${pkgdir}/usr/share/med/
  46.   cp -dpr --no-preserve=ownership ${pkgdir}/usr/bin/usescases ${pkgdir}/usr/share/med/
  47.   rm -r ${pkgdir}/usr/bin/{usescases,unittests,testf,testc}
  48. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement