Skip to content

Commit

Permalink
add src
Browse files Browse the repository at this point in the history
  • Loading branch information
boypt committed Aug 25, 2021
1 parent 120bdda commit b1c9060
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 13 deletions.
17 changes: 8 additions & 9 deletions compile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,29 +28,28 @@ if [[ ! -d $rpmtopdir ]]; then
fi

source version.env

CHECKEXISTS() {
if [[ ! -f $__dir/downloads/$1 ]];then
echo "$1 not found, run 'downloadsrc.sh', or manually put it in the downloads dir."
exit 1
fi
}

# on centos5, it's prefered to use gcc44
if yum --disablerepo=* list installed gcc44; then
export CC=gcc44
fi

SOURCES=( $OPENSSHSRC \
$OPENSSLSRC \
"x11-ssh-askpass-1.2.4.1.tar.gz" \
$ASKPASSSRC \
)

pushd $rpmtopdir
for fn in ${SOURCES[@]}; do
CHECKEXISTS $fn
install -v -m666 $__dir/downloads/$fn $rpmtopdir/SOURCES/
install -v -m666 $__dir/downloads/$fn ./SOURCES/
done

# on centos5, it's prefered to use gcc44
if yum --disablerepo=* list installed gcc44; then
export CC=gcc44
fi

pushd $rpmtopdir
rpmbuild -ba SPECS/openssh.spec --target $(uname -m) --define "_topdir $PWD"
popd
Binary file added downloads/openssh-8.7p1.tar.gz
Binary file not shown.
Binary file added downloads/openssl-1.1.1l.tar.gz
Binary file not shown.
Binary file added downloads/x11-ssh-askpass-1.2.4.1.tar.gz
Binary file not shown.
8 changes: 8 additions & 0 deletions downloadsrc.sh → pullsrc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,22 @@ source version.env

OPENSSHMIR=https://cloudflare.cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/
OPENSSLMIR=https://www.openssl.org/source/
ASKPASSMIR=https://src.fedoraproject.org/repo/pkgs/openssh/x11-ssh-askpass-1.2.4.1.tar.gz/8f2e41f3f7eaa8543a2440454637f3c3

mkdir -p downloads
pushd downloads
if [[ ! -f $OPENSSLSRC ]]; then
echo "Get:" $OPENSSLMIR/$OPENSSLSRC
wget $OPENSSLMIR/$OPENSSLSRC
fi

if [[ ! -f $OPENSSHSRC ]]; then
echo Get: $OPENSSHMIR/$OPENSSHSRC
wget $OPENSSHMIR/$OPENSSHSRC
fi

if [[ ! -f $ASKPASSSRC ]]; then
echo Get: $ASKPASSMIR/$ASKPASSSRC
wget $ASKPASSMIR/$ASKPASSSRC
fi

7 changes: 3 additions & 4 deletions version.env
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
OPENSSLVER="1.1.1l"
OPENSSHVER="8.7p1"
OPENSSLSRC=openssl-${OPENSSLVER}.tar.gz
OPENSSHSRC=openssh-${OPENSSHVER}.tar.gz
OPENSSLSRC=openssl-1.1.1l.tar.gz
OPENSSHSRC=openssh-8.7p1.tar.gz
ASKPASSSRC=x11-ssh-askpass-1.2.4.1.tar.gz

0 comments on commit b1c9060

Please sign in to comment.