package/: remove obsolete qte package
[avatt.git] / scripts / add_new_package.wizard
blob4ad72c935b3a4d18e039bc6cbad1f3842f22f63a
1 #!/bin/sh
3 echo "**** Autotools Add New Package Wizard ****"
4 echo " This script will generate files to add a"
5 echo " new package to buildroot."
6 echo
8 echo "What is the name of the package?"
9 read PACKAGE_NAME
11 echo "What is the version number?"
12 read VERSION_NUM
14 echo "What is the web address of the tarball?"
15 read DOWNLOAD_LOC
17 echo "Enter any known dependencies, separated"
18 echo "by spaces, or just press enter."
19 read EXTRA_DEPS
21 echo "Enter a description of the package."
22 read DESCRIPTION
24 echo "Does autoreconf need to be run first? (y/n)"
25 read ANSWER
27 if [ "$ANSWER" = "y" ]; then
28 RECONF="YES"
29 else
30 RECONF="NO"
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.)"
37 read ANSWER
39 if [ "$ANSWER" = "y" ]; then
40 STAGING="YES"
41 else
42 STAGING="NO"
45 echo "Enter any configure script options."
46 read CONFIG_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 #############################################################
58 # ${PACKAGE_NAME}
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}))
74 EOF
76 cat > ../package/${PACKAGE_NAME}/Config.in <<EOF
77 config BR2_PACKAGE_${NAME_UPPER}
78 bool "${PACKAGE_NAME}"
79 help
80 ${DESCRIPTION}
82 ${URL}
83 EOF
85 echo "Just add: source \"package/${PACKAGE_NAME}/Config.in\""
86 echo "to the file package/Config.in in an appropriate"
87 echo "location."
88 echo
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."