2018-06-22 01:15:35 +02:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2018-08-15 16:52:18 +02:00
|
|
|
set -e
|
|
|
|
|
2018-06-22 01:15:35 +02:00
|
|
|
check_package() { # path
|
2019-02-12 09:41:30 +01:00
|
|
|
# Avoid ending on errors such as $(which prog)
|
2018-10-14 23:14:06 +02:00
|
|
|
# where prog is not installed.
|
|
|
|
set +e
|
|
|
|
|
2018-06-22 01:15:35 +02:00
|
|
|
local path=$1
|
2019-02-12 09:41:30 +01:00
|
|
|
local pkg=$(basename $path)
|
2018-06-22 01:15:35 +02:00
|
|
|
TERMUX_PKG_MAINTAINER="Fredrik Fornwall @fornwall"
|
|
|
|
. $path/build.sh
|
|
|
|
|
|
|
|
echo " {"
|
|
|
|
echo " \"name\": \"$pkg\","
|
|
|
|
echo " \"version\": \"$TERMUX_PKG_VERSION\","
|
2019-02-12 09:41:30 +01:00
|
|
|
DESC=$(echo $TERMUX_PKG_DESCRIPTION | head -n 1)
|
2018-06-22 01:15:35 +02:00
|
|
|
echo " \"description\": \"$DESC\","
|
|
|
|
echo " \"homepage\": \"$TERMUX_PKG_HOMEPAGE\","
|
|
|
|
|
2018-06-22 23:34:51 +02:00
|
|
|
echo -n " \"depends\": ["
|
|
|
|
FIRST_DEP=yes
|
|
|
|
for p in ${TERMUX_PKG_DEPENDS//,/ }; do
|
|
|
|
if [ $FIRST_DEP = yes ]; then
|
|
|
|
FIRST_DEP=no
|
|
|
|
else
|
|
|
|
echo -n ", "
|
|
|
|
fi
|
|
|
|
echo -n "\"$p\""
|
|
|
|
done
|
|
|
|
echo "],"
|
2018-06-22 01:15:35 +02:00
|
|
|
|
|
|
|
if [ "$TERMUX_PKG_SRCURL" != "" ]; then
|
|
|
|
echo " \"srcurl\": \"$TERMUX_PKG_SRCURL\","
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo " \"maintainer\": \"$TERMUX_PKG_MAINTAINER\""
|
|
|
|
echo -n " }"
|
|
|
|
}
|
|
|
|
|
2018-08-15 16:52:18 +02:00
|
|
|
. scripts/properties.sh
|
2018-06-22 01:15:35 +02:00
|
|
|
export TERMUX_ARCH=aarch64
|
|
|
|
|
|
|
|
echo '['
|
|
|
|
|
|
|
|
export FIRST=yes
|
|
|
|
# Run each package in separate process since we include their environment variables:
|
|
|
|
for path in packages/*; do
|
|
|
|
|
|
|
|
if [ $FIRST = yes ]; then
|
|
|
|
FIRST=no
|
|
|
|
else
|
|
|
|
echo -n ","
|
|
|
|
echo ""
|
|
|
|
fi
|
|
|
|
|
|
|
|
( check_package $path)
|
|
|
|
done
|
|
|
|
|
|
|
|
echo ""
|
|
|
|
echo ']'
|