Add conditional native compilation.

This commit is contained in:
Deepak Bhole 2006-07-20 16:45:38 +00:00
parent 50446de252
commit b800ade09d

105
bsh.spec
View File

@ -1,27 +1,66 @@
%define name bsh # Copyright (c) 2000-2005, JPackage Project
%define Name BeanShell # All rights reserved.
%define version 1.3.0 #
%define fversion 1.3.0 # Redistribution and use in source and binary forms, with or without
%define release 5jpp_1fc.1.1 # modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the
# distribution.
# 3. Neither the name of the JPackage Project nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
%define _with_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 section free %define section free
Name: %{name} Name: bsh
Version: %{version} Version: 1.3.0
Release: %{release}.1.1 Release: 8jpp_1fc
Epoch: 0 Epoch: 0
Summary: Lightweight Scripting for Java Summary: Lightweight Scripting for Java
License: LGPL License: LGPL
Source0: %{name}-%{fversion}-src.tar.bz2 Source0: %{name}-%{version}-src.tar.bz2
Patch0: %{name}-build.patch Patch0: %{name}-build.patch
Patch1: %{name}-readline.patch Patch1: %{name}-readline.patch
BuildRequires: ant, bsf, perl
Requires: bsf Requires: bsf
Requires: jpackage-utils >= 0:1.5 Requires: jpackage-utils >= 0:1.6
BuildRequires: ant bsf
#BuildRequires: libreadline-java #BuildRequires: libreadline-java
Url: http://www.beanshell.org/ Url: http://www.beanshell.org/
Group: Development/Java Group: Development/Java
%if ! %{gcj_support}
Buildarch: noarch Buildarch: noarch
%endif
Buildroot: %{_tmppath}/%{name}-%{version}-buildroot Buildroot: %{_tmppath}/%{name}-%{version}-buildroot
Distribution: JPackage
Vendor: JPackage Project
%if %{gcj_support}
BuildRequires: java-gcj-compat-devel
Requires(post): java-gcj-compat
Requires(postun): java-gcj-compat
%endif
%description %description
BeanShell is a small, free, embeddable, Java source interpreter with BeanShell is a small, free, embeddable, Java source interpreter with
@ -68,7 +107,7 @@ Demonstrations and samples for %{name}.
%prep %prep
rm -rf $RPM_BUILD_ROOT rm -rf $RPM_BUILD_ROOT
%setup -q -n %{Name} %setup -q -n BeanShell
%patch0 -p1 %patch0 -p1
#%patch1 -p1 #%patch1 -p1
find . -name "*.jar" -exec rm -f {} \; find . -name "*.jar" -exec rm -f {} \;
@ -92,7 +131,7 @@ ant -Dexclude-servlet='bsh/servlet/*' bshdoc
%install %install
# jars # jars
install -d -m 755 $RPM_BUILD_ROOT%{_javadir} install -d -m 755 $RPM_BUILD_ROOT%{_javadir}
install -m 644 dist/%{name}-%{fversion}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar install -m 644 dist/%{name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
(cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}*; do ln -sf ${jar} ${jar/-%{version}/}; done) (cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}*; do ln -sf ${jar} ${jar/-%{version}/}; done)
# manual # manual
find docs -name ".cvswrappers" -exec rm -f {} \; find docs -name ".cvswrappers" -exec rm -f {} \;
@ -165,9 +204,29 @@ cat > $RPM_BUILD_ROOT%{_bindir}/%{name}doc << EOF
EOF EOF
cat scripts/bshdoc.bsh >> $RPM_BUILD_ROOT%{_bindir}/%{name}doc cat scripts/bshdoc.bsh >> $RPM_BUILD_ROOT%{_bindir}/%{name}doc
%if %{gcj_support}
%{_bindir}/aot-compile-rpm
%endif
%clean %clean
rm -rf $RPM_BUILD_ROOT rm -rf $RPM_BUILD_ROOT
%post
%if %{gcj_support}
if [ -x %{_bindir}/rebuild-gcj-db ]
then
%{_bindir}/rebuild-gcj-db
fi
%endif
%postun
%if %{gcj_support}
if [ -x %{_bindir}/rebuild-gcj-db ]
then
%{_bindir}/rebuild-gcj-db
fi
%endif
%files %files
%defattr(-,root,root) %defattr(-,root,root)
%doc src/Changes.html src/License.txt src/README.txt %doc src/Changes.html src/License.txt src/README.txt
@ -176,6 +235,10 @@ rm -rf $RPM_BUILD_ROOT
%{_javadir}/* %{_javadir}/*
%dir %{_datadir}/%{name} %dir %{_datadir}/%{name}
%if %{gcj_support}
%attr(-,root,root) %{_libdir}/gcj/%{name}
%endif
%files manual %files manual
%defattr(-,root,root) %defattr(-,root,root)
%doc docs/* %doc docs/*
@ -189,18 +252,14 @@ rm -rf $RPM_BUILD_ROOT
%{_datadir}/%{name}/* %{_datadir}/%{name}/*
%changelog %changelog
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 0:1.3.0-5jpp_1fc.1.1.1.1 * Thu Jul 20 2006 Deepak Bhole <dbhole@redhat.com> 0:1.3.0-8jpp_1fc
- rebuild - Add conditional native compilation.
* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com> * Thu May 04 2006 Ralph Apel <r.apel at r-apel.de> 0:1.3.0-7jpp
- rebuilt - First JPP-1.7 release
* Thu Jun 16 2005 Gary Benson <gbenson@redhat.com> 0:1.3.0-5jpp_1fc * Fri Aug 20 2004 Ralph Apel <r.apel at r-apel.de> 0:1.3.0-6jpp
- Build into Fedora. - Build with ant-1.6.2
* Thu Mar 4 2004 Frank Ch. Eigler <fche@redhat.com> 0:1.3.0-5jpp_1rh
- RH vacuuming
- added bsf build-prereq
* Mon Jan 26 2004 David Walluck <david@anti-microsoft.org> 0:1.3.0-5jpp * Mon Jan 26 2004 David Walluck <david@anti-microsoft.org> 0:1.3.0-5jpp
- really drop readline patch - really drop readline patch