This repository has been archived by the owner on Aug 2, 2022. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6003 from EOSIO/feature/bin_rel
Binary Releases
- Loading branch information
Showing
14 changed files
with
275 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
set(VENDOR "block.one") | ||
set(PROJECT_NAME "eosio") | ||
set(DESC "Software for the EOS.IO network") | ||
set(URL "https://github.com/eosio/eos") | ||
set(EMAIL "support@block.one") | ||
|
||
configure_file(${CMAKE_SOURCE_DIR}/scripts/generate_package.sh.in ${CMAKE_BINARY_DIR}/packages/generate_package.sh @ONLY) | ||
configure_file(${CMAKE_SOURCE_DIR}/scripts/generate_bottle.sh ${CMAKE_BINARY_DIR}/packages/generate_bottle.sh COPYONLY) | ||
configure_file(${CMAKE_SOURCE_DIR}/scripts/generate_deb.sh ${CMAKE_BINARY_DIR}/packages/generate_deb.sh COPYONLY) | ||
configure_file(${CMAKE_SOURCE_DIR}/scripts/generate_rpm.sh ${CMAKE_BINARY_DIR}/packages/generate_rpm.sh COPYONLY) | ||
configure_file(${CMAKE_SOURCE_DIR}/scripts/generate_tarball.sh ${CMAKE_BINARY_DIR}/packages/generate_tarball.sh COPYONLY) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
macro( copy_bin file ) | ||
add_custom_command( TARGET ${file} POST_BUILD COMMAND mkdir -p ${CMAKE_BINARY_DIR}/bin ) | ||
add_custom_command( TARGET ${file} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/${file} ${CMAKE_BINARY_DIR}/bin/ ) | ||
endmacro( copy_bin ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
#! /bin/bash | ||
|
||
VERS=`sw_vers -productVersion | awk '/10\.13\..*/{print $0}'` | ||
if [[ -z "$VERS" ]]; | ||
then | ||
VERS=`sw_vers -productVersion | awk '/10\.14\..*/{print $0}'` | ||
if [[ -z "$VERS" ]]; | ||
then | ||
echo "Error, unsupported OS X version" | ||
exit -1 | ||
fi | ||
MAC_VERSION="mojave" | ||
else | ||
MAC_VERSION="high_sierra" | ||
fi | ||
|
||
NAME="${PROJECT}-${VERSION}.${MAC_VERSION}.bottle.tar.gz" | ||
|
||
mkdir -p ${PROJECT}/${VERSION}/opt/eosio/lib/cmake | ||
|
||
PREFIX="${PROJECT}/${VERSION}" | ||
SPREFIX="\/usr\/local" | ||
SUBPREFIX="opt/${PROJECT}" | ||
SSUBPREFIX="opt\/${PROJECT}" | ||
|
||
export PREFIX | ||
export SPREFIX | ||
export SUBPREFIX | ||
export SSUBPREFIX | ||
|
||
bash generate_tarball.sh ${NAME} | ||
|
||
hash=`openssl dgst -sha256 ${NAME} | awk 'NF>1{print $NF}'` | ||
|
||
echo "class Eosio < Formula | ||
homepage \"${URL}\" | ||
revision 0 | ||
url \"https://github.com/eosio/eos/archive/v${VERSION}.tar.gz\" | ||
version \"${VERSION}\" | ||
option :universal | ||
depends_on \"gmp\" | ||
depends_on \"gettext\" | ||
depends_on \"openssl\" | ||
depends_on \"gmp\" | ||
depends_on :xcode | ||
depends_on :macos => :high_sierra | ||
depends_on :arch => :intel | ||
bottle do | ||
root_url \"https://github.com/eosio/eos/releases/download/v${VERSION}\" | ||
sha256 \"${hash}\" => :${MAC_VERSION} | ||
end | ||
def install | ||
raise \"Error, only supporting binary packages at this time\" | ||
end | ||
end | ||
__END__" &> eosio.rb | ||
|
||
rm -r ${PROJECT} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#! /bin/bash | ||
|
||
NAME="${PROJECT}-${VERSION}.x86_64" | ||
PREFIX="usr" | ||
SPREFIX=${PREFIX} | ||
SUBPREFIX="opt/${PROJECT}/${VERSION}" | ||
SSUBPREFIX="opt\/${PROJECT}\/${VERSION}" | ||
|
||
DEPS_STR="" | ||
for dep in "${DEPS[@]}"; do | ||
DEPS_STR="${DEPS_STR} Depends: ${dep}" | ||
done | ||
mkdir -p ${PROJECT}/DEBIAN | ||
echo "Package: ${PROJECT} | ||
Version: ${VERSION} | ||
Section: devel | ||
Priority: optional | ||
Depends: libbz2-dev (>= 1.0), libssl-dev (>= 1.0), libgmp3-dev, build-essential, libicu-dev, zlib1g-dev | ||
Architecture: amd64 | ||
Homepage: ${URL} | ||
Maintainer: ${EMAIL} | ||
Description: ${DESC}" &> ${PROJECT}/DEBIAN/control | ||
|
||
export PREFIX | ||
export SUBPREFIX | ||
export SPREFIX | ||
export SSUBPREFIX | ||
|
||
bash generate_tarball.sh ${NAME}.tar.gz | ||
|
||
tar -xvzf ${NAME}.tar.gz -C ${PROJECT} | ||
dpkg-deb --build ${PROJECT} | ||
mv ${PROJECT}.deb ${NAME}.deb | ||
rm -r ${PROJECT} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#! /bin/bash | ||
|
||
VARIANT=$1 | ||
|
||
VERSION="@VERSION_MAJOR@.@VERSION_MINOR@.@VERSION_PATCH@" | ||
|
||
BUILD_DIR="@CMAKE_BINARY_DIR@" | ||
|
||
VENDOR="@VENDOR@" | ||
PROJECT="@PROJECT_NAME@" | ||
DESC="@DESC@" | ||
URL="@URL@" | ||
EMAIL="@EMAIL@" | ||
|
||
export BUILD_DIR | ||
export VERSION | ||
export VENDOR | ||
export PROJECT | ||
export DESC | ||
export URL | ||
export EMAIL | ||
|
||
mkdir tmp | ||
|
||
if [[ ${VARIANT} == "brew" ]]; then | ||
bash generate_bottle.sh | ||
elif [[ ${VARIANT} == "deb" ]]; then | ||
bash generate_deb.sh | ||
elif [[ ${VARIANT} == "rpm" ]]; then | ||
bash generate_rpm.sh | ||
else | ||
echo "Error, unknown package type. Use either ['brew', 'deb', 'rpm']." | ||
exit -1 | ||
fi | ||
rm -r tmp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#! /bin/bash | ||
|
||
NAME="${PROJECT}-${VERSION}.x86_64" | ||
PREFIX="usr" | ||
SPREFIX=${PREFIX} | ||
SUBPREFIX="opt/${PROJECT}/${VERSION}" | ||
SSUBPREFIX="opt\/${PROJECT}\/${VERSION}" | ||
|
||
export PREFIX | ||
export SUBPREFIX | ||
export SPREFIX | ||
export SSUBPREFIX | ||
|
||
bash generate_tarball.sh ${NAME}.tar.gz | ||
|
||
RPMBUILD=`realpath ~/rpmbuild/BUILDROOT/${NAME}-0.x86_64` | ||
mkdir -p ${RPMBUILD} | ||
FILES=$(tar -xvzf ${NAME}.tar.gz -C ${RPMBUILD}) | ||
PFILES="" | ||
for f in ${FILES[@]}; do | ||
if [ -f ${RPMBUILD}/${f} ]; then | ||
PFILES="${PFILES}/${f}\n" | ||
fi | ||
done | ||
echo -e ${PFILES} &> ~/rpmbuild/BUILD/filenames.txt | ||
|
||
mkdir -p ${PROJECT} | ||
echo -e "Name: ${PROJECT} | ||
Version: ${VERSION}.x86_64 | ||
License: MIT | ||
Vendor: ${VENDOR} | ||
Source: ${URL} | ||
Requires: openssl-devel.x86_64, gmp-devel.x86_64, libstdc++-devel.x86_64, bzip2.x86_64, bzip2-devel.x86_64, mongodb.x86_64, mongodb-server.x86_64 | ||
URL: ${URL} | ||
Packager: ${VENDOR} <${EMAIL}> | ||
Summary: ${DESC} | ||
Release: 0 | ||
%description | ||
${DESC} | ||
%files -f filenames.txt" &> ${PROJECT}.spec | ||
|
||
rpmbuild -bb ${PROJECT}.spec | ||
mv ~/rpmbuild/RPMS/x86_64 ./ | ||
rm -r ${PROJECT} ~/rpmbuild/BUILD/filenames.txt ${PROJECT}.spec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#! /bin/bash | ||
|
||
NAME=$1 | ||
EOS_PREFIX=${PREFIX}/${SUBPREFIX} | ||
mkdir -p ${PREFIX}/bin/ | ||
#mkdir -p ${PREFIX}/lib/cmake/${PROJECT} | ||
mkdir -p ${EOS_PREFIX}/bin | ||
mkdir -p ${EOS_PREFIX}/licenses/eosio | ||
#mkdir -p ${EOS_PREFIX}/include | ||
#mkdir -p ${EOS_PREFIX}/lib/cmake/${PROJECT} | ||
#mkdir -p ${EOS_PREFIX}/cmake | ||
#mkdir -p ${EOS_PREFIX}/scripts | ||
|
||
# install binaries | ||
cp -R ${BUILD_DIR}/bin/* ${EOS_PREFIX}/bin | ||
|
||
# install licenses | ||
cp -R ${BUILD_DIR}/licenses/eosio/* ${EOS_PREFIX}/licenses | ||
|
||
# install libraries | ||
#cp -R ${BUILD_DIR}/lib/* ${EOS_PREFIX}/lib | ||
|
||
# install cmake modules | ||
#sed "s/_PREFIX_/\/${SPREFIX}/g" ${BUILD_DIR}/modules/EosioTesterPackage.cmake &> ${EOS_PREFIX}/lib/cmake/${PROJECT}/EosioTester.cmake | ||
#sed "s/_PREFIX_/\/${SPREFIX}\/${SSUBPREFIX}/g" ${BUILD_DIR}/modules/${PROJECT}-config.cmake.package &> ${EOS_PREFIX}/lib/cmake/${PROJECT}/${PROJECT}-config.cmake | ||
|
||
# install includes | ||
#cp -R ${BUILD_DIR}/include/* ${EOS_PREFIX}/include | ||
|
||
# make symlinks | ||
#pushd ${PREFIX}/lib/cmake/${PROJECT} &> /dev/null | ||
#ln -sf ../../../${SUBPREFIX}/lib/cmake/${PROJECT}/${PROJECT}-config.cmake ${PROJECT}-config.cmake | ||
#ln -sf ../../../${SUBPREFIX}/lib/cmake/${PROJECT}/EosioTester.cmake EosioTester.cmake | ||
#popd &> /dev/null | ||
|
||
pushd ${PREFIX}/bin &> /dev/null | ||
for f in `ls ${BUILD_DIR}/bin/`; do | ||
bn=$(basename $f) | ||
ln -sf ../${SUBPREFIX}/bin/$bn $bn | ||
done | ||
popd &> /dev/null | ||
|
||
tar -cvzf $NAME ./${PREFIX}/* | ||
rm -r ${PREFIX} |