aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDexter Morgan <dmorgan@mageia.org>2011-10-20 13:35:49 +0000
committerDexter Morgan <dmorgan@mageia.org>2011-10-20 13:35:49 +0000
commit1f01b3be4afde5ba5c857f60664bad64e29168c3 (patch)
treee0e96832de12603130b2fc75f4f9c5ecfa3268fe
parent39ea19e0cc7ba6b1603ad133112caa20ae35b3d6 (diff)
Add java macros from JPackage
-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