[java-sig-commits] [javapackages/generate_javadoc] If licensing is not overriden bail instead of adding requires

Stanislav Ochotnicky sochotni at fedoraproject.org
Mon Nov 7 10:20:09 UTC 2011


commit bfcbb129b7f700d6ca26c21adcc59d8645823b88
Author: Stanislav Ochotnicky <sochotnicky at redhat.com>
Date:   Mon Nov 7 11:19:59 2011 +0100

    If licensing is not overriden bail instead of adding requires

 macros.fjava |   15 +++++++--------
 1 files changed, 7 insertions(+), 8 deletions(-)
---
diff --git a/macros.fjava b/macros.fjava
index 9111444..d4b07e9 100644
--- a/macros.fjava
+++ b/macros.fjava
@@ -67,13 +67,12 @@ python -m %{_datadir}/java-utils/maven_depmap %{-a} \\\
 # !!! Needs to be used at the end of %install section
 # There are these variables that change its behaviour:
 #
-# %__javadoc_license - set if the license is in non-standard place to
-#                prevent Requires on main package
+# %__javadoc_license - set if the license is in non-standard place
 # %__apidocs_dir - set custom path to directory with javadocs
 #                (defaults to target/site/apidocs)
-# %__javadoc_skip_requires - if defined javadoc subpackage will not
-#                require main package under any circumstances (useful
-#                if upstream doesn't provide separate license file)
+# %__javadoc_no_license - if defined javadoc subpackage will not have
+#                licensing information. Use only if if upstream
+#                doesn't provide separate license file.
 #
 
 
@@ -81,13 +80,13 @@ python -m %{_datadir}/java-utils/maven_depmap %{-a} \\\
 %{!?__apidocs_dir: %global __apidocs_dir target/site/apidocs} \
 %{expand: %{__find_javadoc_license}} \
 %global __spec_install_post %{expand:%{__java_install_post}} \
+%if "%{__javadoc_license}" == "%{nil}" \
+%{?!__javadoc_no_license:echo License not found. Either set __javadoc_license to point to license file or set __javadoc_no_license if sources do not contain license file;exit 1;} \
+%endif \
 %package javadoc \
 Group:          Documentation \
 Summary:        Javadoc for %{name} \
 Requires:       jpackage-utils \
-%if "%{__javadoc_license}" == "%{nil}" \
-%{?!__javadoc_skip_requires:Requires: %{?epoch:%{epoch}:}%{name}-%{version}} \
-%endif \
 %description javadoc \
 API documentation for %{name}. \
 %files javadoc \


More information about the java-sig-commits mailing list