%define with_gcj %{!?_without_gcj:1}%{?_without_gcj:0} Name: jcodings Version: 1.0 Release: 2%{?dist} Summary: Java Libraries for Ruby String Encodings Group: Development/Libraries License: MIT URL: http://svn.jruby.codehaus.org/browse/jruby/jcodings Source0: http://svn.jruby.codehaus.org/browse/~tarball=tbz2/jruby/jcodings/tags/1.0/1.0.tbz2 Patch0: jcodings-1.0-buildlevel-1.5.diff BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: ant BuildRequires: java-devel BuildRequires: jpackage-utils Requires: java Requires: jpackage-utils %if %{with_gcj} BuildRequires: java-gcj-compat-devel >= 1.0.31 Requires(post): java-gcj-compat >= 1.0.31 Requires(postun): java-gcj-compat >= 1.0.31 %else BuildArch: noarch %endif %description Java libraries for handling JRuby string encodings. %prep %setup -q -c find -name '*.jar' -o -name '*.class' -exec rm -f '{}' \; %patch0 %build ant build %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT%{_javadir} cp -p target/%{name}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar pushd $RPM_BUILD_ROOT%{_javadir}/ ln -s %{name}-%{version}.jar %{name}.jar popd %if %{with_gcj} %{_bindir}/aot-compile-rpm %endif %clean rm -rf $RPM_BUILD_ROOT %post %if %{with_gcj} if [ -x %{_bindir}/rebuild-gcj-db ] then %{_bindir}/rebuild-gcj-db fi %endif %postun %if %{with_gcj} if [ -x %{_bindir}/rebuild-gcj-db ] then %{_bindir}/rebuild-gcj-db fi %endif %files %defattr(-,root,root,-) %{_javadir}/* %if %{with_gcj} %attr(-,root,root) %{_libdir}/gcj/%{name} %endif %changelog * Wed Dec 17 2008 Conrad Meyer - 1.0-2 - Add gcj bits. * Fri Nov 28 2008 Conrad Meyer - 1.0-1 - Initial package (needed for jruby 1.1.5 and joni 1.1.1).