summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/scan-pkgs.sh36
-rw-r--r--scripts/scan-tools.sh32
-rwxr-xr-xscripts/tarpkg19
3 files changed, 47 insertions, 40 deletions
diff --git a/scripts/scan-pkgs.sh b/scripts/scan-pkgs.sh
index 69f2b1e3a..a940f2bb1 100644
--- a/scripts/scan-pkgs.sh
+++ b/scripts/scan-pkgs.sh
@@ -23,6 +23,16 @@ out=0
. $topdir/.config
+if [[ -n $ADK_NATIVE ]];then
+ if [[ -n $ADK_PACKAGE_GIT ]];then
+ NEED_CURLDEV="$NEED_CURLDEV git"
+ NEED_SSLDEV="$NEED_SSLDEV git"
+ fi
+ if [[ -n $ADK_TARGET_PACKAGE_RPM ]]; then
+ NEED_RPM="$NEED_RPM rpm"
+ fi
+fi
+
if [[ -n $ADK_PACKAGE_ALSA_UTILS ]]; then
NEED_XMLTO="$NEED_XMLTO alsa-utils"
fi
@@ -39,14 +49,10 @@ if [[ -n $ADK_PACKAGE_SQUID ]]; then
NEED_SSLDEV="$NEED_SSLDEV squid"
fi
-#if [[ -n $ADK_PACKAGE_RUBY ]]; then
-# NEED_RUBY="$NEED_RUBY ruby"
-#fi
-
-if [[ -n $ADK_PACKAGE_GLIB2 ]]; then
- NEED_GLIBZWO="$NEED_GLIBZWO glib2"
- NEED_GETTEXT="$NEED_GETTEXT glib2"
- NEED_PKGCONFIG="$NEED_PKGCONFIG glib2"
+if [[ -n $ADK_PACKAGE_GLIB ]]; then
+ NEED_GLIBZWO="$NEED_GLIBZWO glib"
+ NEED_GETTEXT="$NEED_GETTEXT glib"
+ NEED_PKGCONFIG="$NEED_PKGCONFIG glib"
fi
@@ -60,6 +66,13 @@ if [[ -n $NEED_GETTEXT ]]; then
fi
fi
+if [[ -n $NEED_CURLDEV ]];then
+ if ! test -f /usr/include/curl/curl.h >/dev/null; then
+ echo >&2 You need curl headers to build $NEED_CURLDEV
+ out=1
+ 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
@@ -111,6 +124,13 @@ if [[ -n $ADK_USE_CCACHE ]]; then
fi
fi
+if [[ -n $NEED_RPM ]]; then
+ if ! which rpmbuild >/dev/null 2>&1; then
+ echo >&2 You need rpmbuild to to use $NEED_RPM package backend
+ out=1
+ fi
+fi
+
#if [[ -n $ADK_COMPILE_MYSQL && $OStype != Linux ]]; then
# echo >&2 mySQL does not build on non-GNU/Linux.
# out=1
diff --git a/scripts/scan-tools.sh b/scripts/scan-tools.sh
index 29cdf0fef..d63391f66 100644
--- a/scripts/scan-tools.sh
+++ b/scripts/scan-tools.sh
@@ -107,38 +107,6 @@ if ! which cpp >/dev/null 2>&1; then
out=1
fi
-#if ! which flex >/dev/null 2>&1; then
-# echo You must install flex to continue.
-# echo
-# out=1
-#else
-# echo '%%' | flex -
-# if fgrep _POSIX_SOURCE lex.yy.c; then
-# echo Your lexer \(flex\) contains a broken skeleton.
-# if [[ $NO_ERROR = 1 ]]; then
-# echo WARNING: continue at your own risk.
-# echo Some packages may be broken.
-# else
-# echo You can continue the build by issuing \'make prereq-noerror\'
-# echo However, several packages may faild to build correctly.
-# out=1
-# fi
-# echo
-# fi
-#fi
-
-#if ! which bison >/dev/null 2>&1; then
-# echo You must install GNU bison to continue.
-# echo
-# out=1
-#fi
-
-#if ! which gperf >/dev/null 2>&1; then
-# echo You must install gperf to continue.
-# echo
-# out=1
-#fi
-
if ! which tar >/dev/null 2>&1; then
echo You must install GNU tar to continue.
echo
diff --git a/scripts/tarpkg b/scripts/tarpkg
new file mode 100755
index 000000000..818f99ea7
--- /dev/null
+++ b/scripts/tarpkg
@@ -0,0 +1,19 @@
+#!/usr/bin/env bash
+# create/install compressed tar balls
+
+if [ "$1" = "build" ];then
+ if [ ! -d $2 ];then
+ echo "not a directory"
+ exit 1
+ fi
+ pkgname=$(grep "^Package:" $2/CONTROL/control | sed -e "s/^[^:]*:[[:space:]]*//")
+ version=$(grep "^Version:" $2/CONTROL/control | sed -e "s/^[^:]*:[[:space:]]*//")
+ arch=$(grep "^Architecture:" $2/CONTROL/control | sed -e "s/^[^:]*:[[:space:]]*//")
+ rm -rf $2/CONTROL
+ (cd $2 && tar -czf $3/${pkgname}_${version}_${arch}.tar.gz .)
+elif [ "$1" = "install" ];then
+ tar -xzpf $2 -C ${INSTROOT}
+else
+ echo "unknown command"
+ exit 1
+fi