summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/ipkg-build57
-rw-r--r--scripts/ipkg-make-index.sh4
-rw-r--r--scripts/scan-pkgs.sh27
-rw-r--r--scripts/scan-tools.sh12
4 files changed, 35 insertions, 65 deletions
diff --git a/scripts/ipkg-build b/scripts/ipkg-build
index a94593944..47158c409 100644
--- a/scripts/ipkg-build
+++ b/scripts/ipkg-build
@@ -1,12 +1,9 @@
#!/usr/bin/env bash
-
# ipkg-build -- construct a .ipk from a directory
+# Waldemar Brodkorb <wbx@openadk.org>
+# use cpio instead of tar for uid/gid handling
# Carl Worth <cworth@east.isi.edu>
-# based on a script by Steve Redler IV, steve@sr-tech.com 5-21-2001
-# 2003-04-25 rea@sr.unh.edu
-# Updated to work on Familiar Pre0.7rc1, with busybox tar.
-# Note it Requires: binutils-ar (since the busybox ar can't create)
-# For UID debugging it needs a better "find".
+# based on a script by Steve Redler IV <steve@sr-tech.com>
set -e
version=1.0
@@ -47,19 +44,6 @@ pkg_appears_sane() {
PKG_ERROR=0
- cvs_dirs=`find . -name 'CVS'`
- if [ -n "$cvs_dirs" ]; then
- if [ "$noclean" = "1" ]; then
- echo "*** Warning: The following CVS directories where found.
-You probably want to remove them: " >&2
- ls -ld $cvs_dirs
- echo >&2
- else
- echo "*** Removing the following files: $cvs_dirs"
- rm -rf "$cvs_dirs"
- fi
- fi
-
tilde_files=`find . -name '*~'`
if [ -n "$tilde_files" ]; then
if [ "$noclean" = "1" ]; then
@@ -162,20 +146,10 @@ You probably want to remove them: " >&2
###
# ipkg-build "main"
###
-ogargs=""
-outer=ar
noclean=0
-usage="Usage: $0 [-c] [-C] [-o owner] [-g group] <pkg_directory> [<destination_directory>]"
-while getopts "cg:ho:v" opt; do
+usage="Usage: $0 [-C] <pkg_directory> [<destination_directory>]"
+while getopts ":h:v" opt; do
case $opt in
- o ) owner=$OPTARG
- ogargs="--owner=$owner"
- ;;
- g ) group=$OPTARG
- ogargs="$ogargs --group=$group"
- ;;
- c ) outer=tar
- ;;
C ) noclean=1
;;
v ) echo $version
@@ -186,7 +160,6 @@ while getopts "cg:ho:v" opt; do
esac
done
-
shift $(($OPTIND - 1))
# continue on to process additional arguments
@@ -232,22 +205,18 @@ fi
tmp_dir=$dest_dir/IPKG_BUILD.$$
mkdir $tmp_dir
-echo $CONTROL > $tmp_dir/tarX
-( cd $pkg_dir && tar $ogargs -X $tmp_dir/tarX -czf $tmp_dir/data.tar.gz . )
-( cd $pkg_dir/$CONTROL && tar $ogargs -czf $tmp_dir/control.tar.gz . )
-rm $tmp_dir/tarX
+( cd $pkg_dir && find . | grep -v $CONTROL | \
+ sed "s#\(.*\)#:0:0::::::\1#" | \
+ sort | cpio -o -Hustar -P | gzip -n9 > $tmp_dir/data.tar.gz )
-echo "2.0" > $tmp_dir/debian-binary
+( cd $pkg_dir/$CONTROL && find . | \
+ sed "s#\(.*\)#:0:0::::::\1#" | \
+ sort | cpio -o -Hustar -P | gzip -n9 > $tmp_dir/control.tar.gz )
+echo "2.0" > $tmp_dir/debian-binary
pkg_file=$dest_dir/${pkg}_${version}_${arch}.ipk
rm -f $pkg_file
-if [ "$outer" = "ar" ] ; then
- ( cd $tmp_dir && ar -crf $pkg_file ./debian-binary ./data.tar.gz ./control.tar.gz )
-else
- ( cd $tmp_dir && tar -zcf $pkg_file ./debian-binary ./data.tar.gz ./control.tar.gz )
-fi
-
+( cd $tmp_dir && tar -zcf $pkg_file ./debian-binary ./data.tar.gz ./control.tar.gz )
rm $tmp_dir/debian-binary $tmp_dir/data.tar.gz $tmp_dir/control.tar.gz
rmdir $tmp_dir
-
echo "Packaged contents of $pkg_dir into $pkg_file"
diff --git a/scripts/ipkg-make-index.sh b/scripts/ipkg-make-index.sh
index 927e67b93..5738e9983 100644
--- a/scripts/ipkg-make-index.sh
+++ b/scripts/ipkg-make-index.sh
@@ -3,7 +3,7 @@ set -e
pkg_dir=$1
if [[ -z $pkg_dir || ! -d $pkg_dir ]]; then
- echo "Usage: ipkg-make-index <package_directory>"
+ echo "Usage: ipkg-make-index.sh <package_directory>"
exit 1
fi
@@ -13,7 +13,7 @@ find "$pkg_dir" -name '*.ipk' | sort | while IFS= read pkg; do
file_size=$(ls -l $pkg | awk '{print $5}')
md5sum=$(md5sum $pkg)
tar -xzOf "$pkg" ./control.tar.gz | \
- tar -xzOf - ./control | \
+ tar -xzOf - control | \
sed -e "s^Description:Filename: $dpkg\\
Size: $file_size\\
MD5Sum: ${md5sum%% *}\\
diff --git a/scripts/scan-pkgs.sh b/scripts/scan-pkgs.sh
index 124355161..28a2e31c6 100644
--- a/scripts/scan-pkgs.sh
+++ b/scripts/scan-pkgs.sh
@@ -38,6 +38,12 @@ if [[ -n $ADK_NATIVE ]];then
if [[ -n $ADK_TARGET_PACKAGE_RPM ]]; then
NEED_RPM="$NEED_RPM rpm"
fi
+ if [[ -n $ADK_PACKAGE_WPA_SUPPLICANT_WITH_OPENSSL ]]; then
+ NEED_LIBSSLDEV="$NEED_LIBSSLDEV wpa_supplicant"
+ fi
+ if [[ -n $ADK_PACKAGE_IW ]]; then
+ NEED_LIBNLDEV="$NEED_LIBNLDEV iw"
+ fi
fi
if [[ -n $ADK_PACKAGE_GPSD ]]; then
@@ -156,6 +162,13 @@ if [[ -n $NEED_JPEGDEV ]];then
fi
fi
+if [[ -n $NEED_LIBNLDEV ]];then
+ if ! test -f /usr/include/netlink/netlink.h >/dev/null; then
+ echo >&2 You need libnl headers to build $NEED_LIBNLDEV
+ out=1
+ fi
+fi
+
if [[ -n $NEED_X11DEV ]];then
if ! test -f /usr/include/X11/Xlib.h >/dev/null; then
echo >&2 You need X11 headers to build $NEED_X11DEV
@@ -170,14 +183,12 @@ if [[ -n $NEED_XEXTDEV ]];then
fi
fi
-#if [[ -n $NEED_SSLDEV ]]; then
-# if ! test -f /usr/lib/pkgconfig/openssl.pc >/dev/null; then
-# if ! test -f /usr/include/openssl/ssl.h >/dev/null; then
-# echo >&2 You need openssl headers to build $NEED_SSLDEV
-# out=1
-# fi
-# fi
-#fi
+if [[ -n $NEED_LIBSSLDEV ]]; then
+ if ! test -f /usr/include/openssl/ssl.h >/dev/null; then
+ echo >&2 You need openssl headers to build $NEED_LIBSSLDEV
+ out=1
+ fi
+fi
if [[ -n $NEED_MKFONTDIR ]]; then
if ! which mkfontdir >/dev/null 2>&1; then
diff --git a/scripts/scan-tools.sh b/scripts/scan-tools.sh
index ed939d9ca..c86239d39 100644
--- a/scripts/scan-tools.sh
+++ b/scripts/scan-tools.sh
@@ -102,21 +102,11 @@ fi
rm test 2>/dev/null
if ! which tar >/dev/null 2>&1; then
- echo You must install GNU tar to continue.
+ echo You must install tar to continue.
echo
out=1
fi
-if ! (tar --version | grep GNU) >/dev/null 2>&1;then
- if ! which gtar >/dev/null 2>&1; then
- if ! which gnutar >/dev/null 2>&1; then
- echo You must install GNU tar to continue.
- echo
- out=1
- fi
- fi
-fi
-
if ! which gzip >/dev/null 2>&1; then
echo You must install gzip to continue.
echo