This repository has been archived by the owner on Aug 2, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Binary Releases #6003
Merged
Merged
Binary Releases #6003
Changes from 3 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 "[email protected]") | ||
|
||
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,67 @@ | ||
#! /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 \"cmake\" => :build | ||
depends_on \"automake\" => :build | ||
depends_on \"libtool\" => :build | ||
depends_on \"wget\" => :build | ||
depends_on \"gmp\" => :build | ||
depends_on \"gettext\" => :build | ||
depends_on \"doxygen\" => :build | ||
depends_on \"graphviz\" => :build | ||
depends_on \"lcov\" => :build | ||
depends_on :xcode => :build | ||
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,29 @@ | ||
#! /bin/bash | ||
|
||
NAME="${PROJECT}-${VERSION}.x86_64" | ||
PREFIX="usr" | ||
SPREFIX=${PREFIX} | ||
SUBPREFIX="opt/${PROJECT}/${VERSION}" | ||
SSUBPREFIX="opt\/${PROJECT}\/${VERSION}" | ||
|
||
mkdir -p ${PROJECT}/DEBIAN | ||
echo "Package: ${PROJECT} | ||
Version: ${VERSION} | ||
Section: devel | ||
Priority: optional | ||
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,43 @@ | ||
#! /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} | ||
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,40 @@ | ||
#! /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}/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 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} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All these commented out lines in this file. Is it supposed to be that way?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, when we create full binary releases with libeosio and tester hopefully all that needs to be done in the generator scripts is uncomment these lines.