Remove obsolete tools (#8547)

This commit is contained in:
Maximilian Downey Twiss
2023-11-17 01:36:34 +11:00
committed by GitHub
parent 5d97486361
commit 136e78516b
14 changed files with 22 additions and 712 deletions

View File

@@ -1,51 +0,0 @@
CREW_PREFIX = /usr/local
CREW_LIB_PATH = $(CREW_PREFIX)/lib/crew
ALLTARGETS = $(sort $(basename $(notdir $(wildcard $(CREW_LIB_PATH)/packages/*))))
MINTARGETS = compressdoc libsigsegv patch diffutils ncursesw ncurses \
readline pkgconfig make zlibpkg xzutils lzip m4 flex bison ed perl \
libxml2 gettext texinfo bc openssl libssh2 gdbm sqlite curl expat \
bz2 python27 git ruby less python3 libpipeline groff mandb fuse \
libffi glib sshfs unzip
MIN2TARGETS = erlang filecmd go_bootstrap go gawk lz4 acl attr libarchive \
cmake autoconf autoconf_archive automake libtool emacs vim neovim \
nano libpng libxslt pcre php5 php7 screen readline7 tcl expect
MIN3TARGETS = pixman cairo a2png gperf a2ps icu4c harfbuzz freetype \
fontconfig pango optipng netcat ncftp ncdu patchelf openssh patchutils \
protobuf cpio ctags scons libpcap tcpdump tcpstat lha unrar zsh \
libjpeg libtiff imagemagick imagemagick6
TOOLCHAINS = binutils cloog gcc glibc219 glibc223 gmp isl linuxheaders mpc mpfr
FAKES = glibc buildessential parallel wayland xorg_proto
LICENSEPROHIBIT = jdk8
# PRECOMPILED = elixir sejda_console platformsh
# SCRIPTS = gifgen yarn nodebrew
# MODIFYENV = nvm
CRASH = get_iplayer
BINTARGETS = lldb $(TOOLCHAINS) $(FAKES) $(LICENSEPROHIBIT) $(PRECOMPILED) $(SCRIPTS) $(MODIFYENV) $(CRASH)
#scripts
GENPKGNAME = ./genpkgname.sh
BUILD = ./build.sh
all: $(ALLTARGETS)
min: $(MINTARGETS)
min2: $(MIN2TARGETS)
min3: $(MIN3TARGETS)
define make-target
$1: $(shell $(GENPKGNAME) $1)
$(shell $(GENPKGNAME) $1):
$(BUILD) $1
# all-targets:: $(shell $(GENPKGNAME) $1)
endef
define make-dummy-target
$1: $(shell $(GENPKGNAME) $1)
$(shell $(GENPKGNAME) $1): $(CREW_LIB_PATH)/packages/$1.rb
# @echo nothing to do for binary or fake package $1
endef
$(foreach pkg, $(filter-out $(BINTARGETS),$(ALLTARGETS)), $(eval $(call make-target,$(pkg))))
$(foreach pkg, $(BINTARGETS), $(eval $(call make-dummy-target,$(pkg))))

View File

@@ -1,32 +1,33 @@
### list of all tools
# Tools
Tools to build pre-build binary easy.
This directory contains a number of tools used to assist in the development of Chromebrew.
- Makefile
- build.sh
- genpkgname.sh
## Check for packages needing updates
Tools to upload and update URL in package files.
These are a collection of scripts and files used to detect if packages need an update.
Coverage is spotty, and the majority of packages are unsuppported.
- upload_github_release.sh
- `check.rb`
- `check_updates.sh`
- `compare_packages.sh`
- `core_packages.txt`
- `packages.yaml`
Tools to check URL or SHA stuff from packages files.
## Add missing dependencies to packages
- create_sha_list.sh
- create_url_list.sh
This script adds missing dependencies to packages by checking their library dependencies and what crew package provides them.
Obsolete tools to create package. Now, we use `crew build`.
- `getrealdeps.sh`
- create_package.sh
## Upload package binaries to GitLab
### Usage of Makefile
This script uploads built packages to GitLab, where we currently host precompiled binaries.
Make working directory on your Chromebook and copy files there.
Then, performs `make` there.
- `gl.sh`
```bash
mkdir /usr/local/work
cd /usr/local/work
cp your-path-for-original-tool-directory/{Makefile,build.sh,genpkgname.sh} .
make -k
```
## Valid licenses for packages
This file contains guidance on formatting conventions for what to put in the license field of packages.
There is also a rough list of what licenses are used, although this is incomplete and a little outdated.
- `licenses.txt`

View File

@@ -1,55 +0,0 @@
#!/bin/bash
# Overview:
#
# A script to upload binaries to baltorepo.com.
#
# Usage:
#
# bash ./balto_upload.sh <package>
#
# A token is needed to upload. Set as follows:
# export BALTO_TOKEN=<your token here>
#
# Directory structure:
#
# release/armv7l/*.tar.xz binary tarball for armv7l
# release/i686/*.tar.xz binary tarball for i686
# release/x86_64/*.tar.xz binary tarball for x86_64
#
# Author: Ed Reel (uberhacker) edreel at gmail dot com
# Contact me if you would like access to the repository.
#
# Updated: 2021-04-14
#
# License: GPL-3+
[ -z "$1" ] && echo "Usage: $(basename $0) <package>" && exit 1
[ ! -f ../packages/$1.rb ] && echo "Package $1.rb not found." && exit 1
for ARCH in armv7l i686 x86_64; do
NAME=$1
[[ "${NAME}" =~ "_" ]] && NAME=$(echo ${NAME}|sed -e 's/_//g')
PACKAGE=../packages/$1.rb
FILE="../release/${ARCH}/${1}-*${ARCH}.tar.xz"
DOWNLOAD=$(ls ${FILE} 2> /dev/null | sed 's,../release/${ARCH}/,,')
if [ -n "${DOWNLOAD}" ]; then
NONAME=${DOWNLOAD#*-}
VERSION=${NONAME%-chromeos*}
RAWDESC=$(grep "^ description" ${PACKAGE})
DESCRIPTION=$(echo ${RAWDESC}|sed -e 's/^description //'|sed -e 's/"//g'|sed -e "s/'//g"|cut -c -200)
#echo "NAME=$NAME"
#echo "VARIANT=$ARCH"
#echo "VERSION=$VERSION"
#echo "DOWNLOAD=$DOWNLOAD"
#echo "DESCRIPTION=$DESCRIPTION"
#exit
curl \
--header "Authorization: Bearer ${BALTO_TOKEN}" \
--form "download=@${DOWNLOAD}" \
--form "name=${NAME}" \
--form "variant=${ARCH}" \
--form "version=${VERSION}" \
--form "description=${DESCRIPTION}" \
https://chromebrew.baltorepo.com/chromebrew/chromebrew/upload/
fi
done

View File

@@ -1,16 +0,0 @@
#!/bin/bash
case $1 in
-k) keep="keep"; shift;;
*) keep="";;
esac
set -o pipefail
# yes | crew install buildessential $keep
arch=`uname -m`
for i in "$@"; do
version=`grep '\<version ['"'"'"]' /usr/local/lib/crew/packages/$i.rb | head -1 | sed -e 's/^.*version *['"'"'"]//' -e 's/['"'"'"].*$//'`
yes | crew build $i $keep 2>&1 | tee "$i-$version-chromeos-$arch.log"
case .$? in
.141) ;; # ignore SIGPIPE
*) exit 1;; # abort at errors
esac
done

View File

@@ -1,21 +0,0 @@
#!/bin/bash
DIRNAME=${PWD##*/}
XZ_OPT=${XZ_OPT-"-7e"}
export XZ_OPT
echo creating file list
find . -type f > ../filelist && find . -type l >> ../filelist && cut -c2- ../filelist > filelist
echo creating directory list
find . -type d > ../dlist && cut -c2- ../dlist > dlistcut && tail -n +2 dlistcut > dlist
echo removing temporary files
rm dlistcut ../dlist ../filelist
echo building binary package
tar -cJf ../$DIRNAME.tar.xz *
sha1sum ../$DIRNAME.tar.xz > ../$DIRNAME.tar.xz.sha1
echo finished
cat ../$DIRNAME.tar.xz.sha1

View File

@@ -1,40 +0,0 @@
#!/bin/bash
# Create SHA1/SHA256 list of binary files from packages/* and install.sh
#
# You can test SHA1/SHA256 by using 'sha1sum -c sha-file' or 'sha256sum -c sha-file'
case x$1 in
x|x-h)
echo "Usage: $0 [options] > output_file
Options:
-h: help
-a: show all SHA1/SHA256
Create SHA1/SHA256 list of binary files from packages/*.rb files and install.sh.
It is possible to check SHA1/SHA256 by using 'sha1sum -c file' or 'sha256sum -c file'"
exit 0;;
x-a)
;;
esac
grep -h '\(link=\|sha256=\)' install.sh |
sed -e 's/link=//' \
-e 's/sha256=//'\
-e 's/^[ \t]*["'"'"']//' \
-e 's/[\?&].*["'"'"'].*$//' \
-e 's/["'"'"'].*$//' \
-e 's/\(http\|https\|ftp\):.*\///' | \
sed -ne 'N;s/\(.*\)\n\(.*\)/\2 \1/;p'
for f in packages/*.rb; do
grep -h '\(armv7l\|i686\|x86_64\):' $f | \
sort | \
sed -e 's:/www\.dropbox\.com/:/dl.dropboxusercontent.com/:' \
-e 's/\(armv7l\|i686\|x86_64\)://' \
-e 's/^[ \t]*["'"'"']//' \
-e 's/[\?&].*["'"'"'].*$//' \
-e 's/["'"'"'].*$//' \
-e 's/\(http\|https\|ftp\):.*\///' | \
sed -ne 'N;s/\n/ /;p'
done

View File

@@ -1,38 +0,0 @@
#!/bin/bash
# Create URL list of binary URLs from packages/* and install.sh
#
# You can download all of them by using 'wget -N -P output_dir -i output_file' command
case x$1 in
x|x-h)
echo "Usage: $0 [options] > output_file
Options:
-h: help
-s: show URLs (ignore github URL)
-a: show all URLs (include github URL)
Create URL list of binary URLs from packages/*.rb files and install.sh.
It is possible to download them all using 'wget -N -P output_dir -i output_file'"
exit 0;;
x-s)
EXCLUDE_GITHUB_URL="grep -v 'github\.com'";;
x-a)
EXCLUDE_GITHUB_URL="cat";;
esac
grep -h 'link=.*\(http\|https\|ftp\):' install.sh | \
eval $EXCLUDE_GITHUB_URL | \
sed -e 's:/www\.dropbox\.com/:/dl.dropboxusercontent.com/:' \
-e 's/link=//' \
-e 's/^[ \t]*["'"'"']//' \
-e 's/[\?&].*["'"'"'].*$//' \
-e 's/["'"'"'].*$//'
grep -h '\(armv7l\|i686\|x86_64\):.*\(http\|https\|ftp\):' packages/*.rb | \
eval $EXCLUDE_GITHUB_URL | \
sed -e 's:/www\.dropbox\.com/:/dl.dropboxusercontent.com/:' \
-e 's/\(armv7l\|i686\|x86_64\)://' \
-e 's/^[ \t]*["'"'"']//' \
-e 's/[\?&].*["'"'"'].*$//' \
-e 's/["'"'"'].*$//'

View File

@@ -1,105 +0,0 @@
#!/bin/bash
# Overview:
#
# A generic script to download binaries from various repositories.
#
# Usage:
#
# bash ./download_binary.sh [package|all] [repo]
#
# If no options are provided, core package binaries will be downloaded.
# If no repo is provided, the default is github.
#
# Author: Ed Reel (uberhacker) edreel at gmail dot com
#
# Updated: 2021-04-21
#
# License: GPL-3+
if test $1; then
if [[ "$1" == "all" ]]; then
echo "Downloading all packages..."
PACKAGES="$(ls -1 ../packages/*.rb | xargs | sed 's,../packages/,,g' | sed 's,\.rb , ,g' | sed 's,\.rb$,,')"
else
[ ! -f ../packages/$1.rb ] && echo "Package $1.rb not found." && exit 1
echo "Downloading $1 package binaries..."
PACKAGES=$1
fi
else
echo "Downloading core package binaries..."
PACKAGES=$(cat ../tools/core_packages.txt | xargs)
fi
BALTO_REPO="https://baltocdn.com/chromebrew/chromebrew/chromebrew/downloads/"
BINTRAY_REPO="https://dl.bintray.com/chromebrew/chromebrew/"
GITHUB_REPO="https://github.com/chromebrew/binaries/raw/main/"
SOURCEFORGE_REPO="https://downloads.sourceforge.net/project/chromebrew/"
REPO="github"
if test $2; then
valid=
valid_repos="balto bintray github sourceforge"
for r in $valid_repos; do
[[ "$2" == "$r" ]] && valid=1
done
if [ ! $valid ]; then
echo "$2 is an invalid repo."
exit 1
else
REPO=$2
fi
fi
new_base="${BINTRAY_REPO}"
for package in ${PACKAGES}; do
for arch in armv7l i686 x86_64; do
pkgfile=../packages/${package}.rb
url="$(grep -m 3 ${arch}: ${pkgfile} | head -n 1 | cut -d\' -f2 | tr -d \' | tr -d \" | sed 's/,//g')"
sha256="$(grep -m 3 ${arch}: ${pkgfile} | tail -n 1 | cut -d\' -f2 | tr -d \' | tr -d \" | sed 's/,//g')"
case ${REPO} in
balto)
new_package=$(echo ${package} | sed 's,\_,,')
new_base="${BALTO_REPO}${package:0:1}/${new_package}/"
;;
github)
new_base="${GITHUB_REPO}${arch}/"
;;
sourceforge)
new_base="${SOURCEFORGE_REPO}${arch}/"
;;
esac
tarfile="$(basename ${url})"
noname="${tarfile#*-}"
version="${noname%-chromeos*}"
new_url="${new_base}${tarfile}"
#echo $url
#echo $new_url
#exit
#sed -i "s,${url},${new_url},g" ${pkgfile}
#if [ "${package}" == "glibc" ]; then
# case ${arch} in
# armv7l)
# url="${new_base}glibc-2.27-chromeos-armv7l.tar.xz"
# sha256="64b4b73e2096998fd1a0a0e7d18472ef977aebb2f1cad83d99c77e164cb6a1d6"
# ;;
# x86_64)
# url="${new_base}glibc-2.27-chromeos-x86_64.tar.xz"
# sha256="5fe94642dbbf900d22b715021c73ac1a601b81517f0da1e7413f0af8fbea7997"
# ;;
# esac
#fi
echo "Package: ${package}, Arch: ${arch}, Version: ${version}"
echo "Downloading ${new_url}..."
curl -#Lsf ${new_url} -o ${tarfile}
echo -e "Verifying ${tarfile}..."
echo -e "$(echo "${sha256}" "${tarfile}" | sha256sum -c -)"
case "${?}" in
0)
echo -e "Verification passed."
;;
*)
echo -e "Verification failed."
exit 1
;;
esac
done
done

View File

@@ -1,94 +0,0 @@
#!/bin/bash
#
# Usage: yes | bash generate_binaries.sh [directory] [start]
#
# [directory] Optional directory where the binaries will be stored.
# If not provided, a directory relative to the current
# directory will be created using the current date.
#
# [start] Optional package name of the first binary build.
# Useful if you want to continue where you left off
# if the script aborts on a previous attempt.
#
# Search for required commands
cmds="crew git"
for c in $cmds; do
command -v $c > /dev/null && continue || { echo "$c command not found."; exit 1; }
done
# Determine if a packages directory exists from the cloned repository
packages_dir=$(echo $(git rev-parse --git-dir 2> /dev/null) | sed -e 's,.git,packages,')
if [ ! -d "$packages_dir" ]; then
echo "Not a valid Chromebrew repository."
exit 1
fi
# Generate working directory
if test $1; then
workdir=$1
if [ ! -d "$workdir" ]; then
mkdir -p $workdir
fi
else
workdir=$(date +%Y%m%d%H%M)
mkdir $workdir
fi
# Get architecture
arch=$(uname -m)
# Exclude fake packages
exclusions="buildessential glibc parallel wayland xorg_proto"
# Exclude packages without architecture support
if [[ "$arch" == "aarch64" || "$arch" == "armv7l" ]]; then
exclusions="$exclusions cbase dropbox freebasic google_cloud_sdk lldb mesa misctools"
fi
# Packages that need binary builds
packages=$(grep -L "$arch:" $packages_dir/*.rb | sed -e "s,$packages_dir/,,g" | cut -d'.' -f1 | xargs)
# Determine the starting package, if necessary
start=
if test $2; then
for p in $packages; do
if [[ "$2" == "$p" ]]; then
start=$2
break
fi
done
fi
# Continue unless there is a starting package
continue=1
if test $start; then
continue=
fi
# Change to the working directory
cd $workdir
# Loop through packages that need a binary build
for p in $packages; do
package=$(ls $p-*.xz 2> /dev/null)
# Operate only on packages that don't already have a build
if [ ! -f "$package" ]; then
if [[ "$start" == "$p" ]]; then
continue=1
fi
# Determine if the package should be excluded
exclude=
for e in $exclusions; do
if [[ "$e" == "$p" ]]; then
exclude=1
break
fi
done
# Build only if necessary
if test $continue; then
if ! test $exclude; then
crew build $p
fi
fi
fi
done

View File

@@ -1,5 +0,0 @@
#!/bin/bash
version=`grep '\<version ['"'"'"]' /usr/local/lib/crew/packages/$1.rb | head -1 | sed -e 's/^.*version *['"'"'"]//' -e 's/['"'"'"].*$//'`
arch=`uname -m`
echo $1-$version-chromeos-$arch.tar.xz

View File

@@ -1,131 +0,0 @@
#!/bin/bash
# Overview:
#
# A script to add or update GitHub package file binaries.
#
# Usage:
#
# bash ./gh.sh [package1 package2 ...]
#
# If no packages are provided, all packages with binaries in release/* will be processed.
#
# Directory structure:
#
# release/armv7l/*.tar.xz(.sha256) binary tarball and sha256 files for armv7l
# release/i686/*.tar.xz(.sha256) binary tarball and sha256 files for i686
# release/x86_64/*.tar.xz(.sha256) binary tarball and sha256 files for x86_64
#
# Author: Ed Reel (uberhacker) edreel at gmail dot com
# Contact me if you would like access to the repository.
#
# Updated: 2021-04-21
#
# License: GPL-3+
packages=
if test $1; then
for package in $@; do
pkgfile="../packages/${package}.rb"
if [ -f ${pkgfile} ]; then
packages+=" ${package}"
else
echo "Package ${pkgfile} not found."
fi
done
else
packages=$(find ../release/*/*.xz -exec basename -s .tar.xz {} + | cut -d'-' -f1 | sort | uniq | xargs)
fi
[ -z "${packages}" ] && echo "No packages found." && exit 1
function update_url () {
if sed -e '/binary_url.*({/,/})/p; d' ../packages/$1.rb | grep -q $2:; then
sed -e "/$2:.*\(http\|https\|ftp\):/c\ \ \ \ $(printf %7s $2): '$3'," -i ../packages/$1.rb
else
sed -e "/binary_url.*({/a\ \ \ \ $(printf %7s $2): '$3'," -i ../packages/$1.rb
fi
}
function update_sha256 () {
if sed -e '/binary_sha256.*({/,/})/p; d' ../packages/$1.rb | grep -q $2:; then
sed -e "/$2:.*['\"][0-9a-f]*['\"]/c\ \ \ \ $(printf %7s $2): '$3'," -i ../packages/$1.rb
else
sed -e "/binary_sha256.*({/a\ \ \ \ $(printf %7s $2): '$3'," -i ../packages/$1.rb
fi
}
for package in ${packages}; do
for arch in x86_64 i686 armv7l; do
echo "Package: ${package}, Arch: ${arch}"
pkgfile=../packages/${package}.rb
old_url="$(grep -m 3 ${arch}: ${pkgfile} 2> /dev/null | head -n 1 | cut -d\' -f2 | tr -d \' | tr -d \" | sed 's/,//g')"
if [ -n "${old_url}" ]; then
old_sha256="$(grep -m 3 ${arch}: ${pkgfile} 2> /dev/null | tail -n 1 | cut -d\' -f2 | tr -d \' | tr -d \" | sed 's/,//g')"
tarfile="$(basename ${old_url})"
noname="${tarfile#*-}"
old_version="${noname%-chromeos*}"
fi
new_tarfile="$(ls ../release/${arch}/${package}-*-chromeos-${arch}.tar.xz 2> /dev/null | head -1)"
if [ -z "${new_tarfile}" ]; then
echo "../release/${arch}/${package}-#-chromeos-${arch}.tar.xz not found."
echo
continue
fi
new_sha256file="$(ls ../release/${arch}/${package}-*-chromeos-${arch}.tar.xz.sha256 2> /dev/null | head -1)"
if [ -z "${new_sha256file}" ]; then
echo "${new_tarfile}.sha256 not found. Generating sha256sum ..."
new_sha256=$(sha256sum ${new_tarfile} | cut -d' ' -f1)
echo
else
new_sha256=$(cut -d' ' -f1 ${new_sha256file})
fi
noname="${new_tarfile#*-}"
new_version="${noname%-chromeos*}"
new_url=$(echo "https://github.com/chromebrew/binaries/raw/main/${new_tarfile}" | sed 's,../release/,,')
if [ -n "${old_url}" ]; then
if [[ ${old_url} != ${new_url} ]]; then
echo "Updating binary_url in ${pkgfile}..."
echo "from: ${arch}: '${old_url}'"
echo " to: ${arch}: '${new_url}'"
sed -i "s,${old_url},${new_url},g" ${pkgfile}
else
echo "Skipping binary_url update in ${pkgfile}..."
fi
if [[ ${old_sha256} != ${new_sha256} ]]; then
echo "Updating binary_sha256 in ${pkgfile}.."
echo "from: ${arch}: '${old_sha256}'"
echo " to: ${arch}: '${new_sha256}'"
sed -i "s,${old_sha256},${new_sha256},g" ${pkgfile}
else
echo "Skipping binary_sha256 update in ${pkgfile}..."
fi
else
if ! grep -q binary_url ../packages/${package}.rb; then
sed -e '/source_sha256/ a\
\
\ \ binary_url ({\
\ \ })\
\ \ binary_sha256 ({\
\ \ })' -i ../packages/${package}.rb
fi
echo "Adding binary_url to ${pkgfile}..."
echo "${arch}: '${new_url}'"
echo "Adding binary_sha256 to ${pkgfile}..."
echo "${arch}: '${new_sha256}'"
case x${new_url} in
x) ;;
*)
update_url ${package} ${arch} ${new_url}
update_sha256 ${package} ${arch} ${new_sha256}
case ${arch} in
armv7l)
update_url ${package} aarch64 ${new_url}
update_sha256 ${package} aarch64 ${new_sha256}
;;
esac
;;
esac
fi
echo
done
done

