diff options
-rwxr-xr-x | bootstrap.sh | 4 | ||||
-rwxr-xr-x | control.sh | 22 | ||||
-rwxr-xr-x | helper.sh | 1 | ||||
-rwxr-xr-x | package.sh | 1 |
4 files changed, 19 insertions, 9 deletions
diff --git a/bootstrap.sh b/bootstrap.sh index 33bfddc44..da0979d04 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -10,7 +10,7 @@ svn export "${PKG_BASE}/over" "${PKG_BOOT}" mkdir -p "${PKG_BOOT}/var/lib/dpkg/info" -PKG_REQS=(adv-cmds base cydia gawk grep inetutils nano network-cmds nvi saurik sed shell-cmds system-cmds unzip zip) +PKG_REQS=(adv-cmds base coreutils cydia gawk grep inetutils nano network-cmds nvi saurik sed shell-cmds system-cmds unzip zip) cd "${PKG_BASE}/data" PKG_REQS=($(find -L "${PKG_REQS[@]}" | while read -r line; do realpath "${line}"; done | grep "/home/saurik/telesphoreo/data/[^/]*$" | sed -e 's/.*\///' | sort -u)) @@ -37,7 +37,7 @@ cd "${PKG_BOOT}" rm -f ../Packager.xml find * -type l -print -o -name "terminfo" -prune | while read -r link; do - echo "<array><string>Exec</string><string>/bin/ln -fs \"$(readlink "${link}")\" \"/${link}\"</string></array>" + echo "<array><string>Exec</string><string>/bin/ln -fs $(readlink "${link}") /${link}</string></array>" rm -f "${link}" done >>../Packager.xml diff --git a/control.sh b/control.sh index 2ae9c00e3..3b9f4c76a 100755 --- a/control.sh +++ b/control.sh @@ -13,12 +13,11 @@ fi cat <<EOF Package: ${PKG_NAME} -Essential: $([[ ${PKG_PRIO} == required ]] && echo yes || echo no) EOF -if [[ -e ${PKG_DATA}/_metadata/name ]]; then +if [[ ${PKG_PRIO} == required ]]; then cat <<EOF -Name: $(cat "${PKG_DATA}/_metadata/name") +Essential: yes EOF fi @@ -33,9 +32,9 @@ Priority: ${PKG_PRIO} Section: $(cat "${PKG_DATA}/_metadata/section") EOF -if [[ $1 == status || $1 == control ]]; then +if [[ $1 == status || $1 == available ]]; then cat <<EOF -Installed-Size: $(du -s "${PKG_DEST}" | cut -d $'\t' -f 1) +Installed-Size: $(dpkg -f "${PKG_BASE}/debs/${PKG_NAME}_${PKG_VRSN}-${PKG_RVSN}_darwin-arm.deb" Installed-Size) EOF fi @@ -47,7 +46,7 @@ EOF echo -n "Version: ${PKG_VRSN}" if [[ $1 == status || $1 == available ]]; then - echo "-$(cat "${PKG_STAT}/dest-ver")" + echo "-${PKG_RVSN}" else echo fi @@ -76,8 +75,19 @@ fi cat <<EOF Description: $(head -n 1 "${PKG_DATA}/_metadata/description") +EOF + +if [[ $(wc -l "${PKG_DATA}/_metadata/description" | cut -d ' ' -f 1) -gt 1 ]]; then + cat <<EOF $(tail -n +2 "${PKG_DATA}/_metadata/description" | fold -sw 72 | sed -e 's/^/ /') EOF +fi + +if [[ -e ${PKG_DATA}/_metadata/name ]]; then + cat <<EOF +Name: $(cat "${PKG_DATA}/_metadata/name") +EOF +fi if [[ $1 == status || $1 == available ]]; then echo @@ -8,6 +8,7 @@ export PKG_STAT=${PKG_BASE}/stat/${PKG_NAME} export PKG_DATA=$(echo "${PKG_BASE}"/data/"${PKG_NAME}"?(_)) export PKG_VRSN=$(cat "${PKG_DATA}/_metadata/version") export PKG_PRIO=$(cat "${PKG_DATA}/_metadata/priority") +export PKG_RVSN=$(cat "${PKG_STAT}/dest-ver" 2>/dev/null) if [[ ! -e ${PKG_DATA} ]]; then echo "unknown package: ${PKG_NAME}" 1>&2 diff --git a/package.sh b/package.sh index a0f1447bb..6020d464f 100755 --- a/package.sh +++ b/package.sh @@ -25,7 +25,6 @@ echo "hashed dest ${PKG_NAME} to: ${PKG_HASH}" if [[ -e "${PKG_STAT}/dest-md5" && ${PKG_HASH} == $(cat "${PKG_STAT}/dest-md5" 2>/dev/null) ]]; then echo "skipping re-package of ${PKG_NAME}" else - export PKG_RVSN=$(cat "${PKG_STAT}/dest-ver") if [[ -z ${PKG_RVSN} ]]; then PKG_RVSN=1 else |