3 echo "**** Autotools Add New Package Wizard ****"
4 echo " This script will generate files to add a"
5 echo " new package to buildroot."
8 echo "What is the name of the package?"
11 echo "What is the version number?"
14 echo "What is the web address of the tarball?"
17 echo "Enter any known dependencies, separated"
18 echo "by spaces, or just press enter."
21 echo "Enter a description of the package."
24 echo "Does autoreconf need to be run first? (y/n)"
27 if [ "$ANSWER" = "y" ]; then
33 echo "Does it need to be installed to the staging dir?"
34 echo "Say yes, if other packages depend on it."
35 echo "(If not sure, just say yes. It will only use more"
36 echo "space on your hard drive.)"
39 if [ "$ANSWER" = "y" ]; then
45 echo "Enter any configure script options."
48 URL
=${DOWNLOAD_LOC%/*}
49 TARBALL
=${DOWNLOAD_LOC##*/}
50 EXTENSION
=${TARBALL##*.tar.}
51 NAME_UPPER
=`echo ${PACKAGE_NAME} | tr a-z- A-Z_`
53 mkdir ..
/package
/${PACKAGE_NAME}
55 cat > ..
/package
/${PACKAGE_NAME}/${PACKAGE_NAME}.mk
<<EOF
56 #############################################################
60 #############################################################
61 ${NAME_UPPER}_VERSION = ${VERSION_NUM}
62 ${NAME_UPPER}_SOURCE = ${PACKAGE_NAME}-\$(${NAME_UPPER}_VERSION).tar.${EXTENSION}
63 ${NAME_UPPER}_SITE = ${URL}
64 ${NAME_UPPER}_AUTORECONF = ${RECONF}
65 ${NAME_UPPER}_INSTALL_STAGING = ${STAGING}
66 ${NAME_UPPER}_INSTALL_TARGET = YES
68 ${NAME_UPPER}_CONF_OPT = ${CONFIG_OPTIONS}
70 ${NAME_UPPER}_DEPENDENCIES = uclibc ${EXTRA_DEPS}
72 \$(eval \$(call AUTOTARGETS,package,${PACKAGE_NAME}))
76 cat > ..
/package
/${PACKAGE_NAME}/Config.
in <<EOF
77 config BR2_PACKAGE_${NAME_UPPER}
78 bool "${PACKAGE_NAME}"
85 echo "Just add: source \"package/${PACKAGE_NAME}/Config.in\""
86 echo "to the file package/Config.in in an appropriate"
89 echo "You are now ready to build ${PACKAGE_NAME}"
90 echo "Just run make menuconfig and select your new"
91 echo "package, then run make."