Introduce TERMUX_PKG_SKIP_SRC_EXTRACT
This new construct allows us to specify the src url in a structured way for e.g. repology metadata. Start by using it in ack-grep and ca-certificates.
This commit is contained in:
parent
0fac83ccb4
commit
a00923eee0
@ -474,7 +474,7 @@ termux_step_start_build() {
|
||||
|
||||
# Run just after sourcing $TERMUX_PKG_BUILDER_SCRIPT. May be overridden by packages.
|
||||
termux_step_extract_package() {
|
||||
if [ -z "${TERMUX_PKG_SRCURL:=""}" ]; then
|
||||
if [ -z "${TERMUX_PKG_SRCURL:=""}" ] || [ -n "${TERMUX_PKG_SKIP_SRC_EXTRACT:=""}" ]; then
|
||||
mkdir -p "$TERMUX_PKG_SRCDIR"
|
||||
return
|
||||
fi
|
||||
|
@ -1,15 +1,18 @@
|
||||
TERMUX_PKG_HOMEPAGE=https://beyondgrep.com/
|
||||
TERMUX_PKG_DESCRIPTION="Tool like grep optimized for programmers"
|
||||
TERMUX_PKG_VERSION=2.22
|
||||
TERMUX_PKG_SRCURL=https://beyondgrep.com/ack-${TERMUX_PKG_VERSION}-single-file
|
||||
TERMUX_PKG_SHA256=fd0617585b88517a3d41d3d206c1dc38058c57b90dfd88c278049a41aeb5be38
|
||||
TERMUX_PKG_SKIP_SRC_EXTRACT=yes
|
||||
# Depend on coreutils for bin/env
|
||||
TERMUX_PKG_DEPENDS="perl, coreutils"
|
||||
TERMUX_PKG_PLATFORM_INDEPENDENT=yes
|
||||
|
||||
termux_step_make_install () {
|
||||
termux_download \
|
||||
https://beyondgrep.com/ack-${TERMUX_PKG_VERSION}-single-file \
|
||||
$TERMUX_PKG_SRCURL \
|
||||
$TERMUX_PREFIX/bin/ack \
|
||||
fd0617585b88517a3d41d3d206c1dc38058c57b90dfd88c278049a41aeb5be38
|
||||
$TERMUX_PKG_SHA256
|
||||
touch $TERMUX_PREFIX/bin/ack
|
||||
chmod +x $TERMUX_PREFIX/bin/ack
|
||||
}
|
||||
|
@ -1,19 +1,21 @@
|
||||
TERMUX_PKG_HOMEPAGE=https://curl.haxx.se/docs/caextract.html
|
||||
TERMUX_PKG_DESCRIPTION="Common CA certificates"
|
||||
TERMUX_PKG_VERSION=20180620
|
||||
TERMUX_PKG_SRCURL=https://curl.haxx.se/ca/cacert.pem
|
||||
# If the checksum has changed, it may be time to update the package version:
|
||||
TERMUX_PKG_SHA256=238823cd92d3bcdd67c1c278536d6c282dd6b526ee6ee97efbf00ef31d8c5d79
|
||||
TERMUX_PKG_SKIP_SRC_EXTRACT=yes
|
||||
TERMUX_PKG_PLATFORM_INDEPENDENT=yes
|
||||
|
||||
termux_step_make_install () {
|
||||
local CERTDIR=$TERMUX_PREFIX/etc/tls
|
||||
local CERTFILE=$CERTDIR/cert.pem
|
||||
# If the checksum has changed, it may be time to update the package version.
|
||||
local CERTFILE_SHA256=238823cd92d3bcdd67c1c278536d6c282dd6b526ee6ee97efbf00ef31d8c5d79
|
||||
|
||||
mkdir -p $CERTDIR
|
||||
|
||||
termux_download https://curl.haxx.se/ca/cacert.pem \
|
||||
termux_download $TERMUX_PKG_SRCURL \
|
||||
$CERTFILE \
|
||||
$CERTFILE_SHA256
|
||||
$TERMUX_PKG_SHA256
|
||||
touch $CERTFILE
|
||||
|
||||
# Build java keystore which is split out into a ca-certificates-java subpackage:
|
||||
|
Loading…
x
Reference in New Issue
Block a user