summaryrefslogtreecommitdiff
path: root/construct.sh
diff options
context:
space:
mode:
Diffstat (limited to 'construct.sh')
-rwxr-xr-xconstruct.sh59
1 files changed, 39 insertions, 20 deletions
diff --git a/construct.sh b/construct.sh
index c2d2618ee..ae97d654c 100755
--- a/construct.sh
+++ b/construct.sh
@@ -1,35 +1,54 @@
#!/bin/bash
set -e
shopt -s extglob nullglob
-PKG_BASE=$(pwd)
+
+PKG_BASE=$(dirname "$(realpath "$0")")
+cd "${PKG_BASE}"
+PKG_RVSN=213
+
PKG_REPO=/dat/web/apt.saurik.com
PKG_OVER=${PKG_REPO}/indices/override.tangelo.main.gz
-PKG_PKGS=${PKG_REPO}/dists/tangelo/main/binary-darwin-arm/Packages
-tag=arm-apple-darwin
-rm -rf link
-mkdir link
-for package in data/!(*_); do
- PKG_NAME=$(basename "${package}")
- PKG_DATA="${PKG_BASE}/data/${PKG_NAME}"
- echo "${PKG_NAME}" "$(cat "${PKG_DATA}/_metadata/priority")" "$(cat "${PKG_DATA}/_metadata/section")"
- ln -s "../debs/${PKG_NAME}_$(cat "${PKG_DATA}/_metadata/version")-$(cat "${PKG_BASE}/stat/${tag}/${PKG_NAME}/dest-ver")_darwin-arm.deb" link
-done | gzip -9c >"${PKG_OVER}"
-dpkg-scanpackages link <(zcat "${PKG_OVER}") | sed -e 's/: link\//: debs\//' >"${PKG_PKGS}"
-gzip -c "${PKG_PKGS}" >"${PKG_PKGS}.gz"
-#rm -rf "${PKG_REPO}/debs"
-#cp -a debs "${PKG_REPO}"
-cd "${PKG_REPO}/dists/tangelo"
-export PKG_RVSN=129
+for PKG_ARCH in "${PKG_BASE}/arch"/*; do
+ PKG_ARCH=$(basename "${PKG_ARCH}")
+ echo "scanning ${PKG_ARCH}"
+
+ PKG_PKGS=${PKG_REPO}/dists/tangelo/main/binary-${PKG_ARCH}/Packages
+
+ rm -rf "${PKG_BASE}/link"
+ mkdir "${PKG_BASE}/link"
+ for package in "${PKG_BASE}/data"/!(*_); do
+ PKG_NAME=$(basename "${package}")
+ PKG_DATA="${PKG_BASE}/data/${PKG_NAME}"
+ PKG_PRIO=$(cat "${PKG_DATA}/_metadata/priority")
+ echo "${PKG_NAME}" "${PKG_PRIO#+}" "$(cat "${PKG_DATA}/_metadata/section")"
-cat >main/binary-darwin-arm/Release <<EOF
+ PKG_FILE=${PKG_BASE}/stat/${PKG_ARCH}/${PKG_NAME}/dest-ver
+ if [[ -e ${PKG_FILE} ]]; then
+ PKG_FILE=${PKG_BASE}/debs/${PKG_NAME}_$(cat "${PKG_DATA}/_metadata/version")-$(cat "${PKG_FILE}")_${PKG_ARCH}.deb
+ if [[ -e ${PKG_FILE} ]]; then
+ ln -s "${PKG_FILE}" "${PKG_BASE}/link"
+ echo "${PKG_FILE}"
+ fi
+ fi
+ done | gzip -9c >"${PKG_OVER}"
+
+ dpkg-scanpackages "link" <(zcat "${PKG_OVER}") | sed -e 's/: link\//: debs\//' >"${PKG_PKGS}"
+ gzip -c "${PKG_PKGS}" >"${PKG_PKGS}.gz"
+ #rm -rf "${PKG_REPO}/debs"
+ #cp -a debs "${PKG_REPO}"
+
+ cat >"${PKG_REPO}/dists/tangelo/main/binary-${PKG_ARCH}/Release" <<EOF
Archive: stable
Version: 1.0r${PKG_RVSN}
Component: main
Origin: Jay Freeman (saurik)
Label: Telesphoreo
-Architecture: darwin-arm
+Architecture: ${PKG_ARCH}
EOF
+done
+
+cd "${PKG_REPO}/dists/tangelo"
{
cat <<EOF
@@ -38,7 +57,7 @@ Label: Telesphoreo
Suite: stable
Version: 1.0r${PKG_RVSN}
Codename: tangelo
-Architectures: darwin-arm
+Architectures:$(for PKG_ARCH in "${PKG_BASE}/arch"/*; do echo -n " $(basename "${PKG_ARCH}")"; done)
Components: main
Description: Telesphoreo Tangelo 1.0r${PKG_RVSN}
MD5Sum: