summaryrefslogtreecommitdiff
path: root/rehash.sh
diff options
context:
space:
mode:
authorJay Freeman <saurik@saurik.com>2008-04-14 23:22:48 +0000
committerJay Freeman <saurik@saurik.com>2008-04-14 23:22:48 +0000
commit7817782b2837cf98f7566e13f80b9c071ff20139 (patch)
tree452a5677d990e0d9dc9c36ac08bd4204e447afc2 /rehash.sh
parente615a71056dfae4f19dfef86331eb030494b79b7 (diff)
Fixed some dependencies, removed mDNS fix for 2.0, and factored for multi-arch support.
git-svn-id: http://svn.telesphoreo.org/trunk@218 514c082c-b64e-11dc-b46d-3d985efe055d
Diffstat (limited to 'rehash.sh')
-rwxr-xr-xrehash.sh37
1 files changed, 37 insertions, 0 deletions
diff --git a/rehash.sh b/rehash.sh
new file mode 100755
index 000000000..0dbb066e4
--- /dev/null
+++ b/rehash.sh
@@ -0,0 +1,37 @@
+#!/bin/bash
+set -e
+shopt -s extglob nullglob
+
+if [[ $# == 0 ]]; then
+ echo "usage: $0 <package>"
+ exit
+fi
+
+export PKG_MAKE=$0
+export PKG_NAME=${1%_}
+
+export PKG_BASE=$(realpath "$(dirname "$0")")
+source "${PKG_BASE}/helper.sh"
+
+./make.sh "${PKG_NAME}"
+
+pkg: mkdir -p /DEBIAN
+./control.sh "${PKG_NAME}" control >"$(pkg_ /DEBIAN/control)"
+
+if [[ -e "${PKG_DATA}"/_metadata/preinst ]]; then
+ cp -a "${PKG_DATA}"/_metadata/preinst "$(pkg_ /DEBIAN)"
+fi
+
+if [[ -e "${PKG_DATA}"/_metadata/postinst ]]; then
+ cp -a "${PKG_DATA}"/_metadata/postinst "$(pkg_ /DEBIAN)"
+fi
+
+if [[ -e "${PKG_DATA}"/_metadata/prerm ]]; then
+ cp -a "${PKG_DATA}"/_metadata/prerm "$(pkg_ /DEBIAN)"
+fi
+
+export PKG_HASH=$(util/catdir.sh "${PKG_DEST}" | md5sum | cut -d ' ' -f 1)
+echo "hashed dest ${PKG_NAME} to: ${PKG_HASH}"
+echo "${PKG_HASH}" >"${PKG_STAT}/dest-md5"
+
+pkg: rm -rf /DEBIAN