aboutsummaryrefslogtreecommitdiffstats
path: root/build.macros.in
diff options
context:
space:
mode:
Diffstat (limited to 'build.macros.in')
-rw-r--r--build.macros.in32
1 files changed, 32 insertions, 0 deletions
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