diff --git a/bsh-1.3.0.pom b/bsh-1.3.0.pom
new file mode 100644
index 0000000..2fdc81a
--- /dev/null
+++ b/bsh-1.3.0.pom
@@ -0,0 +1,8 @@
+
+
+ 4.0.0
+ bsh
+ bsh
+ Beanshell
+ 1.3.0
+
diff --git a/bsh-bsf-1.3.0.pom b/bsh-bsf-1.3.0.pom
new file mode 100644
index 0000000..ba753f0
--- /dev/null
+++ b/bsh-bsf-1.3.0.pom
@@ -0,0 +1,8 @@
+
+
+ 4.0.0
+ bsh
+ bsh-bsf
+ Beanshell BSFEngine
+ 1.3.0
+
diff --git a/bsh.spec b/bsh.spec
index d3afeef..c28540f 100644
--- a/bsh.spec
+++ b/bsh.spec
@@ -28,13 +28,11 @@
# 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 gcj_support 1
Name: bsh
Version: 1.3.0
-Release: 10jpp.1%{?dist}
+Release: 11jpp.1%{?dist}
Epoch: 0
Summary: Lightweight Scripting for Java
License: LGPL
@@ -42,11 +40,15 @@ Source0: %{name}-%{version}-src.tar.bz2
#cvs -d:pserver:anonymous@beanshell.cvs.sourceforge.net:/cvsroot/beanshell login
#cvs -z3 -d:pserver:anonymous@beanshell.cvs.sourceforge.net:/cvsroot/beanshell export -r rel_1_3_0_final BeanShell
#tar cjf bsh-1.3.0-src.tar.bz2 BeanShell
+Source1: bsh-1.3.0.pom
+Source2: bsh-bsf-1.3.0.pom
+
Patch0: %{name}-build.patch
#Patch1: %{name}-readline.patch
BuildRequires: ant, bsf, ant-trax
+BuildRequires: servlet
Requires: bsf
-Requires: jpackage-utils >= 0:1.6
+Requires: jpackage-utils >= 0:1.7.2
#BuildRequires: libreadline-java
Url: http://www.beanshell.org/
Group: Development/Java
@@ -108,7 +110,9 @@ Demonstrations and samples for %{name}.
%setup -q -n BeanShell
%patch0 -p1
#%patch1 -p1
-find . -name "*.jar" -exec rm -f {} \;
+for j in $(find . -name "*.jar"); do
+ mv $j $j.no
+done
# remove all CVS files
for dir in `find . -type d -name CVS`; do rm -rf $dir; done
for file in `find . -type f -name .cvsignore`; do rm -rf $file; done
@@ -119,14 +123,11 @@ done
%build
mkdir -p lib
-#export CLASSPATH=$(build-classpath bsf libreadline-java)
-export CLASSPATH=$(build-classpath bsf)
-# remove servlet dependency
-rm -rf src/bsh/servlet
-ant -Dexclude-servlet='bsh/servlet/*' compile
-ant -Dexclude-servlet='bsh/servlet/*' jarall
-ant -Dexclude-servlet='bsh/servlet/*' javadoc
-ant -Dexclude-servlet='bsh/servlet/*' bshdoc
+pushd lib
+ln -sf $(build-classpath bsf)
+ln -sf $(build-classpath servlet)
+popd
+ant dist
(cd docs/faq && ant)
(cd docs/manual && ant)
@@ -134,8 +135,32 @@ ant -Dexclude-servlet='bsh/servlet/*' bshdoc
rm -rf $RPM_BUILD_ROOT
# jars
install -d -m 755 $RPM_BUILD_ROOT%{_javadir}
-install -m 644 dist/%{name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
+install -m 644 dist/%{name}-%{version}.jar \
+ $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
+install -m 644 dist/%{name}-bsf-%{version}.jar \
+ $RPM_BUILD_ROOT%{_javadir}/%{name}-bsf-%{version}.jar
+install -m 644 dist/%{name}-classpath-%{version}.jar \
+ $RPM_BUILD_ROOT%{_javadir}/%{name}-classpath-%{version}.jar
+install -m 644 dist/%{name}-commands-%{version}.jar \
+ $RPM_BUILD_ROOT%{_javadir}/%{name}-commands-%{version}.jar
+install -m 644 dist/%{name}-core-%{version}.jar \
+ $RPM_BUILD_ROOT%{_javadir}/%{name}-core-%{version}.jar
+install -m 644 dist/%{name}-reflect-%{version}.jar \
+ $RPM_BUILD_ROOT%{_javadir}/%{name}-reflect-%{version}.jar
+install -m 644 dist/%{name}-util-%{version}.jar \
+ $RPM_BUILD_ROOT%{_javadir}/%{name}-util-%{version}.jar
+
(cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}*; do ln -sf ${jar} ${jar/-%{version}/}; done)
+%add_to_maven_depmap %{name} %{name} %{version} JPP %{name}
+%add_to_maven_depmap %{name} %{name}-bsf %{version} JPP %{name}-bsf
+
+# poms
+install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/maven2/poms
+install -pm 644 %{SOURCE1} \
+ $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.%{name}.pom
+install -pm 644 %{SOURCE2} \
+ $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.%{name}-bsf.pom
+
# manual
find docs -name ".cvswrappers" -exec rm -f {} \;
find docs -name "*.xml" -exec rm -f {} \;
@@ -173,6 +198,10 @@ cat two > tests/Interactive/reload/two
rm two
install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/%{name}
cp -pr tests $RPM_BUILD_ROOT%{_datadir}/%{name}
+install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/%{name}/webapps
+install -m 644 dist/bshservlet.war $RPM_BUILD_ROOT%{_datadir}/%{name}/webapps
+install -m 644 dist/bshservlet-wbsh.war $RPM_BUILD_ROOT%{_datadir}/%{name}/webapps
+
# scripts
install -d $RPM_BUILD_ROOT%{_bindir}
@@ -225,22 +254,26 @@ EOF
cat scripts/bshdoc.bsh >> $RPM_BUILD_ROOT%{_bindir}/%{name}doc
%if %{gcj_support}
-%{_bindir}/aot-compile-rpm
+%{_bindir}/aot-compile-rpm \
+ --exclude %{_datadir}/%{name}/webapps/bshservlet.war \
+ --exclude %{_datadir}/%{name}/webapps/bshservlet-wbsh.war
%endif
%clean
rm -rf $RPM_BUILD_ROOT
-%if %{gcj_support}
%post
+%update_maven_depmap
+%if %{gcj_support}
if [ -x %{_bindir}/rebuild-gcj-db ]
then
%{_bindir}/rebuild-gcj-db
fi
%endif
-%if %{gcj_support}
%postun
+%update_maven_depmap
+%if %{gcj_support}
if [ -x %{_bindir}/rebuild-gcj-db ]
then
%{_bindir}/rebuild-gcj-db
@@ -254,6 +287,9 @@ fi
%attr(0755,root,root) %{_bindir}/%{name}doc
%{_javadir}/*
%dir %{_datadir}/%{name}
+%{_datadir}/%{name}/webapps
+%{_datadir}/maven2/poms/*
+%{_mavendepmapfragdir}
%if %{gcj_support}
%attr(-,root,root) %{_libdir}/gcj/%{name}
@@ -274,6 +310,15 @@ fi
%{_datadir}/%{name}/*
%changelog
+* Mon Jan 21 2008 Permaine Cheung 0:1.3.0-11jpp.1
+- Merge with upstream
+
+* Thu Jul 12 2007 Ralph Apel 0:1.3.0-11jpp
+- Fix aot build
+- Add pom and depmap frags
+- Restore all jars
+- Add webapps
+
* Fri Mar 16 2007 Permaine Cheung 0:1.3.0-10jpp.1
- Merge with upstream
- Removed unapplied patch and moved buildroot removal from prep to install,