aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS2
-rw-r--r--build.macros.in32
2 files changed, 34 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index 3249a00..7edfd20 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,5 @@
+- Add Java macros from JPackage ( %create_jar_links(), %remove_java_binaries, and gcj functions )
+
Version 1.144 - 19 Sep 2011, by Funda Wang
- Add support for fdo /usr/share/help when find_lang
diff --git a/build.macros.in b/build.macros.in
index 6f4c826..c86663b 100644
--- a/build.macros.in
+++ b/build.macros.in
@@ -432,6 +432,38 @@ python -O -c "import sys, os, compileall; br='%{buildroot}'; compileall.compile_
%py_requires(d) \
BuildRequires: python %{-d:python-devel}
+#------------------------------------------------------------------------------
+# Java Macros
+#
+
+%gcj_support 0
+%gcj_native \
+%if %{gcj_support} \
+BuildRequires: java-gcj-compat-devel \
+%else \
+BuildArch: noarch \
+%endif
+
+%aot_compile_rpm_bin %{_bindir}/aot-compile-rpm
+
+%gcj_compile \
+%if %{gcj_support} \
+%aot_compile_rpm_bin \
+%endif
+
+%gcj_files \
+%if %{gcj_support} \
+%dir %{_libdir}/gcj/%{name} \
+%attr(-,root,root) %{_libdir}/gcj/%{name}/* \
+%endif
+
+%remove_java_binaries \
+find . -name "*.jar" -delete
+
+%create_jar_links() \
+pushd %{buildroot}%{_javadir}; \
+for jar in *-%{version}.jar; do ln -sf ${jar} ${jar/-%{version}/}; done \
+popd
#------------------------------------------------------------------------------
# Ocaml macro