Files
gsell 04d6047cd0 move helper binaries to from sbin to libexec
- remove installed header files etc
- add substitution for @BASH@, @MODULECMD@, @MODMANANGE@
2021-03-17 17:58:54 +01:00

55 lines
1.2 KiB
Python
Executable File
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/usr/bin/env modbuild
set -x
pbuild::set_download_url "http://frodo.looijaard.name/system/files/software/getopt/getopt-1.1.6.tar.gz"
pbuild::compile_in_sourcetree
pbuild::pre_prep_Linux() {
pbuild::add_patch "Makefile.patch"
}
pbuild::configure() {
:
}
pbuild::compile() {
declare -x C_INCLUDE_PATH="${PREFIX}/include"
declare -x LIBRARY_PATH="${PREFIX}/lib"
case ${OS} in
Linux )
declare -x C_INCLUDE_PATH="${PREFIX}/include"
declare -x LIBRARY_PATH="${PREFIX}/lib"
declare -x LDFLAGS="-lintl -L${PREFIX}/lib"
;;
Darwin )
if [[ ! -d '/opt/local/bin' ]] || [[ ! -x '/opt/local/bin/msgfmt' ]]; then
std::die 1 "gettext port from Macports is required to build 'getopt'!"
fi
PATH+=':/opt/local/bin'
declare -x C_INCLUDE_PATH='/opt/local/include'
declare -x LDFLAGS="/opt/local/lib/libintl.a /opt/local/lib/libiconv.a -framework CoreFoundation"
;;
esac
make -e all || exit 1
declare -x DESTDIR="${PREFIX}"
declare -x prefix='' || exit 1
PATH="${PREFIX}/${UTILBIN_DIR}:${PATH}"
make -e install
mv "${PREFIX}/bin/getopt" "${PREFIX}/${UTILBIN_DIR}"
}
pbuild::install() {
:
}
pbuild::cleanup_build() {
:
}
# Local Variables:
# mode: sh
# sh-basic-offset: 8
# tab-width: 8
# End: