Skip to content

Instantly share code, notes, and snippets.

@raybsmith
Created May 3, 2016 19:30
Show Gist options
  • Save raybsmith/722d20dffec17c4c47282f317c653915 to your computer and use it in GitHub Desktop.
Save raybsmith/722d20dffec17c4c47282f317c653915 to your computer and use it in GitHub Desktop.
# Maintainer: Raymond Smith <raymondbarrettsmith at gmail dot com>
_pkgname=daetools
pkgname=python-${_pkgname}-svn
pkgver=566
pkgrel=1
pkgdesc="Tools in Python for solving differential algebraic equations (DAEs)"
arch=('i686' 'x86_64')
url="http://daetools.sourceforge.net"
license=('GPL3')
replaces=('daetools-svn')
provides=('python-daetools')
conflicts=('daetools' 'python2-daetools' 'python-daetools' 'python2-daetools-svn')
depends=('python' 'python-numpy' 'python-scipy' 'python-matplotlib' 'python-pyqt4')
optdepends=('python-pyqt4: use the DAE Tools gui'
'mayavi: 3D plots')
makedepends=('svn' 'python-distribute' 'lapack' 'blas' 'qt4' 'qtcreator' 'gcc-fortran'
'cmake' 'wget' 'freetype2' 'swig' 'libpng12' 'libxext')
install=python-${_pkgname}.install
#source=('svn://svn.code.sf.net/p/daetools/code/trunk')
source=('svn://svn.code.sf.net/p/daetools/code/trunk#revision=566')
sha256sums=('SKIP')
pkgver() {
cd "${SRCDEST}/trunk"
svnversion
}
build() {
cd "${srcdir}/trunk"
mkdir -p "${srcdir}/trunk/daetools-package/daetools/solibs/Linux_${CARCH}"
sed -i "s|^LIBS += -lbtf|#LIBS += -lbtf|" "${srcdir}/trunk/pySuperLU/pySuperLU.pro"
sed -i "s|vTRILINOS=12.6.1|vTRILINOS=10.12.2|" "${srcdir}/trunk/compile_libraries_linux.sh"
# sed -i "s|^\( usrlib = '/usr/lib'\)|\1\nusrlib = '/usr/lib'|" "${srcdir}/trunk/daetools-package/setup.py"
## # Copy daetools-package/daetools/solibs/Linux_x86_64 to {}/Linux_x86_64_py35
## cp -r "daetools-package/daetools/solibs/Linux_x86_64" "daetools-package/daetools/solibs/Linux_x86_64_py35"
# sh compile_libraries_linux.sh --with-python-version 3.5 all
# sh compile_linux.sh --with-python-version 3.5 all
sh compile_libraries_linux.sh --with-python-version 3.5 boost ref_blas_lapack umfpack idas superlu superlu_mt bonmin nlopt trilinos
sh compile_linux.sh --with-python-version 3.5 dae superlu superlu_mt trilinos ipopt bonmin nlopt
}
package() {
cd "${srcdir}/trunk/daetools-package"
python setup.py install --prefix=/usr --root="${pkgdir}" --optimize=1
cd "${pkgdir}"
# for r566
# Get rid of lib64 directory
mv usr/lib64/* usr/lib
rmdir usr/lib64
# </for r566>
# By removing global config, daetools will use
# ${HOME}/.daetools/daetools.cfg or default options
rm -r etc/
}
# vim:set ts=2 sw=2 et tw=0:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment