223 lines
6.3 KiB
RPMSpec
223 lines
6.3 KiB
RPMSpec
%define javahome %{_jvmdir}/jdk
|
|
%define bootstrap 1
|
|
Name: jakarta-bcel
|
|
Version: 5.2
|
|
Release: 11mamba
|
|
Summary: Apache's Byte Code Engineering Library (BCEL)
|
|
Group: Development/Libraries/Java
|
|
Vendor: openmamba
|
|
Distribution: openmamba
|
|
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
|
|
URL: http://jakarta.apache.org/bcel/
|
|
#Source0: http://mirror.soluzionisis.com/apache/jakarta/bcel/source/bcel-%{version}-src.tar.gz
|
|
#svn export https://svn.apache.org/repos/asf/jakarta/bcel/tags/BCEL_5_2
|
|
#tar czvf BCEL-5.2-src-svn.tar.gz BCEL_5_2
|
|
Source0: BCEL-5.2-src-svn.tar.gz
|
|
Source1: jakarta-bcel-5.2-bcel.diff
|
|
Source2: jakarta-bcel-5.2-build.xml
|
|
# http://cvs.fedoraproject.org/repo/dist/bcel/
|
|
Source3: bcel-jakarta-site2.tar.gz
|
|
Source4: jakarta-bcel-5.2.pom
|
|
Patch0: jakarta-bcel-5.2-project_properties.patch
|
|
License: Apache Software License 2.0
|
|
BuildRequires: antlr
|
|
%if ! %bootstrap
|
|
BuildRequires: apache-anakia
|
|
%endif
|
|
BuildRequires: apache-ant
|
|
%if "%{stage1}" != "1"
|
|
BuildRequires: apache-ant-regexp
|
|
BuildRequires: jakarta-commons-collections
|
|
BuildRequires: jakarta-oro
|
|
BuildRequires: java-dom
|
|
BuildRequires: java-excalibur-avalon-logkit
|
|
BuildRequires: jakarta-regexp
|
|
BuildRequires: java-velocity
|
|
BuildRequires: werken-xpath
|
|
%endif
|
|
## AUTOBUILDREQ-BEGIN
|
|
BuildRequires: glibc-devel
|
|
BuildRequires: jpackage-utils
|
|
BuildRequires: libgcc
|
|
BuildRequires: libgcj4-devel
|
|
BuildRequires: libz-devel
|
|
## AUTOBUILDREQ-END
|
|
Requires: jpackage-utils
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
|
|
|
%description
|
|
This is a version of Apache's Byte Code Engineering Library (BCEL) that has been modified by the findbugs developers. The modifications add some new functionality, and also introduce a number of performance optimizations to address findbugs performance problems. Some of the performance optimizations induce API changes, so this version of BCEL is not compatible with the vanilla upstream version
|
|
|
|
%package javadoc
|
|
Group: Documentation
|
|
Summary: Manual for %{name}
|
|
|
|
%description javadoc
|
|
Apache's Byte Code Engineering Library (BCEL)
|
|
|
|
This package contains API documentation for %{name}.
|
|
|
|
%package manual
|
|
Group: Documentation
|
|
Summary: Javadoc for %{name}
|
|
|
|
%description manual
|
|
Apache's Byte Code Engineering Library (BCEL)
|
|
|
|
This package contains documentation for %{name}.
|
|
|
|
%prep
|
|
%setup -q -n BCEL_5_2
|
|
|
|
gzip -dc %{SOURCE3} | tar xf -
|
|
|
|
for j in $(find . -name "*.jar"); do
|
|
mv $j $j.no
|
|
done
|
|
|
|
cp %{SOURCE2} build.xml
|
|
mkdir jakarta-site2/lib
|
|
pushd jakarta-site2/lib/
|
|
%if "%{stage1}" != "1"
|
|
ln -sf $(build-classpath jdom) .
|
|
ln -sf $(build-classpath velocity) .
|
|
ln -sf $(build-classpath commons-collections) .
|
|
ln -sf $(build-classpath excalibur/avalon-logkit) .
|
|
ln -sf $(build-classpath werken-xpath) .
|
|
%endif
|
|
popd
|
|
%patch0 -b .sav
|
|
#ln -s %{_javadir}/regexp-1.5.jar regexp.jar
|
|
|
|
sed -i 's/\r//' docs/verifier/V_API_SD.eps docs/eps/classloader.fig
|
|
|
|
%build
|
|
export JAVA_HOME=%{javahome}
|
|
|
|
export CLASSPATH=""
|
|
%if ! %bootstrap
|
|
CLASSPATH=$CLASSPATH:$(build-classpath anakia)
|
|
%endif
|
|
%if "%{stage1}" != "1"
|
|
CLASSPATH=$CLASSPATH:$(build-classpath antlr commons-collections excalibur/avalon-logkit)
|
|
CLASSPATH=$CLASSPATH:$(build-classpath junit-3.8.2 jdom oro velocity werken-xpath ant/ant-apache-regexp)
|
|
%else
|
|
CLASSPATH=$CLASSPATH:$(build-classpath junit-3.8.2)
|
|
%endif
|
|
ant \
|
|
-Dbuild.dest=build/classes \
|
|
-Dbuild.dir=build \
|
|
-Ddocs.dest=docs \
|
|
-Ddocs.src=xdocs \
|
|
-Djakarta.site2=jakarta-site2 \
|
|
-Djdom.jar="file://$(build-classpath jdom)" \
|
|
-Dregexp.jar="file://$(build-classpath regexp)" \
|
|
dist xdocs test
|
|
|
|
# -Dbuild.dest=build/classes -Dbuild.dir=build -Ddocs.dest=docs \
|
|
# -Ddocs.src=xdocs -Djdom.jar=$(build-classpath jdom) \
|
|
# -Dregexp.jar="file://$(build-classpath regexp)" \
|
|
# jar javadoc
|
|
|
|
%install
|
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
|
|
|
mkdir -p %{buildroot}%{_javadir}
|
|
mkdir -p %{buildroot}%{_datadir}/maven2/poms
|
|
|
|
install -m 644 dist/bcel-%{version}.jar \
|
|
%{buildroot}%{_javadir}/bcel-%{version}.jar
|
|
|
|
%add_to_maven_depmap bcel bcel %{version} JPP bcel
|
|
%add_to_maven_depmap org.apache.bcel bcel %{version} JPP bcel
|
|
|
|
install -m 644 %{SOURCE4} %{buildroot}%{_datadir}/maven2/poms/JPP-bcel.pom
|
|
|
|
(
|
|
cd %{buildroot}%{_javadir}
|
|
for jar in *-%{version}*; do
|
|
ln -s ${jar} `echo $jar | %{__sed} "s|-%{version}||g"`
|
|
done
|
|
)
|
|
|
|
mkdir -p %{buildroot}%{_javadocdir}/bcel-%{version}
|
|
cp -pr dist/docs/api/* %{buildroot}%{_javadocdir}/bcel-%{version}
|
|
ln -s bcel-%{version} %{buildroot}%{_javadocdir}/bcel
|
|
|
|
%if "%{stage1}" != "1"
|
|
sed -i "s|./api/index.html|%{_javadocdir}/bcel-%{version}/index.html|" docs/index.html
|
|
%{_bindir}/aot-compile-rpm
|
|
%endif
|
|
|
|
%clean
|
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
|
|
|
%post
|
|
%update_maven_depmap
|
|
if [ -x %{_bindir}/rebuild-gcj-db ]; then
|
|
%{_bindir}/rebuild-gcj-db
|
|
fi
|
|
|
|
%postun
|
|
%update_maven_depmap
|
|
if [ -x %{_bindir}/rebuild-gcj-db ]; then
|
|
%{_bindir}/rebuild-gcj-db
|
|
fi
|
|
|
|
%files
|
|
%defattr(-,root,root)
|
|
%{_javadir}/bcel-%{version}.jar
|
|
%{_javadir}/bcel.jar
|
|
%if "%{stage1}" != "1"
|
|
%{_libdir}/gcj/jakarta-bcel/bcel-%{version}.jar.db
|
|
%{_libdir}/gcj/jakarta-bcel/bcel-%{version}.jar.so
|
|
%endif
|
|
%{_datadir}/maven2/poms
|
|
%{_mavendepmapfragdir}
|
|
%doc dist/*.txt dist/README.html
|
|
|
|
%files javadoc
|
|
%defattr(-,root,root)
|
|
%{_javadocdir}/bcel-%{version}
|
|
%{_javadocdir}/bcel
|
|
|
|
%files manual
|
|
%defattr(-,root,root)
|
|
%doc docs/*
|
|
|
|
%changelog
|
|
* Wed Mar 12 2014 Silvan Calarco <silvan.calarco@mambasoft.it> 5.2-11mamba
|
|
- build.xml: fix for encoding error with sun-java/openjdk 7
|
|
|
|
* Wed Mar 23 2011 gil <puntogil@libero.it> 5.2-10mamba
|
|
- rebuilt with java-openjdk & java-gcj-compat support
|
|
|
|
* Thu Nov 04 2010 gil <puntogil@libero.it> 5.2-9mamba
|
|
- rebuilt devel
|
|
|
|
* Thu Dec 10 2009 gil <puntogil@libero.it> 5.2-8mamba
|
|
- rebuilt with anakia support
|
|
|
|
* Sat Oct 03 2009 gil <puntogil@libero.it> 5.2-7mamba
|
|
- added new subpackage: manual
|
|
- edit the API link in the index.html file in the subpackage manual
|
|
- added %%post %%postun ( ,javadoc)
|
|
|
|
* Sat Oct 03 2009 gil <puntogil@libero.it> 5.2-6mamba
|
|
- rebuilt with system excalibur-avalon-logkit
|
|
|
|
* Wed Mar 18 2009 gil <puntogil@libero.it> 5.2-5mamba
|
|
- used cvs source
|
|
|
|
* Sat Mar 14 2009 gil <puntogil@libero.it> 5.2-4mamba
|
|
- rebuilt
|
|
|
|
* Mon Mar 09 2009 gil <puntogil@libero.it> 5.2-3mamba
|
|
- rebuilt
|
|
|
|
* Mon Mar 09 2009 gil <puntogil@libero.it> 5.2-2mamba
|
|
- rebuilt
|
|
|
|
* Wed Feb 18 2009 gil <puntogil@libero.it> 5.2-1mamba
|
|
- package created by autospec
|