java-retroweaver/java-retroweaver.spec

181 lines
5.5 KiB
RPMSpec

Name: java-retroweaver
Version: 2.0.7
Release: 3mamba
Summary: a Java bytecode weaver
Group: Development/Libraries/Java
Vendor: openmamba
Distribution: openmamba
Packager: gil <puntogil@libero.it>
URL: http://retroweaver.sourceforge.net/
# svn checkout https://svn.sourceforge.net/svnroot/retroweaver/trunk/retroweaver retroweaver-2.0.7
Source0: retroweaver-%{version}-src-svn.tar.gz
Patch0: java-retroweaver-2.0.7-docs.patch
License: BSD
BuildRequires: apache-ant
BuildRequires: apache-ant-nodeps
BuildRequires: apache-ant-junit
BuildRequires: java-backport-util-concurrent
BuildRequires: java-emma
BuildRequires: java-junit3
BuildRequires: java-pmd
BuildRequires: jpackage-utils
BuildRequires: objectweb-asm = 3.2
BuildRequires: sun-java-4
BuildRequires: sun-java-5
BuildRequires: sun-java
Requires: java-backport-util-concurrent
Requires: objectweb-asm = 3.2
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
Retroweaver is a tool, which converts Java 5 (or 6) compliant
class files into Java 1.x compliant class files. The jar file
retroweaver.jar contains both the class processor (which may
be used at compile time) and the runtime classes. Additionally
there is the jar file retroweaver-rt.jar (which contains the
runtime classes only).
%package javadoc
Group: Documentation
Summary: Javadoc for %{name}
%description javadoc
A Java bytecode weaver that enables you to take advantage of the new
1.5 language features in your source code, while still retaining
compatibility with 1.4 virtual machines
This package contains Javadoc for %{name}.
%package manual
Group: Documentation
Summary: Documentation for %{name}.
%description manual
A Java bytecode weaver that enables you to take advantage of the new
1.5 language features in your source code, while still retaining
compatibility with 1.4 virtual machines
This package contains documentation for %{name}.
%prep
%setup -q -n retroweaver-%{version}
#-D -T
#:<< __EOF
rm -rf build.Linux.properties
rm -rf build.properties
cat > build.properties << __GIL
jre14.home=/usr/lib/jvm/java-1.4.2-sun/jre
jre14.jvm=/usr/lib/jvm/java-1.4.2-sun/jre/bin/java
jre14.runtime=/usr/lib/jvm/java-1.4.2-sun/jre/lib/rt.jar
jre15.home=/usr/lib/jvm/java-1.5.0-sun/jre
jre15.runtime=/usr/lib/jvm/java-1.5.0-sun/jre/lib/rt.jar
jre15.jvm=/usr/lib/jvm/java-1.5.0-sun/jre/bin/java
jdk16.home=/usr/lib/jvm/jdk-sun
jdk16.rmic=/usr/lib/jvm/jdk-sun/bin/rmic
jre16.runtime=//usr/lib/jvm/jre-sun/lib/rt.jar
jre16.home=/usr/lib/jvm/jre-sun
jre16.jvm=/usr/lib/jvm/jre-sun/bin/java
emma.home=%{_javadir}
pmd.home=%{_datadir}/pmd-4.2.5
ant.jar=%{_javadir}/ant-1.7.1.jar
__GIL
cp -pr build.properties build.Linux.properties
for j in $(find . -name "*.jar"); do
mv $j $j.no
done
pushd lib
ln -sf $(build-classpath objectweb-asm/asm-util) asm-util-3.2.jar
ln -sf $(build-classpath objectweb-asm/asm-commons) asm-commons-3.2.jar
ln -sf $(build-classpath objectweb-asm/asm) asm-3.2.jar
ln -sf $(build-classpath backport-util-concurrent) .
ln -sf $(build-classpath junit-3.8.2) junit.jar
ln -sf $(build-classpath ant-1.7.1) .
popd
%patch0
%build
export JAVA_HOME=/usr/lib/jvm/jdk-sun
export CLASSPATH=$(build-classpath junit-3.8.2 commons-lang24 emma \
emma_ant pmd ant/ant-junit ant/ant-nodeps objectweb-asm):$JAVA_HOME/jre/lib/rt.jar
ant \
-Dversion=%{version} \
dist docs
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
mkdir -p %{buildroot}%{_javadir}
mkdir -p %{buildroot}%{_datadir}/maven2/poms
install -pm 644 target/release/retroweaver-%{version}.jar \
%{buildroot}%{_javadir}/retroweaver-%{version}.jar
install -pm 644 target/release/retroweaver-all-%{version}.jar \
%{buildroot}%{_javadir}/retroweaver-all-%{version}.jar
install -pm 644 target/release/retroweaver-rt-%{version}.jar \
%{buildroot}%{_javadir}/retroweaver-rt-%{version}.jar
install -pm 644 target/release/retroweaver-tests-%{version}.jar \
%{buildroot}%{_javadir}/retroweaver-tests-%{version}.jar
%add_to_maven_depmap net.sourceforge.retroweaver retroweaver %{version} JPP retroweaver
install -pm 644 maven/retroweaver.pom %{buildroot}%{_datadir}/maven2/poms/JPP.retroweaver.pom
%add_to_maven_depmap net.sourceforge.retroweaver retroweaver-rt %{version} JPP retroweaver-rt
install -pm 644 maven/retroweaver-rt.pom %{buildroot}%{_datadir}/maven2/poms/JPP.retroweaver-rt.pom
(
cd %{buildroot}%{_javadir}
for jar in *-%{version}.jar; do
ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`
done
)
mkdir -p %{buildroot}%{_javadocdir}/retroweaver-%{version}
cp -pr target/api/* %{buildroot}%{_javadocdir}/retroweaver-%{version}
ln -s retroweaver-%{version} %{buildroot}%{_javadocdir}/retroweaver
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%files
%defattr(-,root,root)
%{_javadir}/retroweaver-%{version}.jar
%{_javadir}/retroweaver.jar
%{_javadir}/retroweaver-all-%{version}.jar
%{_javadir}/retroweaver-all.jar
%{_javadir}/retroweaver-rt-%{version}.jar
%{_javadir}/retroweaver-rt.jar
%{_javadir}/retroweaver-tests-%{version}.jar
%{_javadir}/retroweaver-tests.jar
%{_datadir}/maven2/poms
%{_mavendepmapfragdir}
%doc ChangeLog.txt
%files javadoc
%defattr(-,root,root)
%{_javadocdir}/retroweaver-%{version}
%{_javadocdir}/retroweaver
%files manual
%defattr(-,root,root)
%doc docs/*
%changelog
* Fri Nov 26 2010 gil <puntogil@libero.it> 2.0.7-3mamba
- rebuilt devel
* Wed Mar 11 2009 gil <puntogil@libero.it> 2.0.7-2mamba
- add maven2 poms
* Wed Mar 11 2009 gil <puntogil@libero.it> 2.0.7-1mamba
- package created by autospec