aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Heidelberg <markus.heidelberg@web.de>2009-05-03 13:41:57 +0200
committerPeter Korsgaard <jacmet@sunsite.dk>2009-05-03 22:24:36 +0200
commit4a29b224386aedbf19149a2b08d40f7ace065044 (patch)
treefc6506b46a56cfc2b2f5b652f589017989a65dba
parent83674f229ab5dc81c097948e83eeb7e83b694309 (diff)
downloadbuildroot-novena-4a29b224386aedbf19149a2b08d40f7ace065044.tar.gz
buildroot-novena-4a29b224386aedbf19149a2b08d40f7ace065044.zip
scripts/package wizard: add support for subdirs
Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
-rwxr-xr-xscripts/add_new_package.wizard27
1 files changed, 22 insertions, 5 deletions
diff --git a/scripts/add_new_package.wizard b/scripts/add_new_package.wizard
index d4127f422..902718da8 100755
--- a/scripts/add_new_package.wizard
+++ b/scripts/add_new_package.wizard
@@ -42,6 +42,16 @@ else
STAGING="NO"
fi
+echo "Enter an additional subdirectory below package/"
+echo "as category, or just press enter."
+read SUB_DIR
+
+if [ -z "$SUB_DIR" ]; then
+ CATEGORY_DIR=package
+else
+ CATEGORY_DIR=package/${SUB_DIR}
+fi
+
echo "Enter any configure script options."
read CONFIG_OPTIONS
@@ -49,9 +59,9 @@ URL=${DOWNLOAD_LOC%/*}
TARBALL=${DOWNLOAD_LOC##*/}
EXTENSION=${TARBALL##*.tar.}
NAME_UPPER=`echo ${PACKAGE_NAME} | tr a-z- A-Z_`
-PACKAGE_DIR=`dirname $0`/../package/${PACKAGE_NAME}
+PACKAGE_DIR=`dirname $0`/../${CATEGORY_DIR}/${PACKAGE_NAME}
-mkdir ${PACKAGE_DIR}
+mkdir -p ${PACKAGE_DIR}
sed -e 's/ *$//g' > ${PACKAGE_DIR}/${PACKAGE_NAME}.mk <<EOF
#############################################################
@@ -70,7 +80,7 @@ ${NAME_UPPER}_CONF_OPT = ${CONFIG_OPTIONS}
${NAME_UPPER}_DEPENDENCIES = uclibc ${EXTRA_DEPS}
-\$(eval \$(call AUTOTARGETS,package,${PACKAGE_NAME}))
+\$(eval \$(call AUTOTARGETS,${CATEGORY_DIR},${PACKAGE_NAME}))
EOF
cat > ${PACKAGE_DIR}/Config.in <<EOF
@@ -82,9 +92,16 @@ config BR2_PACKAGE_${NAME_UPPER}
${URL}
EOF
-echo "Just add: source \"package/${PACKAGE_NAME}/Config.in\""
-echo "to the file package/Config.in in an appropriate"
+echo "Just add: source \"${CATEGORY_DIR}/${PACKAGE_NAME}/Config.in\""
+echo "to the file ${CATEGORY_DIR}/Config.in in an appropriate"
echo "location."
+
+if [ -n "$SUB_DIR" ]; then
+ echo "Additionally add: source \"${CATEGORY_DIR}/Config.in\""
+ echo "to the file package/Config.in in an appropriate"
+ echo "location."
+fi
+
echo
echo "You are now ready to build ${PACKAGE_NAME}"
echo "Just run make menuconfig and select your new"