Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Maintainer: L.Bryce Whitson Jr. <LWhitson2@gmail.com>
- pkgname=scotch
- pkgver=5.1.12b
- _pkgver=5.1.12
- pkgrel=3
- pkgdesc="a software package and libraries for graph, mesh and hypergraph partitioning, static mapping, and sparse matrix block ordering"
- url="http://www.labri.fr/perso/pelegrin/scotch/"
- license="custom: CeCILL-C free/libre software license"
- depends=('zlib')
- arch=('i686' 'x86_64')
- source=("http://gforge.inria.fr/frs/download.php/28977/${pkgname}_${pkgver}.tar.gz")
- md5sums=('5d912599c2521b1ecbcd8d12b68eef9c')
- build()
- {
- cd "${pkgname}_${_pkgver}/src"
- # compile both static
- if [ $CARCH == "x86_64" ]; then
- sed "s/-lz -lm -lrt/-lz -lm -lrt -lpthread/" \
- Make.inc/Makefile.inc.x86-64_pc_linux2 > Makefile.inc
- make
- sed -e "s/-lz -lm -lrt/-lz -lm -lrt -lpthread/" \
- -e "s/^CFLAGS[[:space:]]*=[[:space:]]*.*/& -DIDXSIZE64/" \
- Make.inc/Makefile.inc.i686_pc_linux2.shlib > Makefile.inc
- make
- else
- sed "s/-lz -lm -lrt/-lz -lm -lrt -lpthread/" Make.inc/Makefile.inc.i686_pc_linux2 > Makefile.inc
- make
- sed "s/-lz -lm -lrt/-lz -lm -lrt -lpthread/" Make.inc/Makefile.inc.i686_pc_linux2.shlib > Makefile.inc
- make
- fi
- }
- package()
- {
- cd "${pkgname}_${_pkgver}"
- mkdir -p "${pkgdir}"/usr/{include,share/doc}
- local _prog _mp
- for _prog in bin/*; do
- install -Dm755 ${_prog} "${pkgdir}"/usr/bin/scotch_${_prog#*/}
- done
- #mapage install, creating symlinks for renamed binaries
- for _mp in man/man1/* ; do
- install -Dm644 $_mp "${pkgdir}"/usr/share/man/man1/${_mp##*/}
- ln -s ${_mp##*/}.gz "${pkgdir}"/usr/share/man/man1/scotch_${_mp##*/}.gz
- done
- cp -r lib "${pkgdir}"/usr
- cp -r include "${pkgdir}"/usr/include/${pkgname}
- cp -r doc "${pkgdir}"/usr/share/doc/${pkgname}
- install -Dm644 doc/CeCILL-C_V1-en.txt "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement