Blame env-builder-data/build/script/packet/superlu-5.2.1.sh

6675b2
DEPS="blas-3.7.0"
6675b2
6675b2
PK_DIRNAME="SuperLU_5.2.1"
6675b2
PK_ARCHIVE="superlu_5.2.1.tar.gz"
6675b2
PK_URL="http://crd-legacy.lbl.gov/~xiaoye/SuperLU/$PK_ARCHIVE"
6675b2
99b145
source $INCLUDE_SCRIPT_DIR/inc-pkall-default.sh
6675b2
6675b2
pkbuild() {
6675b2
    cd "$BUILD_PACKET_DIR/$PK_DIRNAME"
6675b2
cf8c28
rm -f make.inc
cf8c28
cat > make.inc << EOF 	
cf8c28
SuperLUroot  = $BUILD_PACKET_DIR/$PK_DIRNAME
cf8c28
SUPERLULIB   = \$(SuperLUroot)/lib/libsuperlu.a
cf8c28
BLASDEF      = -DUSE_VENDOR_BLAS
cf8c28
BLASLIB      = \$(LDFLAGS) -lblas -lgfortran
cf8c28
TMGLIB       = libtmglib.a
cf8c28
LIBS         = \$(SUPERLULIB) \$(BLASLIB)
cf8c28
ARCH         = ${AR:-ar}
cf8c28
ARCHFLAGS    = cr
cf8c28
RANLIB       = ${RANLIB:-ranlib}
cf8c28
CC           = ${CC:-gcc}
cf8c28
CFLAGS       = -O3 -fPIC
cf8c28
NOOPTS       = -fPIC
cf8c28
FORTRAN      = ${FORTRAN:-gfortran}
cf8c28
FFLAGS       = -O2 -fPIC
cf8c28
LOADER       = \$(CC)
cf8c28
LOADOPTS     =
cf8c28
CDEFS        = -DAdd_
cf8c28
EOF
cf8c28
	
cf8c28
	cp --remove-destination "$FILES_PACKET_DIR/mc64ad.c" "$BUILD_PACKET_DIR/$PK_DIRNAME/SRC/" || return 1
cf8c28
	make lib || return 1
6675b2
}
6675b2
6675b2
pkinstall() {
6675b2
	cp --remove-destination -r "$BUILD_PACKET_DIR/$PK_DIRNAME/lib" "$INSTALL_PACKET_DIR" || return 1
cf8c28
	mkdir -p "$INSTALL_PACKET_DIR/include/superlu"
cf8c28
	cp --remove-destination $BUILD_PACKET_DIR/$PK_DIRNAME/SRC/*.h "$INSTALL_PACKET_DIR/include/superlu" || return 1
6675b2
}