Files
MX_Pmodule/Compiler/gtest/build

33 lines
757 B
Plaintext
Executable File

#!/usr/bin/env modbuild
pbuild::set_download_url "https://github.com/google/googletest/archive/release-1.8.1.tar.gz"
pbuild::add_to_group 'Compiler'
if (( V_MAJOR == 1 )) && (( V_MINOR <= 7 )); then
pbuild::install_docfiles \
CHANGES \
CONTRIBUTORS \
LICENSE \
README
pbuild::install() {
local -r _include_srcdir="${SRC_DIR}/include/gtest"
local -r _include_dstdir="${PREFIX}/include/gtest"
if [[ -e "${_include_dstdir}" ]]; then
chmod -R u+w "${_include_dstdir}"
fi
mkdir -p "${_include_dstdir}"
cp -rv "${_include_srcdir}"/* "${_include_dstdir}"
local -r _lib_dstdir="${PREFIX}/lib"
mkdir -p "${_lib_dstdir}"
cp -v *.a "${_lib_dstdir}"
}
else
pbuild::install_docfiles \
CONTRIBUTING.md \
LICENSE \
README.md
fi