From 01883b3c2554612dcf8efb0303ecfec5f947e7ea Mon Sep 17 00:00:00 2001 From: Fernando Nasser Date: Mon, 21 Aug 2006 19:16:47 +0000 Subject: [PATCH] Merge with upstream --- jakarta-oro.spec | 66 +++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 62 insertions(+), 4 deletions(-) diff --git a/jakarta-oro.spec b/jakarta-oro.spec index dbd189d..519d284 100644 --- a/jakarta-oro.spec +++ b/jakarta-oro.spec @@ -28,13 +28,17 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # +%define _gcj_support 1 + +%define gcj_support %{?_with_gcj_support:1}%{!?_with_gcj_support:%{?_without_gcj_support:0}%{!?_without_gcj_support:%{?_gcj_support:%{_gcj_support}}%{!?_gcj_support:0}}} + %define base_name oro %define section free Name: jakarta-oro Version: 2.0.8 -Release: 2jpp +Release: 3jpp.1 Epoch: 0 Summary: Full regular expressions API License: Apache License @@ -43,14 +47,20 @@ Source0: %{name}-%{version}.tar.gz URL: http://jakarta.apache.org/oro BuildRequires: jpackage-utils > 1.6 BuildRequires: ant +%if ! %{gcj_support} Buildarch: noarch +%endif Buildroot: %{_tmppath}/%{name}-%{version}-buildroot -Vendor: JPackage Project -Distribution: JPackage Provides: oro Obsoletes: oro < 0:2.0.8-2jpp +%if %{gcj_support} +BuildRequires: java-gcj-compat-devel +Requires(post): java-gcj-compat +Requires(postun): java-gcj-compat +%endif + %description The Jakarta-ORO Java classes are a set of text-processing Java classes that provide Perl5 compatible regular expressions, AWK-like regular @@ -65,6 +75,9 @@ their development under the Jakarta Project. %package javadoc Group: Development/Java Summary: Javadoc for %{name} +#BuildRequires: java-javadoc +Requires(post): /bin/rm /bin/ln +Requires(postun): /bin/rm %description javadoc Javadoc for %{name}. @@ -90,21 +103,66 @@ install -m 644 %{base_name}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.ja #javadoc install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} cp -pr docs/api/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} +ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name} # ghost symlink rm -rf docs/api +%if %{gcj_support} +%{_bindir}/aot-compile-rpm +%endif + %clean rm -rf $RPM_BUILD_ROOT +%if %{gcj_support} +%post +if [ -x %{_bindir}/rebuild-gcj-db ] +then + %{_bindir}/rebuild-gcj-db +fi +%endif + +%if %{gcj_support} +%postun +if [ -x %{_bindir}/rebuild-gcj-db ] +then + %{_bindir}/rebuild-gcj-db +fi +%endif + +%post javadoc +rm -f %{_javadocdir}/%{name} +ln -s %{name}-%{version} %{_javadocdir}/%{name} + +%postun javadoc +if [ "$1" = "0" ]; then + rm -f %{_javadocdir}/%{name} +fi + + %files %defattr(-,root,root) %doc COMPILE ISSUES README TODO CHANGES CONTRIBUTORS LICENSE STYLE %{_javadir}/*.jar +%if %{gcj_support} +%dir %attr(-,root,root) %{_libdir}/gcj/%{name} +%attr(-,root,root) %{_libdir}/gcj/%{name}/jakarta-oro-2.0.8.jar.* +%endif + %files javadoc %defattr(-,root,root) -%{_javadocdir}/%{name}-%{version} +%doc %{_javadocdir}/%{name}-%{version} +%ghost %doc %{_javadocdir}/%{name} %changelog +* Mon Aug 21 2006 Fernando Nasser 2.0.8-3jpp.1 +- Merge with upstream + +* Mon Aug 21 2006 Fernando Nasser 2.0.8-3jpp +- Add AOT bits +- Fix javadoc unversioned link handling +- Add requires for post/postun javadoc sections added above + * Tue Aug 24 2004 Fernando Nasser 2.0.8-2jpp - Rebuild with Ant 1.6.2 - Changed name to jakarta-oro