ob-deps/rpm/devdeps-openssl-static-buil...

17 lines
533 B
Bash

#!/bin/bash
CUR_DIR=$(dirname $(readlink -f "$0"))
ROOT_DIR=$CUR_DIR/../
PROJECT_DIR=${1:-"$CUR_DIR"}
PROJECT_NAME=${2:-"devdeps-openssl-static"}
VERSION=${3:-"1.1.1u"}
RELEASE=${4:-"1"}
# check source code
if [[ -z `find $ROOT_DIR -maxdepth 1 -regex ".*/openssl-$VERSION.*[tar|gz|bz2|xz|zip]$"` ]]; then
echo "Download source code"
wget --no-check-certificate https://ftp.openssl.org/source/old/1.1.1/openssl-1.1.1u.tar.gz -P $ROOT_DIR
fi
cd $CUR_DIR
bash $CUR_DIR/rpmbuild.sh $PROJECT_DIR $PROJECT_NAME $VERSION $RELEASE