Add tools to make pre-built binary files

parent 22d5adfa
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))))
### list of all tools
Tools to build pre-build binary easy.
- Makefile
- build.sh
- genpkgname.sh
Tools to upload and update URL in package files.
- chkfrog.sh
- upfrog.sh
- upload_github_release.sh
Tools to check URL or SHA stuff from packages files.
- create_sha_list.sh
- create_url_list.sh
Obsolete tools to create package. Now, we use `crew build`.
- create_package.sh
### Usage of Makefile
Make working directory on your Chromebook and copy files there.
Then, performs `make` there.
```
$ mkdir /usr/local/work
$ cd /usr/local/work
$ cp your-path-for-original-tool-directory/{Makefile,build.sh,genpkgname.sh} .
$ make -k
```
#!/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
#!/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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment