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 an additional subdirectory below package/"
46 echo "as category, or just press enter."
49 if [ -z "$SUB_DIR" ]; then
52 CATEGORY_DIR
=package
/${SUB_DIR}
55 echo "Enter any configure script options."
58 URL
=${DOWNLOAD_LOC%/*}
59 TARBALL
=${DOWNLOAD_LOC##*/}
60 EXTENSION
=${TARBALL##*.tar.}
61 NAME_UPPER
=`echo ${PACKAGE_NAME} | tr a-z- A-Z_`
62 PACKAGE_DIR
=`dirname $0`/..
/${CATEGORY_DIR}/${PACKAGE_NAME}
64 mkdir
-p ${PACKAGE_DIR}
66 sed -e 's/ *$//g' > ${PACKAGE_DIR}/${PACKAGE_NAME}.mk
<<EOF
67 #############################################################
71 #############################################################
72 ${NAME_UPPER}_VERSION = ${VERSION_NUM}
73 ${NAME_UPPER}_SOURCE = ${PACKAGE_NAME}-\$(${NAME_UPPER}_VERSION).tar.${EXTENSION}
74 ${NAME_UPPER}_SITE = ${URL}
75 ${NAME_UPPER}_AUTORECONF = ${RECONF}
76 ${NAME_UPPER}_INSTALL_STAGING = ${STAGING}
77 ${NAME_UPPER}_INSTALL_TARGET = YES
79 ${NAME_UPPER}_CONF_OPT = ${CONFIG_OPTIONS}
81 ${NAME_UPPER}_DEPENDENCIES = uclibc ${EXTRA_DEPS}
83 \$(eval \$(call AUTOTARGETS,${CATEGORY_DIR},${PACKAGE_NAME}))
86 cat > ${PACKAGE_DIR}/Config.
in <<EOF
87 config BR2_PACKAGE_${NAME_UPPER}
88 bool "${PACKAGE_NAME}"
96 echo "**** Manual steps to integrate your new package ****"
99 echo "Add the following line to ${CATEGORY_DIR}/Config.in"
100 echo "in an appropriate location:"
101 echo "source \"${CATEGORY_DIR}/${PACKAGE_NAME}/Config.in\""
103 if [ -n "$SUB_DIR" ]; then
105 echo "Additionally add the following line to package/Config.in"
106 echo "in an appropriate location:"
107 echo "source \"${CATEGORY_DIR}/Config.in\""
110 if [ -n "$EXTRA_DEPS" ]; then
112 echo "You need to add \"depends on\" and/or \"select\" lines"
113 echo "to ${CATEGORY_DIR}/${PACKAGE_NAME}/Config.in"
114 echo "corresponding to the \"${NAME_UPPER}_DEPENDENCIES\" line"
115 echo "in ${CATEGORY_DIR}/${PACKAGE_NAME}/${PACKAGE_NAME}.mk"
119 echo "After that run \"make menuconfig\", select your new package"
120 echo "and run \"make\" to build \"${PACKAGE_NAME}\"."