diff options
author | Endi Sukma Dewata <edewata@redhat.com> | 2012-03-23 10:44:33 -0500 |
---|---|---|
committer | Endi Sukma Dewata <edewata@redhat.com> | 2012-03-26 12:54:21 -0500 |
commit | 78378144e71a00a67690a1f99152402c892b0103 (patch) | |
tree | ad4a0fb27d54d0b5da4adfe6b9626cab7a939c69 /scripts | |
parent | 621d9e5c413e561293d7484b93882d985b3fe15f (diff) | |
download | pki-78378144e71a00a67690a1f99152402c892b0103.tar.gz pki-78378144e71a00a67690a1f99152402c892b0103.tar.xz pki-78378144e71a00a67690a1f99152402c892b0103.zip |
Added option to build without Javadoc.
The build scripts have been modified to provide an option to build
without Javadoc to speed up development builds. The option can be
used as follows:
compose_pki_core_packages --without-javadoc hybrid_rpms
Ticket #111
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/compose_functions | 35 |
1 files changed, 26 insertions, 9 deletions
diff --git a/scripts/compose_functions b/scripts/compose_functions index 22c128df1..028a64a19 100644 --- a/scripts/compose_functions +++ b/scripts/compose_functions @@ -69,7 +69,7 @@ export PKI_DOGTAG_MANIFEST Usage() { printf "\n" - printf "Usage: $0 <target>\n\n" + printf "Usage: $0 [options] <target>\n\n" printf " where <target> is one of the following:\n\n" printf " srpm - copies a spec file from local source,\n" printf " generates a tarball from local source, " @@ -105,6 +105,8 @@ Usage() printf " and\n" printf " produces an SRPM and one or more RPMS\n" printf " ${MESSAGE}\n\n" + printf "Options:\n" + printf " --without-javadoc do not build Javadoc RPMS\n\n" } @@ -237,33 +239,50 @@ Fetch_Source_Tarball() ## Check for command line argument validity ## +GETOPT=`getopt -o '' -l without-javadoc -n "$0" -- "$@"` + +if [ $? != 0 ] ; then + Usage + exit 255 +fi + +eval set -- "$GETOPT" + +while true ; do + case "$1" in + --without-javadoc) JAVADOC="--without javadoc" ; shift ;; + --) shift ; break ;; + *) echo "$0: unrecognized option '$1'" 1>&2 ; exit 255 ;; + esac +done + if [ $# -ne 1 ] ; then Usage exit 255 fi if [ $1 = "srpm" ] ; then - RPMBUILD_CMD="rpmbuild --define \"_topdir \`pwd\`\" -bs" + RPMBUILD_CMD="rpmbuild --define \"_topdir \`pwd\`\" $JAVADOC -bs" FETCH_SOURCE_TARBALL=0 FETCH_PATCH_FILES=0 elif [ $1 = "hybrid_srpm" ] ; then - RPMBUILD_CMD="rpmbuild --define \"_topdir \`pwd\`\" -bs" + RPMBUILD_CMD="rpmbuild --define \"_topdir \`pwd\`\" $JAVADOC -bs" FETCH_SOURCE_TARBALL=0 FETCH_PATCH_FILES=1 elif [ $1 = "patched_srpm" ] ; then - RPMBUILD_CMD="rpmbuild --define \"_topdir \`pwd\`\" -bs" + RPMBUILD_CMD="rpmbuild --define \"_topdir \`pwd\`\" $JAVADOC -bs" FETCH_SOURCE_TARBALL=1 FETCH_PATCH_FILES=1 elif [ $1 = "rpms" ] ; then - RPMBUILD_CMD="rpmbuild --define \"_topdir \`pwd\`\" -ba" + RPMBUILD_CMD="rpmbuild --define \"_topdir \`pwd\`\" $JAVADOC -ba" FETCH_SOURCE_TARBALL=0 FETCH_PATCH_FILES=0 elif [ $1 = "hybrid_rpms" ] ; then - RPMBUILD_CMD="rpmbuild --define \"_topdir \`pwd\`\" -ba" + RPMBUILD_CMD="rpmbuild --define \"_topdir \`pwd\`\" $JAVADOC -ba" FETCH_SOURCE_TARBALL=0 FETCH_PATCH_FILES=1 elif [ $1 = "patched_rpms" ] ; then - RPMBUILD_CMD="rpmbuild --define \"_topdir \`pwd\`\" -ba" + RPMBUILD_CMD="rpmbuild --define \"_topdir \`pwd\`\" $JAVADOC -ba" FETCH_SOURCE_TARBALL=1 FETCH_PATCH_FILES=1 else @@ -271,5 +290,3 @@ else exit 255 fi export RPMBUILD_CMD - - |