[Jpackage-commits] dist/retroweaver/devel .cvsignore, 1.1, 1.2 retroweaver-build.patch, NONE, 1.1 retroweaver.spec, NONE, 1.1 sources, 1.1, 1.2

jpackage jpackage at ryu.zarb.org
Wed May 28 21:42:36 CEST 2008


Update of /home/projects/jpackage/cvs/dist/retroweaver/devel
In directory ryu.zarb.org:/tmp/cvs-serv15847/devel

Modified Files:
	.cvsignore sources 
Added Files:
	retroweaver-build.patch retroweaver.spec 
Log Message:
Import from JPP 5.0

Index: .cvsignore
===================================================================
RCS file: /home/projects/jpackage/cvs/dist/retroweaver/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -C 2 -d -r1.1 -r1.2
*** .cvsignore	28 May 2008 19:42:19 -0000	1.1
--- .cvsignore	28 May 2008 19:42:34 -0000	1.2
***************
*** 0 ****
--- 1 ----
+ retroweaver-2.0.2.zip

Index: sources
===================================================================
RCS file: /home/projects/jpackage/cvs/dist/retroweaver/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -C 2 -d -r1.1 -r1.2
*** sources	28 May 2008 19:42:19 -0000	1.1
--- sources	28 May 2008 19:42:34 -0000	1.2
***************
*** 0 ****
--- 1 ----
+ 5ccb10e53922266575d665346c091d9f  retroweaver-2.0.2.zip

--- NEW FILE: retroweaver.spec ---
# Copyright (c) 2000-2007, 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.
#

%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

Name:           retroweaver
Version:        2.0.2
Release:        1jpp
Epoch:          0
Summary:        Retroweaver
License:        BSD
Url:            http://retroweaver.sourceforge.net/
Source0:        http://downloads.sourceforge.net/retroweaver/retroweaver-2.0.2.zip
Patch0:         %{name}-build.patch

Group:          Development/Libraries/Java
Vendor: %{?_vendorinfo:%{_vendorinfo}}%{!?_vendorinfo:%{_vendor}}
Distribution: %{?_distribution:%{_distribution}}%{!?_distribution:%{_vendor}}
BuildRequires:  ant >= 0:1.6.5
BuildRequires:  junit
BuildRequires:  emma
BuildRequires:  pmd
BuildRequires:  backport-util-concurrent
BuildRequires:  objectweb-asm >= 0:3.1
BuildRequires:  jpackage-utils >= 0:1.7.3
BuildRequires:  java-devel >= 0:1.5.0
BuildRequires:  jre-1.4.2-sun
BuildRequires:  jre-1.4.2-bea
BuildRequires:  jre-1.4.2-ibm
BuildRequires:  jre-1.5.0-sun
BuildRequires:  jre-1.5.0-bea
BuildRequires:  jre-1.5.0-ibm
BuildRequires:  jre-1.6.0
%if ! %{gcj_support}
BuildArch:      noarch
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot
%if %{gcj_support}
BuildRequires:    gnu-crypto
BuildRequires:    java-gcj-compat-devel
Requires(post):   java-gcj-compat
Requires(postun): java-gcj-compat
%endif
Requires:  backport-util-concurrent
Requires:  objectweb-asm >= 0:3.1

%description
Retroweaver is a bytecode weaver that enables you to take 
advantage of the new Java 1.5 language features, while still
retaining total binary compatability with 1.4 virtual 
machines. Retroweaver operates by transforming Java class 
files compiled by a 1.5 compiler into version 1.4 class 
files which can then be run on any 1.4 virtual machine.

%package javadoc
Summary:        Javadoc for %{name}
Group:          Development/Documentation
Requires(post):   /bin/rm,/bin/ln
Requires(postun): /bin/rm

%description javadoc
%{summary}.

%package manual
Summary:        Documents for %{name}
Group:          Development/Documentation

%description manual
%{summary}.

%prep
%setup -q
# remove all binary libs
for j in $(find . -name "*.jar"); do
    mv $j $j.no
done
ln -sf $(build-classpath objectweb-asm/asm-util) lib/asm-util-3.1.jar
ln -sf $(build-classpath objectweb-asm/asm-commons) lib/asm-commons-3.1.jar
ln -sf $(build-classpath objectweb-asm/asm) lib/asm-3.1.jar
ln -sf $(build-classpath backport-util-concurrent) lib/
ln -sf $(build-classpath junit) lib/
ln -sf $(build-classpath ant) lib/
mkdir -p pmdhome/lib
ln -sf $(build-classpath pmd) pmdhome/lib
%patch0 -b .sav0

%build
export JAVA_HOME=%{_jvmdir}/java-1.5.0
#export OPT_JAR_LIST="ant/ant-nodeps ant/ant-junit junit emma emma_ant"
ant \
    -Dversion=2.0.2 \
    -Djdk14.home=%{_jvmdir}/java-1.4.2-sun \
    -Djdk14.rmic=%{_jvmdir}/java-1.4.2-sun/bin/rmic \
    -Djre14.home=%{_jvmdir}/java-1.4.2-sun/jre \
    -Djre14.jvm=%{_jvmdir}/java-1.4.2-sun/jre/bin/java \
    -Djre14.runtime=%{_jvmdir}/java-1.4.2-sun/jre/lib/rt.jar \
    -Djre15.home=%{_jvmdir}/java-1.5.0-sun/jre \
    -Djre15.jvm=%{_jvmdir}/java-1.5.0-sun/jre/bin/java \
    -Djre16.home=%{_jvmdir}/java-1.6.0-sun/jre \
    -Djre16.jvm=%{_jvmdir}/java-1.6.0-sun/jre/bin/java \
    -Dibm14.home=%{_jvmdir}/java-1.4.2-ibm/jre \
    -Dibm14.jvm=%{_jvmdir}/java-1.4.2-ibm/jre/bin/java \
    -Dibm15.home=%{_jvmdir}/java-1.5.0-ibm/jre \
    -Dibm15.jvm=%{_jvmdir}/java-1.5.0-ibm/jre/bin/java \
    -Dbea14.home=%{_jvmdir}/java-1.4.2-bea/jre \
    -Dbea14.jvm=%{_jvmdir}/java-1.4.2-bea/jre/bin/java \
    -Dbea15.home=%{_jvmdir}/java-1.5.0-bea/jre \
    -Dbea15.jvm=%{_jvmdir}/java-1.5.0-bea/jre/bin/java \
    -Demma.lib=%{_javadir} \
    -Dpmd.home=$(pwd)/pmdhome \
    coverage pmd docs



