summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xconstruct.sh4
-rwxr-xr-xcontrol.sh13
-rw-r--r--data/adv-cmds/make.sh14
-rw-r--r--data/bash/make.sh2
l---------data/coreutils/_metadata/bash.dep1
-rw-r--r--data/coreutils/make.sh3
-rw-r--r--data/diskdev-cmds/make.sh23
l---------data/findutils/_metadata/sed.dep1
l---------data/gnupg/_metadata/ncurses.dep1
l---------data/inetutils/_metadata/libresolv.dep1
-rw-r--r--data/inetutils/make.sh2
-rw-r--r--data/jocstrap/_metadata/description2
l---------data/jocstrap/_metadata/jamvm.dep1
l---------data/jocstrap/_metadata/libffi.dep1
l---------data/jocstrap/_metadata/license1
l---------data/jocstrap/_metadata/maintainer1
-rw-r--r--data/jocstrap/_metadata/priority1
-rw-r--r--data/jocstrap/_metadata/section1
-rw-r--r--data/jocstrap/_metadata/version1
-rw-r--r--data/jocstrap/jocstrap.jarbin0 -> 1422161 bytes
-rwxr-xr-xdata/jocstrap/libjocstrap.jnilibbin0 -> 74268 bytes
-rw-r--r--data/jocstrap/make.sh3
-rw-r--r--data/network-cmds/make.sh2
-rw-r--r--data/rhino/_metadata/description2
l---------data/rhino/_metadata/jamvm.dep1
l---------data/rhino/_metadata/license1
l---------data/rhino/_metadata/maintainer1
-rw-r--r--data/rhino/_metadata/priority1
-rw-r--r--data/rhino/_metadata/section1
-rw-r--r--data/rhino/_metadata/version1
-rw-r--r--data/rhino/js.jarbin0 -> 813521 bytes
-rw-r--r--data/rhino/make.sh2
-rw-r--r--data/system-cmds/make.sh17
-rw-r--r--data/uicaboodle/_metadata/description2
l---------data/uicaboodle/_metadata/jocstrap.dep1
l---------data/uicaboodle/_metadata/license1
l---------data/uicaboodle/_metadata/maintainer1
-rw-r--r--data/uicaboodle/_metadata/priority1
-rw-r--r--data/uicaboodle/_metadata/section1
-rw-r--r--data/uicaboodle/_metadata/version1
-rwxr-xr-xdata/uicaboodle/libuicaboodle.jnilibbin0 -> 18308 bytes
-rw-r--r--data/uicaboodle/make.sh3
-rw-r--r--data/uicaboodle/uicaboodle.jarbin0 -> 3902 bytes
-rwxr-xr-xhelper.sh3
-rwxr-xr-xmake.sh21
-rwxr-xr-xpackage.sh31
-rwxr-xr-xutil/catdir.sh3
47 files changed, 144 insertions, 31 deletions
diff --git a/construct.sh b/construct.sh
index bd0c5dfe0..beb9ed809 100755
--- a/construct.sh
+++ b/construct.sh
@@ -10,8 +10,8 @@ for package in data/!(*_); do
done | gzip -9c >"${PKG_OVER}"
dpkg-scanpackages debs <(zcat "${PKG_OVER}") >"${PKG_PKGS}"
gzip -c "${PKG_PKGS}" >"${PKG_PKGS}.gz"
-rm -rf "${PKG_REPO}/debs"
-cp -a debs "${PKG_REPO}"
+#rm -rf "${PKG_REPO}/debs"
+#cp -a debs "${PKG_REPO}"
cd "${PKG_REPO}/dists/tangelo"
export PKG_RVSN=8
diff --git a/control.sh b/control.sh
index 394b9bd43..2d044e9f0 100755
--- a/control.sh
+++ b/control.sh
@@ -7,6 +7,10 @@ shift
export PKG_BASE=$(realpath "$(dirname "$0")")
. "${PKG_BASE}/helper.sh"
+if [[ -n $2 ]]; then
+ PKG_VRSN=$2
+fi
+
cat <<EOF
Package: ${PKG_NAME}
Essential: $([[ ${PKG_PRIO} == required ]] && echo yes || echo no)
@@ -32,9 +36,16 @@ fi
cat <<EOF
Maintainer: $(cat "${PKG_DATA}/_metadata/maintainer")
Architecture: darwin-arm
-Version: ${PKG_VRSN}
EOF
+echo -n "Version: ${PKG_VRSN}"
+
+if [[ $1 == status || $1 == available ]]; then
+ echo "-0"
+else
+ echo
+fi
+
if [[ $1 == available ]]; then
cat <<EOF
Size: $(find "${PKG_DEST}" -type f -exec cat {} \; | gzip -c | wc -c | cut -d $'\t' -f 1)
diff --git a/data/adv-cmds/make.sh b/data/adv-cmds/make.sh
index 651693003..1322591b9 100644
--- a/data/adv-cmds/make.sh
+++ b/data/adv-cmds/make.sh
@@ -1,5 +1,9 @@
-tar -zxvf "${PKG_DATA}/adv_cmds-118.tar.gz"
-cd adv_cmds-118
-arm-apple-darwin-gcc -o ps ps.tproj/*.c -D'__FBSDID(x)='
-mkdir -p "${PKG_DEST}/usr/bin"
-cp -a ps "${PKG_DEST}/usr/bin"
+pkg:extract
+cd *
+for tproj in lsvfs ps; do
+ arm-apple-darwin-gcc -o "${tproj}" "${tproj}.tproj"/*.c -D'__FBSDID(x)='
+ arm-apple-darwin-strip "${tproj}"
+done
+pkg: mkdir -p /bin /usr/bin
+pkg: cp -a ps /bin
+pkg: cp -a lsvfs /usr/bin
diff --git a/data/bash/make.sh b/data/bash/make.sh
index 2ac5e0236..2b5f49059 100644
--- a/data/bash/make.sh
+++ b/data/bash/make.sh
@@ -1,6 +1,6 @@
tar -zxvf "${PKG_DATA}/bash-3.2.tar.gz"
cd bash-3.2
-pkg:configure
+pkg:configure bash_cv_dev_fd=absent bash_cv_sys_named_pipes=present bash_cv_job_control_missing=missing
make
pkg:install
pkg:bin bash
diff --git a/data/coreutils/_metadata/bash.dep b/data/coreutils/_metadata/bash.dep
new file mode 120000
index 000000000..d0c818fb6
--- /dev/null
+++ b/data/coreutils/_metadata/bash.dep
@@ -0,0 +1 @@
+../../bash \ No newline at end of file
diff --git a/data/coreutils/make.sh b/data/coreutils/make.sh
index 3541a8a30..2b3311b62 100644
--- a/data/coreutils/make.sh
+++ b/data/coreutils/make.sh
@@ -3,6 +3,7 @@ cd coreutils-6.9
./configure --prefix=/usr --host=arm-apple-darwin
make
pkg:install
-pkg:bin cat chgrp chmod chown cp date dd df dir echo false hostname kill ln ls mkdir mknod mv pwd readlink rm rmdir vdir sleep stty su sync touch true uname
+pkg: rm -f /usr/bin/sync
+pkg:bin cat chgrp chmod chown cp date dd df dir echo false hostname kill ln ls mkdir mknod mv pwd readlink rm rmdir vdir sleep stty su touch true uname
pkg: mkdir -p /usr/sbin
pkg: mv /usr/bin/chroot /usr/sbin
diff --git a/data/diskdev-cmds/make.sh b/data/diskdev-cmds/make.sh
index 469b34568..96affc5d6 100644
--- a/data/diskdev-cmds/make.sh
+++ b/data/diskdev-cmds/make.sh
@@ -1,20 +1,33 @@
shopt -s extglob
-tar -zxvf "${PKG_DATA}/diskdev_cmds-419.tar.gz"
-cd diskdev_cmds-419
+pkg:extract
+cd *
+
cd disklib
rm -f mntopts.h getmntopts.c
arm-apple-darwin-gcc -c *.c
arm-apple-darwin-ar -r libdisk.a *.o
cd ..
+
for tproj in !(fstyp|dev_mkdb|dump|fsck_hfs|fuser|mount_hfs|restore|quotacheck|ufs).tproj; do
tproj=$(basename "${tproj}" .tproj)
echo ${tproj}
arm-apple-darwin-gcc -Idisklib -o "${tproj}" $(find "${tproj}.tproj" -name '*.c') disklib/libdisk.a -framework IOKit -framework CoreFoundation -lutil
- pkg:usrbin "${tproj}"
+ arm-apple-darwin-strip "${tproj}"
done
+
cd fstyp.tproj
for c in *.c; do
- bin=$(basename "${c}" .c)
+ bin=../$(basename "${c}" .c)
arm-apple-darwin-gcc -o "${bin}" "${c}"
- pkg:usrbin "${bin}"
+ arm-apple-darwin-strip "${bin}"
done
+cd ..
+
+chmod u+s umount quota
+
+pkg: mkdir -p /usr/bin /usr/libexec /usr/sbin /sbin
+
+pkg: cp -a quota /usr/bin
+pkg: cp -a vsdbutil repquota fdisk edquota quot quotaon /usr/sbin
+pkg: cp -a vndevice /usr/libexec
+pkg: cp -a clri dumpfs tunefs umount @(fsck|fstyp|mount|newfs)?(_*([a-z0-9])) /sbin
diff --git a/data/findutils/_metadata/sed.dep b/data/findutils/_metadata/sed.dep
new file mode 120000
index 000000000..315b5c89c
--- /dev/null
+++ b/data/findutils/_metadata/sed.dep
@@ -0,0 +1 @@
+../../sed \ No newline at end of file
diff --git a/data/gnupg/_metadata/ncurses.dep b/data/gnupg/_metadata/ncurses.dep
new file mode 120000
index 000000000..a395fad08
--- /dev/null
+++ b/data/gnupg/_metadata/ncurses.dep
@@ -0,0 +1 @@
+../../ncurses \ No newline at end of file
diff --git a/data/inetutils/_metadata/libresolv.dep b/data/inetutils/_metadata/libresolv.dep
new file mode 120000
index 000000000..40a8d5796
--- /dev/null
+++ b/data/inetutils/_metadata/libresolv.dep
@@ -0,0 +1 @@
+../../libresolv \ No newline at end of file
diff --git a/data/inetutils/make.sh b/data/inetutils/make.sh
index c48344358..e38e9f8f6 100644
--- a/data/inetutils/make.sh
+++ b/data/inetutils/make.sh
@@ -2,6 +2,6 @@ pkg:extract
cd *
pkg:patch
autoconf
-pkg:configure ac_cv_type_sa_family_t=yes ac_cv_type_socklen_t=yes ac_cv_member_struct_utmp_ut_user=yes ac_cv_func_obstack=no
+pkg:configure ac_cv_type_sa_family_t=yes ac_cv_type_socklen_t=yes ac_cv_member_struct_utmp_ut_user=yes ac_cv_func_obstack=no --disable-ifconfig --disable-whois --disable-whois --disable-whois --disable-whois
make
pkg:install
diff --git a/data/jocstrap/_metadata/description b/data/jocstrap/_metadata/description
new file mode 100644
index 000000000..005d9a0c9
--- /dev/null
+++ b/data/jocstrap/_metadata/description
@@ -0,0 +1,2 @@
+this package isn't described yet
+This package, which I'm certain is incredibly interesting, has yet to be described. This is probably because Jay has spent days getting all kinds of bookkeeping issues, like copyright notifications, all in their correct places, and descriptions just aren't the most important thing he could be working on. If this is a problem, please come back later.
diff --git a/data/jocstrap/_metadata/jamvm.dep b/data/jocstrap/_metadata/jamvm.dep
new file mode 120000
index 000000000..02577ed49
--- /dev/null
+++ b/data/jocstrap/_metadata/jamvm.dep
@@ -0,0 +1 @@
+../../jamvm \ No newline at end of file
diff --git a/data/jocstrap/_metadata/libffi.dep b/data/jocstrap/_metadata/libffi.dep
new file mode 120000
index 000000000..da9d6c358
--- /dev/null
+++ b/data/jocstrap/_metadata/libffi.dep
@@ -0,0 +1 @@
+../../libffi \ No newline at end of file
diff --git a/data/jocstrap/_metadata/license b/data/jocstrap/_metadata/license
new file mode 120000
index 000000000..b9c4e3684
--- /dev/null
+++ b/data/jocstrap/_metadata/license
@@ -0,0 +1 @@
+../../../licenses/menes \ No newline at end of file
diff --git a/data/jocstrap/_metadata/maintainer b/data/jocstrap/_metadata/maintainer
new file mode 120000
index 000000000..0fa66e077
--- /dev/null
+++ b/data/jocstrap/_metadata/maintainer
@@ -0,0 +1 @@
+../../../people/saurik \ No newline at end of file
diff --git a/data/jocstrap/_metadata/priority b/data/jocstrap/_metadata/priority
new file mode 100644
index 000000000..134d9bc32
--- /dev/null
+++ b/data/jocstrap/_metadata/priority
@@ -0,0 +1 @@
+optional
diff --git a/data/jocstrap/_metadata/section b/data/jocstrap/_metadata/section
new file mode 100644
index 000000000..463a353df
--- /dev/null
+++ b/data/jocstrap/_metadata/section
@@ -0,0 +1 @@
+programming
diff --git a/data/jocstrap/_metadata/version b/data/jocstrap/_metadata/version
new file mode 100644
index 000000000..6d4f3b8cc
--- /dev/null
+++ b/data/jocstrap/_metadata/version
@@ -0,0 +1 @@
+1.0.2274
diff --git a/data/jocstrap/jocstrap.jar b/data/jocstrap/jocstrap.jar
new file mode 100644
index 000000000..1a84dc587
--- /dev/null
+++ b/data/jocstrap/jocstrap.jar
Binary files differ
diff --git a/data/jocstrap/libjocstrap.jnilib b/data/jocstrap/libjocstrap.jnilib
new file mode 100755
index 000000000..596e233b0
--- /dev/null
+++ b/data/jocstrap/libjocstrap.jnilib
Binary files differ
diff --git a/data/jocstrap/make.sh b/data/jocstrap/make.sh
new file mode 100644
index 000000000..4b6668d9e
--- /dev/null
+++ b/data/jocstrap/make.sh
@@ -0,0 +1,3 @@
+pkg: mkdir -p /usr/lib /usr/share/java
+pkg: cp %/libjocstrap.jnilib /usr/lib
+pkg: cp %/jocstrap.jar /usr/share/java
diff --git a/data/network-cmds/make.sh b/data/network-cmds/make.sh
index bded00874..90dd13938 100644
--- a/data/network-cmds/make.sh
+++ b/data/network-cmds/make.sh
@@ -1,7 +1,7 @@
shopt -s extglob
tar -zxvf "${PKG_DATA}/network_cmds-306.tar.gz"
cd network_cmds-306
-for tproj in !(natd|spray).tproj; do
+for tproj in !(natd|ping|spray).tproj; do
tproj=$(basename "${tproj}" .tproj)
arm-apple-darwin-gcc -o "${tproj}" "${tproj}.tproj"/*.c -DPRIVATE -Dether_ntohost=_old_ether_ntohost
pkg:usrbin "${tproj}"
diff --git a/data/rhino/_metadata/description b/data/rhino/_metadata/description
new file mode 100644
index 000000000..005d9a0c9
--- /dev/null
+++ b/data/rhino/_metadata/description
@@ -0,0 +1,2 @@
+this package isn't described yet
+This package, which I'm certain is incredibly interesting, has yet to be described. This is probably because Jay has spent days getting all kinds of bookkeeping issues, like copyright notifications, all in their correct places, and descriptions just aren't the most important thing he could be working on. If this is a problem, please come back later.
diff --git a/data/rhino/_metadata/jamvm.dep b/data/rhino/_metadata/jamvm.dep
new file mode 120000
index 000000000..02577ed49
--- /dev/null
+++ b/data/rhino/_metadata/jamvm.dep
@@ -0,0 +1 @@
+../../jamvm \ No newline at end of file
diff --git a/data/rhino/_metadata/license b/data/rhino/_metadata/license
new file mode 120000
index 000000000..9c13a9a0f
--- /dev/null
+++ b/data/rhino/_metadata/license
@@ -0,0 +1 @@
+../../../licenses/gpl-2 \ No newline at end of file
diff --git a/data/rhino/_metadata/maintainer b/data/rhino/_metadata/maintainer
new file mode 120000
index 000000000..0fa66e077
--- /dev/null
+++ b/data/rhino/_metadata/maintainer
@@ -0,0 +1 @@
+../../../people/saurik \ No newline at end of file
diff --git a/data/rhino/_metadata/priority b/data/rhino/_metadata/priority
new file mode 100644
index 000000000..134d9bc32
--- /dev/null
+++ b/data/rhino/_metadata/priority
@@ -0,0 +1 @@
+optional
diff --git a/data/rhino/_metadata/section b/data/rhino/_metadata/section
new file mode 100644
index 000000000..463a353df
--- /dev/null
+++ b/data/rhino/_metadata/section
@@ -0,0 +1 @@
+programming
diff --git a/data/rhino/_metadata/version b/data/rhino/_metadata/version
new file mode 100644
index 000000000..808fd9d68
--- /dev/null
+++ b/data/rhino/_metadata/version
@@ -0,0 +1 @@
+1.6R7
diff --git a/data/rhino/js.jar b/data/rhino/js.jar
new file mode 100644
index 000000000..2e0d1e8ff
--- /dev/null
+++ b/data/rhino/js.jar
Binary files differ
diff --git a/data/rhino/make.sh b/data/rhino/make.sh
new file mode 100644
index 000000000..ebc91a21a
--- /dev/null
+++ b/data/rhino/make.sh
@@ -0,0 +1,2 @@
+pkg: mkdir -p /usr/share/java
+pkg: cp %/js.jar /usr/share/java
diff --git a/data/system-cmds/make.sh b/data/system-cmds/make.sh
index 7a200fe3b..0275ab3e8 100644
--- a/data/system-cmds/make.sh
+++ b/data/system-cmds/make.sh
@@ -1,16 +1,25 @@
shopt -s extglob
-tar -zxvf "${PKG_DATA}/system_cmds-431.tar.gz"
-cd system_cmds-431
-mkdir -p "${PKG_DEST}/usr/bin"
+pkg:extract
+cd *
+
cd getconf.tproj
for gperf in *.gperf; do
LC_ALL=C awk -f fake-gperf.awk <"${gperf}" >"$(basename "${gperf}" .gperf).c"
done
cd ..
+
cp -va "${PKG_DATA}"/kextmanager* .
# dmesg reboot shutdown
for tproj in getconf getty hostinfo iostat login nvram passwd sync sysctl vipw zprint; do
echo "${tproj}"
arm-apple-darwin-gcc -o "${tproj}" "${tproj}.tproj"/!(od_passwd).c -I. -D'__FBSDID(x)=' -DTARGET_OS_EMBEDDED -framework CoreFoundation -framework IOKit kextmanagerUser.c
- cp -a "${tproj}" "${PKG_DEST}/usr/bin"
+ arm-apple-darwin-strip "${tproj}"
done
+
+chmod u+s passwd login
+
+pkg: mkdir -p /bin /usr/bin /usr/sbin
+
+pkg: cp -a sync /bin
+pkg: cp -a passwd zprint getty getconf hostinfo login /usr/bin
+pkg: cp -a sysctl nvram vipw iostat /usr/sbin
diff --git a/data/uicaboodle/_metadata/description b/data/uicaboodle/_metadata/description
new file mode 100644
index 000000000..005d9a0c9
--- /dev/null
+++ b/data/uicaboodle/_metadata/description
@@ -0,0 +1,2 @@
+this package isn't described yet
+This package, which I'm certain is incredibly interesting, has yet to be described. This is probably because Jay has spent days getting all kinds of bookkeeping issues, like copyright notifications, all in their correct places, and descriptions just aren't the most important thing he could be working on. If this is a problem, please come back later.
diff --git a/data/uicaboodle/_metadata/jocstrap.dep b/data/uicaboodle/_metadata/jocstrap.dep
new file mode 120000
index 000000000..f263623b3
--- /dev/null
+++ b/data/uicaboodle/_metadata/jocstrap.dep
@@ -0,0 +1 @@
+../../jocstrap \ No newline at end of file
diff --git a/data/uicaboodle/_metadata/license b/data/uicaboodle/_metadata/license
new file mode 120000
index 000000000..b9c4e3684
--- /dev/null
+++ b/data/uicaboodle/_metadata/license
@@ -0,0 +1 @@
+../../../licenses/menes \ No newline at end of file
diff --git a/data/uicaboodle/_metadata/maintainer b/data/uicaboodle/_metadata/maintainer
new file mode 120000
index 000000000..0fa66e077
--- /dev/null
+++ b/data/uicaboodle/_metadata/maintainer
@@ -0,0 +1 @@
+../../../people/saurik \ No newline at end of file
diff --git a/data/uicaboodle/_metadata/priority b/data/uicaboodle/_metadata/priority
new file mode 100644
index 000000000..134d9bc32
--- /dev/null
+++ b/data/uicaboodle/_metadata/priority
@@ -0,0 +1 @@
+optional
diff --git a/data/uicaboodle/_metadata/section b/data/uicaboodle/_metadata/section
new file mode 100644
index 000000000..463a353df
--- /dev/null
+++ b/data/uicaboodle/_metadata/section
@@ -0,0 +1 @@
+programming
diff --git a/data/uicaboodle/_metadata/version b/data/uicaboodle/_metadata/version
new file mode 100644
index 000000000..6d4f3b8cc
--- /dev/null
+++ b/data/uicaboodle/_metadata/version
@@ -0,0 +1 @@
+1.0.2274
diff --git a/data/uicaboodle/libuicaboodle.jnilib b/data/uicaboodle/libuicaboodle.jnilib
new file mode 100755
index 000000000..2e692c2b9
--- /dev/null
+++ b/data/uicaboodle/libuicaboodle.jnilib
Binary files differ
diff --git a/data/uicaboodle/make.sh b/data/uicaboodle/make.sh
new file mode 100644
index 000000000..03edf96dd
--- /dev/null
+++ b/data/uicaboodle/make.sh
@@ -0,0 +1,3 @@
+pkg: mkdir -p /usr/lib /usr/share/java
+pkg: cp %/libuicaboodle.jnilib /usr/lib
+pkg: cp %/uicaboodle.jar /usr/share/java
diff --git a/data/uicaboodle/uicaboodle.jar b/data/uicaboodle/uicaboodle.jar
new file mode 100644
index 000000000..36afd169d
--- /dev/null
+++ b/data/uicaboodle/uicaboodle.jar
Binary files differ
diff --git a/helper.sh b/helper.sh
index 74e26dc25..939fde011 100755
--- a/helper.sh
+++ b/helper.sh
@@ -6,8 +6,7 @@ export PKG_WORK=${PKG_BASE}/work/${PKG_NAME}
export PKG_DEST=${PKG_BASE}/dest/${PKG_NAME}
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")-1
-export PKG_PACK=${PKG_BASE}/debs/${PKG_NAME}_${PKG_VRSN}_darwin-arm.deb
+export PKG_VRSN=$(cat "${PKG_DATA}/_metadata/version")
if [[ ! -e ${PKG_DATA} ]]; then
echo "unknown package: ${PKG_NAME}" 1>&2
diff --git a/make.sh b/make.sh
index e525aa988..4955314cc 100755
--- a/make.sh
+++ b/make.sh
@@ -22,20 +22,19 @@ export PKG_HASH=$({
for dep in "${PKG_DEPS[@]}"; do
DEP_NAME=$(basename "${dep}" .dep)
DEP_DEST=${PKG_BASE}/dest/${DEP_NAME}
- find -H "${DEP_DEST}" -type l -printf '%p -> %l\n' | sort
- find -H "${DEP_DEST}" -type f -print0 | sort -z | xargs -0 cat
+ "${PKG_BASE}"/util/catdir.sh "${DEP_DEST}"
done
} | md5sum | cut -d ' ' -f 1)
-echo "hashed ${PKG_NAME} to: ${PKG_HASH}"
+echo "hashed data ${PKG_NAME} to: ${PKG_HASH}"
-if [[ -e "${PKG_STAT}/md5" && ${PKG_HASH} == $(cat "${PKG_STAT}/md5") ]]; then
+if [[ -e "${PKG_STAT}/data-md5" && ${PKG_HASH} == $(cat "${PKG_STAT}/data-md5") ]]; then
echo "skipping re-build of ${PKG_NAME}"
exit
fi
-rm -rf "${PKG_STAT}"
-mkdir "${PKG_STAT}"
+mkdir -p "${PKG_STAT}"
+rm -f "${PKG_STAT}/data-md5"
rm -rf "${PKG_DEST}"
mkdir "${PKG_DEST}"
@@ -102,6 +101,9 @@ function pkg:extract() {
for tgz in "${PKG_DATA}"/{*.tar.gz,*.tgz}; do
tar -zxvf "${tgz}"
done
+ for zip in "${PKG_DATA}"/*.zip; do
+ unzip "${zip}"
+ done
for tbz2 in "${PKG_DATA}"/*.tar.bz2; do
tar -jxvf "${tbz2}"
done
@@ -156,4 +158,9 @@ rmdir_ "${PKG_DEST}/usr/local"
rmdir_ "${PKG_DEST}/usr/lib"
rmdir_ "${PKG_DEST}/usr"
-echo "${PKG_HASH}" >"${PKG_STAT}/md5"
+if [[ -e "${PKG_DEST}"{/usr,}/?(s)bin ]]; then
+ find "${PKG_DEST}"{/usr,}/?(s)bin -type f -exec arm-apple-darwin-strip {} \;
+fi
+
+cp -a "${PKG_DATA}/_metadata/version" "${PKG_STAT}/data-ver"
+echo "${PKG_HASH}" >"${PKG_STAT}/data-md5"
diff --git a/package.sh b/package.sh
index 6781b1538..74c838e16 100755
--- a/package.sh
+++ b/package.sh
@@ -2,6 +2,11 @@
set -e
shopt -s extglob nullglob
+if [[ $# == 0 ]]; then
+ echo "usage: $0 <package>"
+ exit
+fi
+
export PKG_MAKE=$0
export PKG_NAME=${1%_}
@@ -12,5 +17,29 @@ export PKG_BASE=$(realpath "$(dirname "$0")")
pkg: mkdir -p /DEBIAN
./control.sh "${PKG_NAME}" control >"$(pkg_ /DEBIAN/control)"
-dpkg-deb -b "${PKG_DEST}" "${PKG_PACK}"
+
+export PKG_HASH=$(util/catdir.sh "${PKG_DEST}" | md5sum | cut -d ' ' -f 1)
+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
+ PKG_RVSN=$((${PKG_RVSN} + 1))
+ fi
+
+ export PKG_PACK=${PKG_BASE}/debs/${PKG_NAME}_${PKG_VRSN}-${PKG_RVSN}_darwin-arm.deb
+ if [[ -e ${PKG_PACK} ]]; then
+ echo "package ${PKG_PACK} already exists..."
+ else
+ ./control.sh "${PKG_NAME}" control "${PKG_VRSN}-${PKG_RVSN}" >"$(pkg_ /DEBIAN/control)"
+ dpkg-deb -b "${PKG_DEST}" "${PKG_PACK}"
+ echo "${PKG_HASH}" >"${PKG_STAT}/dest-md5"
+ echo "${PKG_RVSN}" >"${PKG_STAT}/dest-ver"
+ fi
+fi
+
pkg: rm -rf /DEBIAN
diff --git a/util/catdir.sh b/util/catdir.sh
new file mode 100755
index 000000000..dd10be199
--- /dev/null
+++ b/util/catdir.sh
@@ -0,0 +1,3 @@
+#!/bin/bash
+find -H "$1" -type l -printf '%p -> %l\n' | sort
+find -H "$1" -type f -print0 | sort -z | xargs -0 cat