View File

@@ -1,51 +0,0 @@
#!/bin/bash
PWD_HOLD="${PWD}"
cd /tmp
if [[ -d /tmp/heroku-cli ]]; then
cd heroku-cli
git pull &>/dev/null
cd ..
else
git clone https://github.com/heroku/cli.git heroku-cli &>/dev/null
fi
cd heroku-cli
export HEROKU_V="$(git describe --abbrev=0 --tags)"
echo "${HEROKU_V}":
export SOURCE_URL="https://github.com/heroku/cli/archive/${HEROKU_V}.tar.gz"
export SOURCE_SHA256="$(wget -O- ${SOURCE_URL} 2>/dev/null | sha256sum | cut -d' ' -f1)"
echo "source_url '${SOURCE_URL}'"
echo "source_sha256 '${SOURCE_SHA256}'"
echo
echo "Package file located at ${PWD_HOLD}/heroku.rb"
cd "${PWD_HOLD}"
echo "require 'package'" > heroku.rb
echo >> heroku.rb
echo "class Heroku < Package" >> heroku.rb
echo " description 'The Heroku Command Line Interface (CLI), formerly known as the Heroku Toolbelt, is a tool for creating and managing Heroku apps from the command line / shell of various operating systems.'" >> heroku.rb
echo " homepage 'https://devcenter.heroku.com/articles/heroku-cli'" >> heroku.rb
echo " version '${HEROKU_V}'" >> heroku.rb
echo " source_url '${SOURCE_URL}'" >> heroku.rb
echo " source_sha256 '${SOURCE_SHA256}'" >> heroku.rb
echo >> heroku.rb
echo " binary_url ({" >> heroku.rb
echo " })" >> heroku.rb
echo " binary_sha256 ({" >> heroku.rb
echo " })" >> heroku.rb
echo >> heroku.rb
echo " depends_on 'yarn'" >> heroku.rb
echo >> heroku.rb
echo " def self.build" >> heroku.rb
echo " system 'yarn install'" >> heroku.rb
echo " end" >> heroku.rb
echo >> heroku.rb
echo " def self.install" >> heroku.rb
echo " system \"mkdir -p #{CREW_DEST_PREFIX}/share/heroku\"" >> heroku.rb
echo " system \"cp -r . #{CREW_DEST_PREFIX}/share/heroku\"" >> heroku.rb
echo " system \"mkdir -p #{CREW_DEST_PREFIX}/bin\"" >> heroku.rb
echo " system \"ln -s #{CREW_PREFIX}/share/heroku/bin/run #{CREW_DEST_PREFIX}/bin/heroku\"" >> heroku.rb
echo " end" >> heroku.rb
echo "end" >> heroku.rb

View File

@@ -1,46 +0,0 @@
#!/bin/bash
if [ ! -d ../packages ]; then
echo 'Unable to locate packages directory.'
exit 1
fi
cd ../packages
arch=$(uname -m)
exclusions='android_studio.rb antlr4.rb asciidoctor.rb asciinema.rb atom.rb autosetup.rb balena_etcher.rb blender.rb brave.rb broadway.rb cabal.rb checkinstall.rb'
exclusions+=' chrome.rb clear_cache.rb codium.rb composer.rb cowsay.rb cpu_x.rb crew_profile.rb cros_resize.rb dart.rb depot_tools.rb docx2txt.rb dr.rb elixir.rb'
exclusions+=' far.rb fd.rb firefox.rb flutter.rb fortune.rb fortunes.rb fpc.rb freebasic.rb freecad.rb freedos.rb gcc_tools.rb gcloud.rb ghc.rb gittools.rb gradle.rb'
exclusions+=' hollywood.rb hugo.rb hunspell.rb idea.rb julia.rb keepassxc.rb komodo.rb kotlin.rb kr.rb ld_default.rb leiningen.rb libcom_err.rb libtinfo.rb lsb_release.rb'
exclusions+=' minecraft.rb mutagen.rb mysqltuner.rb mywanip.rb mysql.rb nconvert.rb neofetch.rb netbeans.rb ngrok.rb nodebrew.rb nvm.rb oc.rb openhab.rb opera.rb'
exclusions+=' packer.rb pakitheme.rb papirus_icon_theme.rb peazip.rb perl_gcstring_linebreak.rb perl_io_socket_ssl.rb perl_locale_gettext.rb perl_locale_messages.rb'
exclusions+=' perl_module_build.rb perl_read_key.rb perl_sgmls.rb perl_term_ansicolor.rb perl_text_charwidth.rb perl_text_unidecode.rb perl_text_wrapi18n.rb perl_time_hires.rb'
exclusions+=' perl_unicode_eastasianwidth.rb perl_xml_parser.rb perl_xml_sax_parserfactory.rb perl_xml_simple.rb phpsysinfo.rb pipes_sh.rb pipesx_sh.rb pkgsrc.rb'
exclusions+=' platformsh.rb pngcheck.rb powershell.rb pup.rb pycharm.rb qtcreator.rb ruby_docopt.rb shells.rb skype.rb sl.rb sommelier.rb spark.rb squeak.rb stack.rb'
exclusions+=' sublime_merge.rb sublime_text.rb symfony.rb telegram.rb terminus.rb terraform.rb thefuck.rb tinycore.rb tkdiff.rb torbrowser.rb txt2regex.rb'
exclusions+=' uthash.rb uwsgi.rb v2ray.rb vivaldi.rb wallstreet.rb wp_cli.rb xdg_base.rb xz_java.rb yarn.rb'
if [[ "${arch}" == 'aarch64' || "${arch}" == 'armv7l' ]]; then
exclusions+=' az.rb blender.rb brackets.rb cf.rb clisp.rb crossmobile.rb darktable.rb dropbox.rb fakeroot_ng.rb ghostscript.rb gitkraken.rb handbrake.rb hplip.rb'
exclusions+=' igt_gpu_tools.rb intel_media_driver.rb intel_media_sdk.rb jdk11.rb jdk15.rb libmfx.rb libva_intel_driver_hybrid.rb miniconda3.rb misctools.rb mysql.rb'
exclusions+=' oci.rb openhab.rb nethack4.rb obs.rb prometheus_cpp.rb sbcl.rb shotcut.rb svt_av1.rb swi_prolog.rb weston.rb wing.rb wkhtmltox.rb xorg_intel_driver.rb'
exclusions+=' xorg_intel_sdk.rb xorg_vmmouse_driver.rb'
fi
if [[ "${arch}" == 'i686' ]]; then
exclusions+=' aqemu.rb blender.rb codelite.rb crossmobile.rb darktable.rb dia.rb epiphany.rb exa.rb fakeroot_ng.rb fzf.rb gcr.rb geany.rb geany_plugins.rb gemacs.rb'
exclusions+=' gimp.rb gitkraken.rb gnome_keyring.rb gnome_session.rb gnome_shell.rb gtk_engines_adwaita.rb handbrake.rb heroku.rb imagemagick6.rb intel_media_driver.rb'
exclusions+=' intel_media_sdk.rb jdk11.rb jdk15.rb libgnome_keyring.rb librespot.rb libvncserver.rb mutter.rb mysql.rb neovim.rb openhab.rb pipewire.rb poppler.rb'
exclusions+=' qtdeclarative.rb qtfm.rb qttools.rb ripgrep.rb sass.rb shotcut.rb svt_av1.rb t1lib.rb tcpflow.rb wing.rb xorg_intel_driver.rb zathura.rb zig.rb'
fi
if [[ "${arch}" == 'x86_64' ]]; then
exclusions+=' libmfx.rb'
fi
packages=$(grep -L "${arch}:" *.rb)
for p in ${packages}; do
include=1
for e in ${exclusions}; do
if [ "${e}" == "${p}" ]; then
include=
break
fi
done
if [[ -n "${include}" ]]; then
grep -L is_fake ${p}
fi
done

View File

@@ -1,38 +0,0 @@
#!/bin/bash
# Script to upload binary files to github release page.
#
# Prerequirement:
# github-release (https://github.com/aktau/github-release)
# golang
owner=chromebrew
repo=chromebrew
case x$1 in
x|x-h)
echo "Usage: $0 [options] tag files...
Options:
-h: help
-d: dump status of repository
Upload files to tagged release page of http://github.com/$owner/$repo"
exit 0;;
x-d)
github-release info -u "$owner" -r "$repo"
exit 0;;
*)
tag=$1
shift;;
esac
case x$GITHUB_TOKEN in
x)
echo "It is required to set your public_repo token to GITHUB_TOKEN environment variable to upload"
exit 1;;
esac
for file in "$@"; do
name=$(basename $file)
github-release upload -u "$owner" -r "$repo" -t "$tag" -n "$name" -f "$file"
done