%install
rm -rf $RPM_BUILD_ROOT
# jars
install -d -m 755 $RPM_BUILD_ROOT%{_javadir}
install -m 644 target/release/%{name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
%add_to_maven_depmap net.sourceforge.retroweaver %{name} %{version} JPP %{name}
install -m 644 target/release/%{name}-rt-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-rt-%{version}.jar
%add_to_maven_depmap net.sourceforge.retroweaver %{name}-rt %{version} JPP %{name}-rt
install -m 644 target/release/%{name}-all-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-all-%{version}.jar
install -m 644 target/release/%{name}-tests-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-tests-%{version}.jar

(cd $RPM_BUILD_ROOT%{_javadir} 
for jar in *-%{version}*.jar; do ln -sf ${jar} `echo $jar| sed  "s|-%{version}||g"`; done)

# poms
install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/maven2/poms
install -pm 644 maven/%{name}.pom \
    $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP-%{name}.pom
install -pm 644 maven/%{name}-rt.pom \
    $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP-%{name}-rt.pom

# javadoc
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
cp -pr target/api/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name} # ghost symlink

install -d -m 755 $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
cp -pr docs $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
cp -pr target/coverage $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
cp -pr target/pmd $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
cp -p ChangeLog.txt $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}

%if %{gcj_support}
export CLASSPATH=$(build-classpath gnu-crypto)
%{_bindir}/aot-compile-rpm
%endif

%clean
rm -rf $RPM_BUILD_ROOT

%post javadoc
rm -f %{_javadocdir}/%{name}
ln -s %{name}-%{version} %{_javadocdir}/%{name}

%postun javadoc
if [ "$1" = "0" ]; then
    rm -f %{_javadocdir}/%{name}
fi

%post
%update_maven_depmap
%if %{gcj_support}
if [ -x %{_bindir}/rebuild-gcj-db ]
then
  %{_bindir}/rebuild-gcj-db
fi
%endif

%postun
%update_maven_depmap
%if %{gcj_support}
if [ -x %{_bindir}/rebuild-gcj-db ]
then
  %{_bindir}/rebuild-gcj-db
fi
%endif

%files
%defattr(0644,root,root,0755)
%{_javadir}/%{name}*.jar
%{_datadir}/maven2/poms/*
%{_mavendepmapfragdir}
%if %{gcj_support}
%dir %attr(-,root,root) %{_libdir}/gcj/%{name}
%attr(-,root,root) %{_libdir}/gcj/%{name}/%{name}-%{version}.jar.*
%endif

%files javadoc
%defattr(0644,root,root,0755)
%{_javadocdir}/%{name}-%{version}
%ghost %{_javadocdir}/%{name}

%files manual
%defattr(0644,root,root,0755)
%{_docdir}/%{name}-%{version}

%changelog
* Mon Nov 26 2007 Ralph Apel <r.apel at r-apel.de> - 0:2.0.2-1jpp
- First JPP release


--- NEW FILE: retroweaver-build.patch ---
--- build.xml.sav0	2007-11-10 13:14:38.000000000 +0100
+++ build.xml	2007-11-26 19:05:46.000000000 +0100
@@ -48,7 +48,7 @@
 	<property name="asm.jar" value="${lib.dir}/asm-3.1.jar" />
 	<property name="asm-commons.jar" value="${lib.dir}/asm-commons-3.1.jar" />
 	<property name="asm-util.jar" value="${lib.dir}/asm-util-3.1.jar" />
-	<property name="ant.jar" value="${ant.home}/lib/ant.jar" />
+	<property name="ant.jar" value="${lib.dir}/ant.jar" />
 
 	<property name="test.main.name" value="net.sourceforge.retroweaver.tests.RetroweaverTestSuite" />
 
@@ -442,7 +442,7 @@
 		</emmajava>
 -->
 		<emmajava fork="yes" jvm="${jre14.jvm}" libclasspathref="emma.classpath" classname="junit.textui.TestRunner" classpathref="test.classpath" sourcepath="${src.dir}" fullmetadata="true" dumpsessiondata="true" outfile="${coverage.dir}/coverage14.emma" verbosity="quiet" >
-			<arg line="${test.main.name}" />
+			<arg value="${test.main.name}" />
 			<filter includes="net.sourceforge.retroweaver.runtime.*" />
 			<txt outfile="${coverage.dir}/coverage14.txt" />
 		</emmajava>
@@ -464,10 +464,10 @@
 			use="true"
 			source="1.5"
 			linksource="yes"
-			windowtitle="Test API">
+			windowtitle="RetroWeaver ${version} API">
 
 			<packageset dir="${src.dir}" defaultexcludes="yes">
-				<include name="com/**"/>
+				<include name="net/**"/>
 			</packageset>
 		</javadoc>
 	</target>




More information about the JPackage-commits mailing list