diff --git a/.cvsignore b/.cvsignore index d57ea6b..936f0f2 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,4 +1,2 @@ -bcel-5.1-src.tar.gz -bcel-5.1 -noarch -*.src.rpm +bcel-5.1-src-RHCLEAN.tar.gz +jakarta-site2.tar.gz diff --git a/bcel-5.1-build.patch b/bcel-5.1-build.patch new file mode 100644 index 0000000..1ce6c7d --- /dev/null +++ b/bcel-5.1-build.patch @@ -0,0 +1,49 @@ +--- bcel-5.1/src/java/org/apache/bcel/verifier/statics/Pass2Verifier.java~ 2004-10-16 15:06:59.231184305 -0400 ++++ bcel-5.1/src/java/org/apache/bcel/verifier/statics/Pass2Verifier.java 2004-10-16 15:07:47.577200177 -0400 +@@ -345,7 +345,7 @@ + + for (int i=0; i + + + + regexp + regexp + 1.2 + + + JPP + regexp + regexp.jar + 1.2 + + + \ No newline at end of file diff --git a/bcel-5.1-project_xml.patch b/bcel-5.1-project_xml.patch new file mode 100644 index 0000000..12a4f15 --- /dev/null +++ b/bcel-5.1-project_xml.patch @@ -0,0 +1,33 @@ +--- project.xml.sav 2003-04-25 10:25:37.000000000 +0200 ++++ project.xml 2006-04-11 16:23:12.000000000 +0200 +@@ -21,7 +21,6 @@ + + + http://jakarta.apache.org/bcel/ +- http://cvs.apache.org/viewcvs/jakarta-bcel/ + jakarta.apache.org + /www/jakarta.apache.org/bcel/ + +@@ -73,22 +72,7 @@ + + + src/java +- +- src/java + +- +- +- exclude = **/*.class +- +- +- +- +- +- +- +- +- +- + + + diff --git a/bcel.spec b/bcel.spec index 7ec5734..5ec521c 100644 --- a/bcel.spec +++ b/bcel.spec @@ -1,26 +1,93 @@ -%define name bcel -%define version 5.1 -%define release 1jpp_8fc +# Copyright (c) 2000-2005, JPackage Project +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# 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. +# + +#For fedora, we want a native gcj compilation +%define _with_gcj_support 1 +#Fedora currently does not support maven +%define _without_maven 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}}} + +# If you don't want to build with maven, and use straight ant instead, +# give rpmbuild option '--without maven' + +%define with_maven %{!?_without_maven:1}%{?_without_maven:0} +%define without_maven %{?_without_maven:1}%{!?_without_maven:0} + %define section free -Name: %{name} -Version: %{version} -Release: %{release} +Name: bcel +Version: 5.1 +Release: 7jpp_1fc Epoch: 0 Summary: Byte Code Engineering Library License: Apache Software License -Source0: http://jakarta.apache.org/builds/jakarta-bcel/release/v5.1/bcel-5.1-src.tar.gz +Source0: bcel-5.1-src-RHCLEAN.tar.gz +# svn export https://svn.apache.org/repos/asf/jakarta/bcel/tags/BCEL_5_1 +Source1: pom-maven2jpp-depcat.xsl +Source2: pom-maven2jpp-newdepmap.xsl +Source3: pom-maven2jpp-mapdeps.xsl +Source4: bcel-5.1-jpp-depmap.xml +Source5: jakarta-site2.tar.gz + +Patch0: bcel-5.1-build.patch +Patch1: bcel-5.1-project_xml.patch URL: http://jakarta.apache.org/%{name}/ Group: Development/Libraries/Java -#Vendor: JPackage Project -#Distribution: JPackage Requires: regexp BuildRequires: ant +%if %{with_maven} +BuildRequires: maven >= 0:1.1 +BuildRequires: saxon +BuildRequires: saxon-scripts +%endif +#excalibur-avalong-logkit should be used once Maven is supported in Fedora +BuildRequires: avalon-logkit +#BuildRequires: excalibur-avalon-logkit +BuildRequires: jakarta-commons-collections +BuildRequires: jdom +BuildRequires: velocity BuildRequires: regexp -BuildRequires: jpackage-utils >= 0:1.5 +BuildRequires: jpackage-utils >= 0:1.6 +BuildRequires: werken.xpath +%if ! %{gcj_support} BuildArch: noarch +%endif BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot +%if %{gcj_support} +BuildRequires: java-gcj-compat-devel +Requires(post): java-gcj-compat +Requires(postun): java-gcj-compat +%endif + %description The Byte Code Engineering Library (formerly known as JavaClass) is intended to give users a convenient possibility to analyze, create, and @@ -40,110 +107,203 @@ being the Xalan XSLT processor at Apache. %package javadoc Summary: Javadoc for %{name} Group: Development/Documentation -Prereq: coreutils %description javadoc -Javadoc for %{name}. +%{summary}. -%if 0 %package manual Summary: Manual for %{name} Group: Development/Libraries/Java %description manual -Documentation for %{name}. -%endif +%{summary}. + +%package demo +Summary: Examples for %{name} +Group: Development/Libraries/Java + +%description demo +%{summary}. + +#%prep +#cat <' > $DEPCAT +echo '' >> $DEPCAT +for p in $(find . -name project.xml); do + pushd $(dirname $p) + /usr/bin/saxon project.xml %{SOURCE1} >> $DEPCAT + popd +done +echo >> $DEPCAT +echo '' >> $DEPCAT +/usr/bin/saxon $DEPCAT %{SOURCE2} > bcel-5.1-depmap.new.xml + +for p in $(find . -name project.xml); do + pushd $(dirname $p) + cp project.xml project.xml.orig + /usr/bin/saxon -o project.xml project.xml.orig %{SOURCE3} map=%{SOURCE4} + popd +done + +export MAVEN_HOME_LOCAL=$(pwd)/.maven + +maven \ + -Dmaven.repo.remote=file:/usr/share/maven/repository \ + -Dmaven.home.local=${MAVEN_HOME_LOCAL} \ + jar:jar javadoc:generate xdoc:transform +%else +ant -d -Dbuild.dest=build/classes -Dbuild.dir=build \ + -Ddocs.src=xdocs -Djakarta.site2=jakarta-site2 -Djdom.jar=jdom.jar \ + compile jar apidocs xdocs +%endif %install # jars -install -d -m 755 $RPM_BUILD_ROOT%{_javadir} -install -m 644 build/%{name}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar -(cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}*; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done) +%__mkdir_p %{buildroot}%{_javadir} +%if %{with_maven} +%__install -m 644 target/%{name}-%{version}.jar %{buildroot}%{_javadir}/%{name}-%{version}.jar +%else +%__install -m 644 build/%{name}.jar %{buildroot}%{_javadir}/%{name}-%{version}.jar +%endif +(cd %{buildroot}%{_javadir} && for jar in *-%{version}*; do %__ln_s ${jar} `echo $jar| sed "s|-%{version}||g"`; done) # javadoc -install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} -cp -pr docs/api/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} -rm -rf docs/api +%__mkdir_p %{buildroot}%{_javadocdir}/%{name}-%{version} +%if %{with_maven} +%__cp -pr target/docs/apidocs/* %{buildroot}%{_javadocdir}/%{name}-%{version} +%__rm -rf target/docs/apidocs +%else +%__cp -pr docs/api/* %{buildroot}%{_javadocdir}/%{name}-%{version} +%__rm -rf docs/api +%endif +# samples +%__mkdir_p %{buildroot}%{_datadir}/%{name}-%{version} +%__cp -pr examples/* %{buildroot}%{_datadir}/%{name}-%{version} +# manual +%__mkdir_p %{buildroot}%{_docdir}/%{name}-%{version} +%if %{with_maven} +%__cp -pr target/docs/* %{buildroot}%{_docdir}/%{name}-%{version} +%else +%__cp -pr docs/* %{buildroot}%{_docdir}/%{name}-%{version} +%endif -%clean -rm -rf $RPM_BUILD_ROOT +%if %{gcj_support} +%{_bindir}/aot-compile-rpm +%endif -%pre -rm -f %{_javadir}/bcel.jar +%clean +%__rm -rf %{buildroot} %post javadoc -rm -f %{_javadocdir}/%{name} -ln -s %{name}-%{version} %{_javadocdir}/%{name} +%__rm -f %{_javadocdir}/%{name} +%__ln_s %{name}-%{version} %{_javadocdir}/%{name} %postun javadoc if [ "$1" = "0" ]; then - rm -f %{_javadocdir}/%{name} + %__rm -f %{_javadocdir}/%{name} +fi + +%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 %defattr(0644,root,root,0755) %doc LICENSE.txt %{_javadir}/* +%if %{gcj_support} +%attr(-,root,root) %{_libdir}/gcj/%{name}/bcel-5.1.jar.* +%endif + %files javadoc %defattr(0644,root,root,0755) %{_javadocdir}/%{name}-%{version} -%if 0 %files manual %defattr(0644,root,root,0755) -%doc docs/* -%endif +%doc %{_docdir}/%{name}-%{version} + +%files demo +%defattr(0644,root,root,0755) +%{_datadir}/%{name}-%{version} # ----------------------------------------------------------------------------- %changelog -* Sat Jul 22 2006 Jakub Jelinek - 0:5.1-1jpp_8fc -- Rebuilt - -* Wed Jul 12 2006 Jesse Keating - 0:5.1-1jpp_7fc -- rebuild - -* Mon Mar 6 2006 Jeremy Katz - 0:5.1-1jpp_6fc -- stop the scriptlet spew - -* Wed Dec 21 2005 Jesse Keating - 0:5.1-1jpp_5fc -- rebuilt again - -* Tue Dec 13 2005 Jesse Keating -- rebuilt for new gcj - -* Fri Dec 09 2005 Jesse Keating -- rebuilt - -* Tue Nov 8 2005 Vadim Nasardinov - 0:5.1-1jpp_4fc -- Converted from ISO-8859-1 to UTF-8 - -* Tue Jan 11 2005 Gary Benson 0:5.1-1jpp_4fc -- Reenable building of classes that require javax.swing (#130006). - -* Thu Nov 4 2004 Gary Benson 0:5.1-1jpp_3fc -- Build into Fedora. - -* Fri Mar 26 2004 Frank Ch. Eigler 0:5.1-1jpp_2rh -- add RHUG upgrade cleanup - -* Thu Mar 4 2004 Frank Ch. Eigler 0:5.1-1jpp_1rh -- RH vacuuming +* Thu Jul 20 2006 Matt Wringe 0:5.1-7jpp_1fc +- Merged with upstream version +- set to build with Ant instead of Maven + +* Thu Jul 20 2006 Matt Wringe 0:5.1-7jpp +- Add missing werken.xpath to the build requires +- Added conditional native compilation +- Changed spec file encoding from ISO-8859-1 to UTF-8 + +* Tue Apr 11 2006 Ralph Apel 0:5.1-6jpp +- First JPP-1.7 release +- Use tidyed sources from svn +- Add resources to build the manual +- Add examples to -demo subpackage +- Build with maven by default +- Add option to build with straight ant + +* Fri Nov 19 2004 David Walluck 0:5.1-5jpp +- rebuild to fix packager + +* Sat Nov 06 2004 David Walluck 0:5.1-4jpp +- rebuild with javac 1.4.2 + +* Sat Oct 16 2004 David Walluck 0:5.1-3jpp +- rebuild for JPackage 1.6 + +* Fri Aug 20 2004 Ralph Apel 0:5.1-2jpp +- Build with ant-1.6.2 * Sun May 11 2003 David Walluck 0:5.1-1jpp - 5.1 diff --git a/pom-maven2jpp-depcat.xsl b/pom-maven2jpp-depcat.xsl new file mode 100644 index 0000000..92834cc --- /dev/null +++ b/pom-maven2jpp-depcat.xsl @@ -0,0 +1,109 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +ERROR + + + + + + + + + + JPP + + + + + + + + + + + + + + + + + + + +ERROR + + + + + + + + + + + + + + + + + + +ERROR + + + + + + .jar + . + + + .jar + + + + + + + + + + + + diff --git a/pom-maven2jpp-mapdeps.xsl b/pom-maven2jpp-mapdeps.xsl new file mode 100644 index 0000000..566a1da --- /dev/null +++ b/pom-maven2jpp-mapdeps.xsl @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pom-maven2jpp-newdepmap.xsl b/pom-maven2jpp-newdepmap.xsl new file mode 100644 index 0000000..3b8dbfa --- /dev/null +++ b/pom-maven2jpp-newdepmap.xsl @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/sources b/sources index 548438f..ee3e42a 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ -c9ebfa7373eb4416e590205fd0005039 bcel-5.1-src.tar.gz +67e0be2f572e10516061b6903a713ed9 bcel-5.1-src-RHCLEAN.tar.gz +2c511b30e00109b501c6f3bd757a1ce1 jakarta-site2.tar.gz