summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt2
-rw-r--r--base/common/src/CMakeLists.txt22
-rw-r--r--base/java-tools/src/CMakeLists.txt22
-rw-r--r--base/util/src/CMakeLists.txt43
-rw-r--r--scripts/compose_functions35
-rw-r--r--specs/pki-core.spec20
6 files changed, 90 insertions, 54 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 953250259..d6c5d823e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -10,6 +10,8 @@ set(APPLICATION_VERSION_MAJOR "10")
set(APPLICATION_VERSION_MINOR "0")
set(APPLICATION_VERSION_PATCH "0")
+option(WITH_JAVADOC "Build with Javadoc" ON)
+
if (BUILD_IPA_PKI_THEME)
set(APPLICATION_FLAVOR_IPA_PKI_THEME TRUE)
# override APPLICATION VERSION
diff --git a/base/common/src/CMakeLists.txt b/base/common/src/CMakeLists.txt
index a9d4a765c..7a7c38a44 100644
--- a/base/common/src/CMakeLists.txt
+++ b/base/common/src/CMakeLists.txt
@@ -1063,16 +1063,18 @@ add_dependencies(pki-cms pki-nsutil pki-cmsutil pki-certsrv)
install_jar(pki-cms ${JAVA_JAR_INSTALL_DIR}/pki)
set(PKI_CMS_JAR ${pki-cms_JAR_FILE} CACHE INTERNAL "pki-cms jar file")
-create_javadoc(pki-common-${APPLICATION_VERSION}
- FILES ${pki-cms_java_SRCS} ${pki-certsrv_java_SRCS}
- CLASSPATH ${CMAKE_JAVA_INCLUDE_PATH} ${pki-certsrv_JAR_FILE}
- WINDOWTITLE "pki-common"
- DOCTITLE "<h1>pki-common</h1>"
- AUTHOR TRUE
- USE TRUE
- VERSION TRUE
-)
-add_dependencies(pki-common-${APPLICATION_VERSION}_javadoc pki-cms pki-certsrv)
+if(WITH_JAVADOC)
+ create_javadoc(pki-common-${APPLICATION_VERSION}
+ FILES ${pki-cms_java_SRCS} ${pki-certsrv_java_SRCS}
+ CLASSPATH ${CMAKE_JAVA_INCLUDE_PATH} ${pki-certsrv_JAR_FILE}
+ WINDOWTITLE "pki-common"
+ DOCTITLE "<h1>pki-common</h1>"
+ AUTHOR TRUE
+ USE TRUE
+ VERSION TRUE
+ )
+ add_dependencies(pki-common-${APPLICATION_VERSION}_javadoc pki-cms pki-certsrv)
+endif(WITH_JAVADOC)
# build pki-cmscore
set(CMAKE_JAR_CLASSES_PREFIX com/netscape/cmscore)
diff --git a/base/java-tools/src/CMakeLists.txt b/base/java-tools/src/CMakeLists.txt
index 0411a54c7..e6152dcf9 100644
--- a/base/java-tools/src/CMakeLists.txt
+++ b/base/java-tools/src/CMakeLists.txt
@@ -75,13 +75,15 @@ install(
install_jar(pki-tools ${JAVA_JAR_INSTALL_DIR}/pki)
set(PKI_TOOLS_JAR ${pki-tools_JAR_FILE} CACHE INTERNAL "pki-tools jar file")
-create_javadoc(pki-java-tools-${APPLICATION_VERSION}
- FILES ${pki-tools_java_SRCS}
- CLASSPATH ${CMAKE_JAVA_INCLUDE_PATH}
- WINDOWTITLE "pki-java-tools"
- DOCTITLE "<h1>pki-java-tools</h1>"
- AUTHOR TRUE
- USE TRUE
- VERSION TRUE
-)
-add_dependencies(pki-java-tools-${APPLICATION_VERSION}_javadoc pki-tools)
+if(WITH_JAVADOC)
+ create_javadoc(pki-java-tools-${APPLICATION_VERSION}
+ FILES ${pki-tools_java_SRCS}
+ CLASSPATH ${CMAKE_JAVA_INCLUDE_PATH}
+ WINDOWTITLE "pki-java-tools"
+ DOCTITLE "<h1>pki-java-tools</h1>"
+ AUTHOR TRUE
+ USE TRUE
+ VERSION TRUE
+ )
+ add_dependencies(pki-java-tools-${APPLICATION_VERSION}_javadoc pki-tools)
+endif(WITH_JAVADOC)
diff --git a/base/util/src/CMakeLists.txt b/base/util/src/CMakeLists.txt
index 592e3b59b..f0c586ad6 100644
--- a/base/util/src/CMakeLists.txt
+++ b/base/util/src/CMakeLists.txt
@@ -346,24 +346,25 @@ add_dependencies(pki-cmsutil pki-nsutil)
install_jar(pki-cmsutil ${JAVA_JAR_INSTALL_DIR}/pki)
set(PKI_CMSUTIL_JAR ${pki-cmsutil_JAR_FILE} CACHE INTERNAL "pki-cmsutil jar file")
-create_javadoc(pki-util-${APPLICATION_VERSION}
- PACKAGES com.netscape.cmsutil.crypto
- com.netscape.cmsutil.http
- com.netscape.cmsutil.ldap
- com.netscape.cmsutil.net
- com.netscape.cmsutil.ocsp
- com.netscape.cmsutil.password
- com.netscape.cmsutil.radius
- com.netscape.cmsutil.scep
- com.netscape.cmsutil.util
- com.netscape.cmsutil.xml
- SOURCEPATH ${CMAKE_CURRENT_SOURCE_DIR}
- CLASSPATH ${CMAKE_JAVA_INCLUDE_PATH}
- WINDOWTITLE "pki-util"
- WINDOWTITLE "pki-util"
- DOCTITLE "<h1>dogtag</h1>"
- AUTHOR TRUE
- USE TRUE
- VERSION TRUE
-)
-add_dependencies(pki-util-${APPLICATION_VERSION}_javadoc pki-cmsutil)
+if(WITH_JAVADOC)
+ create_javadoc(pki-util-${APPLICATION_VERSION}
+ PACKAGES com.netscape.cmsutil.crypto
+ com.netscape.cmsutil.http
+ com.netscape.cmsutil.ldap
+ com.netscape.cmsutil.net
+ com.netscape.cmsutil.ocsp
+ com.netscape.cmsutil.password
+ com.netscape.cmsutil.radius
+ com.netscape.cmsutil.scep
+ com.netscape.cmsutil.util
+ com.netscape.cmsutil.xml
+ SOURCEPATH ${CMAKE_CURRENT_SOURCE_DIR}
+ CLASSPATH ${CMAKE_JAVA_INCLUDE_PATH}
+ WINDOWTITLE "pki-util"
+ DOCTITLE "<h1>dogtag</h1>"
+ AUTHOR TRUE
+ USE TRUE
+ VERSION TRUE
+ )
+ add_dependencies(pki-util-${APPLICATION_VERSION}_javadoc pki-cmsutil)
+endif(WITH_JAVADOC)
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
-
-
diff --git a/specs/pki-core.spec b/specs/pki-core.spec
index 2c1906fc5..329b84c4a 100644
--- a/specs/pki-core.spec
+++ b/specs/pki-core.spec
@@ -14,7 +14,7 @@ distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
Name: pki-core
Version: 10.0.0
-Release: %{?relprefix}11%{?prerel}%{?dist}
+Release: %{?relprefix}12%{?prerel}%{?dist}
Summary: Certificate System - PKI Core Components
URL: http://pki.fedoraproject.org/
License: GPLv2
@@ -694,7 +694,12 @@ This package is a part of the PKI Core used by the Certificate System.
%build
%{__mkdir_p} build
cd build
-%cmake -DVAR_INSTALL_DIR:PATH=/var -DBUILD_PKI_CORE:BOOL=ON -DJAVA_LIB_INSTALL_DIR=%{_jnidir} -DSYSTEMD_LIB_INSTALL_DIR=%{_unitdir} ..
+%cmake -DVAR_INSTALL_DIR:PATH=/var \
+ -DBUILD_PKI_CORE:BOOL=ON \
+ -DJAVA_LIB_INSTALL_DIR=%{_jnidir} \
+ -DSYSTEMD_LIB_INSTALL_DIR=%{_unitdir} \
+ %{?_without_javadoc:-DWITH_JAVADOC:BOOL=OFF} \
+ ..
%{__make} VERBOSE=1 %{?_smp_mflags} all
%{__make} VERBOSE=1 %{?_smp_mflags} test
@@ -1120,9 +1125,11 @@ fi
%{_javadir}/pki/pki-nsutil-%{version}.jar
%{_javadir}/pki/pki-nsutil.jar
+%if %{?_without_javadoc:0}%{!?_without_javadoc:1}
%files -n pki-util-javadoc
%defattr(-,root,root,-)
%{_javadocdir}/pki-util-%{version}/
+%endif
%files -n pki-java-tools
@@ -1152,10 +1159,11 @@ fi
%{_javadir}/pki/pki-tools.jar
%{_datadir}/pki/java-tools/
+%if %{?_without_javadoc:0}%{!?_without_javadoc:1}
%files -n pki-java-tools-javadoc
%defattr(-,root,root,-)
%{_javadocdir}/pki-java-tools-%{version}/
-
+%endif
%files -n pki-common
%defattr(-,root,root,-)
@@ -1179,10 +1187,11 @@ fi
%{_datadir}/pki/setup/
+%if %{?_without_javadoc:0}%{!?_without_javadoc:1}
%files -n pki-common-javadoc
%defattr(-,root,root,-)
%{_javadocdir}/pki-common-%{version}/
-
+%endif
%files -n pki-selinux
%defattr(-,root,root,-)
@@ -1315,6 +1324,9 @@ fi
%changelog
+* Fri Mar 23 2012 Endi S. Dewata <edewata@redhat.com> 10.0.0-0.12.a1
+- Added option to build without Javadoc
+
* Fri Mar 16 2012 Ade Lee <alee@redhat.com> 10.0.0-0.11.a1
- BZ 802396 - Change location of TOMCAT_LOG to match tomcat6 changes
- Corrected patch selected for selinux f17 rules