mirror of
https://github.com/Pmodules/Pmodules.git
synced 2026-07-10 23:50:48 +02:00
all required tools moved to 'Tools' directory
This commit is contained in:
Executable
+58
@@ -0,0 +1,58 @@
|
||||
#!/usr/bin/env modbuild
|
||||
|
||||
# use system gcc to compile
|
||||
declare -rx CC=gcc
|
||||
|
||||
pbuild::add_to_group 'Tools'
|
||||
pbuild::set_download_url "https://amas.web.psi.ch/Downloads/$P/$P-$V.tar.bz2"
|
||||
|
||||
TCL_DIR="${PMODULES_ROOT}/Tools/Pmodules/${PMODULES_VERSION}"
|
||||
|
||||
PATH="${TCL_DIR}/bin:${PATH}"
|
||||
|
||||
pbuild::configure() {
|
||||
case ${OS} in
|
||||
Linux )
|
||||
declare -x LIBS="-lz -lpthread"
|
||||
;;
|
||||
Darwin )
|
||||
declare -x LIBS="-lz -framework CoreFoundation"
|
||||
;;
|
||||
esac
|
||||
CPPFLAGS="-DUSE_INTERP_ERRORLINE" "${SRC_DIR}"/configure \
|
||||
--prefix="${PREFIX}" \
|
||||
--exec-prefix="${PREFIX}" \
|
||||
--with-module-path="${PMODULES_ROOT}/Tools/${PMODULES_MODULEFILES_DIR}" \
|
||||
--with-tcl="${TCL_DIR}/lib" \
|
||||
--without-x \
|
||||
--disable-versioning \
|
||||
|| exit 1
|
||||
}
|
||||
|
||||
pbuild::post_install() {
|
||||
rm -v ${PREFIX}/Modules/bin/add.modules
|
||||
rm -v ${PREFIX}/Modules/bin/mkroot
|
||||
rm -rfv ${PREFIX}/Modules/modulefiles
|
||||
mv -v ${PREFIX}/Modules/share/man/man1/module.1 ${PREFIX}/share/man/man1
|
||||
mv -v ${PREFIX}/Modules/share/man/man4/modulefile.4 ${PREFIX}/share/man/man4
|
||||
rmdir ${PREFIX}/Modules/bin
|
||||
rmdir ${PREFIX}/Modules/share/man/man1
|
||||
rmdir ${PREFIX}/Modules/share/man/man4
|
||||
rmdir ${PREFIX}/Modules/share/man
|
||||
rmdir ${PREFIX}/Modules/share
|
||||
rmdir ${PREFIX}/Modules
|
||||
cp -v "${BUILD_DIR}/modulecmd" "${PREFIX}/libexec/modulecmd.bin" || exit 1
|
||||
}
|
||||
|
||||
# fake module command
|
||||
module() {
|
||||
:
|
||||
}
|
||||
|
||||
pbuild::make_all
|
||||
|
||||
# Local Variables:
|
||||
# mode: sh
|
||||
# sh-basic-offset: 8
|
||||
# tab-width: 8
|
||||
# End:
|
||||
Reference in New Issue
Block a user