#!/usr/bin/env modbuild

SOURCE_URL="https://www.openssl.org/source/$P-$V.tar.gz"

pbuild::configure() {
	case ${OS} in
	Darwin )
		target='darwin64-x86_64-cc'
		;;
	Linux )
		target='linux-x86_64'
		;;
	esac
	export CFLAGS=-fPIC
	"${MODULE_SRCDIR}"/Configure shared --prefix="${PREFIX}" ${target} \
		|| exit 1
}

# use system gcc to compile
declare -rx CC=gcc

pbuild::add_to_group 'Tools'
pbuild::compile_in_sourcetree
pbuild::make_all

