Skip to content
This repository has been archived by the owner on Jan 11, 2021. It is now read-only.

Commit

Permalink
Fix brew tap install
Browse files Browse the repository at this point in the history
  • Loading branch information
conr2d committed Jan 20, 2020
1 parent f19576f commit e4e16a4
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 21 deletions.
19 changes: 10 additions & 9 deletions scripts/generate_bottle.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ else
MAC_VERSION="high_sierra"
fi

NAME="${PACKAGE_NAME}-${VERSION}.${MAC_VERSION}.bottle.tar.gz"
NAME="${PACKAGE}-${VERSION}.${MAC_VERSION}.bottle.tar.gz"

mkdir -p ${PROJECT}/${VERSION}/opt/eosio_cdt/lib/cmake
mkdir -p ${PACKAGE}/${VERSION}/opt/eosio_cdt/lib/cmake

PREFIX="${PROJECT}/${VERSION}"
PREFIX="${PACKAGE}/${VERSION}"
SPREFIX="\/usr\/local"
SUBPREFIX="opt/${PROJECT}"
SSUBPREFIX="opt\/${PROJECT}"
SUBPREFIX="opt/${PACKAGE}"
SSUBPREFIX="opt\/${PACKAGE}"

export PREFIX
export SPREFIX
Expand All @@ -41,8 +41,6 @@ echo "class Eoscc < Formula
option :universal
conflicts_with \"EosioCdt\", :because => "Provides same executables and libraries"
depends_on \"cmake\" => :build
depends_on \"automake\" => :build
depends_on \"libtool\" => :build
Expand All @@ -60,10 +58,13 @@ echo "class Eoscc < Formula
root_url \"https://github.com/turnpike2/eoscc/releases/download/v${VERSION}\"
sha256 \"${hash}\" => :${MAC_VERSION}
end
conflicts_with \"eosio.cdt\", :because => \"Provides same executables and libraries\"
def install
raise \"Error, only supporting binary packages at this time\"
end
end
__END__" &> eosio.cdt.rb
__END__" &> ${PACKAGE}.rb

rm -r ${PROJECT}
rm -r ${PACKAGE}
21 changes: 11 additions & 10 deletions scripts/generate_deb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,29 @@

PREFIX="usr"
SPREFIX=${PREFIX}
SUBPREFIX="opt/${PROJECT}/${VERSION}"
SSUBPREFIX="opt\/${PROJECT}\/${VERSION}"
SUBPREFIX="opt/${PACKAGE}/${VERSION}"
SSUBPREFIX="opt\/${PACKAGE}\/${VERSION}"
RELEASE="${VERSION_SUFFIX}"

# default release to "1" if there is no suffix
if [[ -z $RELEASE ]]; then
RELEASE="1"
fi

NAME="${PACKAGE_NAME}_${VERSION_NO_SUFFIX}-${RELEASE}_amd64"
NAME="${PACKAGE}_${VERSION_NO_SUFFIX}-${RELEASE}_amd64"

mkdir -p ${PROJECT}/DEBIAN
echo "Package: ${PACKAGE_NAME}
mkdir -p ${PACKAGE}/DEBIAN
echo "Package: ${PACKAGE}
Version: ${VERSION_NO_SUFFIX}-${RELEASE}
Provides: ${PROJECT}
Conflicts: ${PROJECT}
Replaces: ${PROJECT}
Section: devel
Priority: optional
Architecture: amd64
Homepage: ${URL}
Maintainer: ${EMAIL}
Description: ${DESC}" &> ${PROJECT}/DEBIAN/control
Description: ${DESC}" &> ${PACKAGE}/DEBIAN/control

export PREFIX
export SUBPREFIX
Expand All @@ -32,10 +33,10 @@ export SSUBPREFIX

bash generate_tarball.sh ${NAME}.tar.gz

tar -xvzf ${NAME}.tar.gz -C ${PROJECT}
dpkg-deb --build ${PROJECT}
tar -xvzf ${NAME}.tar.gz -C ${PACKAGE}
dpkg-deb --build ${PACKAGE}
BUILDSTATUS=$?
mv ${PROJECT}.deb ${NAME}.deb
rm -r ${PROJECT}
mv ${PACKAGE}.deb ${NAME}.deb
rm -r ${PACKAGE}

exit $BUILDSTATUS
4 changes: 2 additions & 2 deletions scripts/generate_package.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ PROJECT="@PROJECT_NAME@"
DESC="@DESC@"
URL="@URL@"
EMAIL="@EMAIL@"
PACKAGE_NAME="@PACKAGE_NAME@"
PACKAGE="@PACKAGE_NAME@"

export BUILD_DIR
export VERSION_NO_SUFFIX
Expand All @@ -24,7 +24,7 @@ export PROJECT
export DESC
export URL
export EMAIL
export PACKAGE_NAME
export PACKAGE

mkdir tmp

Expand Down

0 comments on commit e4e16a4

Please sign in to comment.