Release ownership of _mavendepmapfragdir (RHBZ#850005) and other cleanup
This commit is contained in:
parent
589b2f353f
commit
84cb9b849d
@ -4,8 +4,10 @@
|
||||
<artifactId>bcel</artifactId>
|
||||
<version>5.2</version>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>regexp</groupId>
|
||||
<artifactId>regexp</artifactId>
|
||||
<version>1.4</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
||||
127
bcel.spec
127
bcel.spec
@ -28,18 +28,9 @@
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
#Fedora currently does not support maven
|
||||
%global _without_maven 1
|
||||
|
||||
# If you don't want to build with maven, and use straight ant instead,
|
||||
# give rpmbuild option '--without maven'
|
||||
|
||||
%global with_maven %{!?_without_maven:1}%{?_without_maven:0}
|
||||
%global without_maven %{?_without_maven:1}%{!?_without_maven:0}
|
||||
|
||||
Name: bcel
|
||||
Version: 5.2
|
||||
Release: 12%{?dist}
|
||||
Release: 13%{?dist}
|
||||
Epoch: 0
|
||||
Summary: Byte Code Engineering Library
|
||||
License: ASL 2.0
|
||||
@ -62,36 +53,15 @@ Group: Development/Libraries
|
||||
Requires: regexp
|
||||
BuildRequires: zip
|
||||
BuildRequires: ant
|
||||
%if %{with_maven}
|
||||
BuildRequires: maven >= 0:1.1
|
||||
BuildRequires: saxon
|
||||
BuildRequires: saxon-scripts
|
||||
BuildRequires: maven-plugins-base
|
||||
BuildRequires: maven-plugin-changelog
|
||||
BuildRequires: maven-plugin-changes
|
||||
BuildRequires: maven-plugin-developer-activity
|
||||
BuildRequires: maven-plugin-jxr
|
||||
BuildRequires: maven-plugin-license
|
||||
BuildRequires: maven-plugin-pmd
|
||||
BuildRequires: maven-plugin-test
|
||||
BuildRequires: maven-plugin-xdoc
|
||||
Requires(post): jpackage-utils >= 0:1.7.2
|
||||
Requires(postun): jpackage-utils >= 0:1.7.2
|
||||
%else
|
||||
BuildRequires: jdom
|
||||
BuildRequires: velocity
|
||||
BuildRequires: jakarta-commons-collections
|
||||
BuildRequires: apache-commons-lang
|
||||
#excalibur-avalong-logkit should be used once Maven is supported in Fedora
|
||||
BuildRequires: avalon-logkit
|
||||
#BuildRequires: excalibur-avalon-logkit
|
||||
BuildRequires: avalon-logkit
|
||||
BuildRequires: werken-xpath
|
||||
#BuildRequires: ant-apache-regexp
|
||||
%endif
|
||||
BuildRequires: regexp
|
||||
BuildRequires: jpackage-utils >= 0:1.7.2
|
||||
BuildArch: noarch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
|
||||
%description
|
||||
The Byte Code Engineering Library (formerly known as JavaClass) is
|
||||
@ -112,8 +82,7 @@ being the Xalan XSLT processor at Apache.
|
||||
%package javadoc
|
||||
Summary: Javadoc for %{name}
|
||||
Group: Documentation
|
||||
BuildRequires: java-javadoc
|
||||
Requires: java-javadoc
|
||||
Requires: jpackage-utils
|
||||
|
||||
%description javadoc
|
||||
%{summary}.
|
||||
@ -126,21 +95,10 @@ Group: Documentation
|
||||
%{summary}.
|
||||
|
||||
%prep
|
||||
#cat <<EOT
|
||||
#
|
||||
# If you dont want to build with maven,
|
||||
# give rpmbuild option '--without maven'
|
||||
#
|
||||
#EOT
|
||||
|
||||
%setup -q -n BCEL_5_2
|
||||
gzip -dc %{SOURCE5} | tar xf -
|
||||
# remove all binary libs
|
||||
#find . -name "*.jar" -exec rm -f {} \;
|
||||
for j in $(find . -name "*.jar"); do
|
||||
%{__mv} $j ${j}.no
|
||||
done
|
||||
%if %{without_maven}
|
||||
find . -name "*.jar" -exec rm -f {} \;
|
||||
mkdir jakarta-site2/lib
|
||||
pushd jakarta-site2/lib/
|
||||
build-jar-repository -s -p . jdom
|
||||
@ -150,7 +108,6 @@ pushd jakarta-site2/lib/
|
||||
build-jar-repository -s -p . avalon-logkit
|
||||
build-jar-repository -s -p . werken-xpath
|
||||
popd
|
||||
%endif
|
||||
cp %{SOURCE6} build.xml
|
||||
%patch0 -b .sav
|
||||
|
||||
@ -158,40 +115,11 @@ cp %{SOURCE6} build.xml
|
||||
sed -i 's/\r//' docs/verifier/V_API_SD.eps docs/eps/classloader.fig
|
||||
|
||||
%build
|
||||
%if %{with_maven}
|
||||
export DEPCAT="$(pwd)/%{name}-%{version}-depcat.new.xml"
|
||||
echo '<?xml version="1.0" standalone="yes"?>' > $DEPCAT
|
||||
echo '<depset>' >> $DEPCAT
|
||||
for p in $(find . -name project.xml); do
|
||||
pushd $(dirname $p)
|
||||
/usr/bin/saxon project.xml %{SOURCE1} >> $DEPCAT
|
||||
popd
|
||||
done
|
||||
echo >> $DEPCAT
|
||||
echo '</depset>' >> $DEPCAT
|
||||
/usr/bin/saxon $DEPCAT %{SOURCE2} > %{name}-%{version}-depmap.new.xml
|
||||
|
||||
for p in $(find . -name project.xml); do
|
||||
pushd $(dirname $p)
|
||||
%{__cp} -pr 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 -e \
|
||||
-Dmaven.repo.remote=file:/usr/share/maven/repository \
|
||||
-Dmaven.home.local=${MAVEN_HOME_LOCAL} \
|
||||
jar:jar javadoc:generate xdoc:transform
|
||||
%else
|
||||
#ant -Dregexp.jar="file://$(build-classpath regexp)" jar javadoc
|
||||
ant -Dbuild.dest=build/classes -Dbuild.dir=build -Ddocs.dest=docs \
|
||||
-Ddocs.src=xdocs -Djakarta.site2=jakarta-site2 -Djdom.jar=jdom.jar \
|
||||
-Dregexp.jar="file://$(build-classpath regexp)" \
|
||||
jar javadoc xdocs
|
||||
%endif
|
||||
|
||||
%install
|
||||
# inject OSGi manifests
|
||||
@ -204,64 +132,43 @@ zip -u target/%{name}-%{version}.jar META-INF/MANIFEST.MF
|
||||
%{__mkdir_p} %{buildroot}%{_javadir}
|
||||
%{__install} -m 0644 target/%{name}-%{version}.jar \
|
||||
%{buildroot}%{_javadir}/%{name}.jar
|
||||
# depmap frags
|
||||
%add_to_maven_depmap %{name} %{name} %{version} JPP %{name}
|
||||
%add_to_maven_depmap org.apache.bcel %{name} %{version} JPP %{name}
|
||||
|
||||
# pom
|
||||
%{__mkdir_p} %{buildroot}%{_datadir}/maven2/poms
|
||||
%{__mkdir_p} %{buildroot}%{_mavenpomdir}
|
||||
%{__install} -m 0644 %{SOURCE7} \
|
||||
%{buildroot}%{_datadir}/maven2/poms/JPP-%{name}.pom
|
||||
%{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
|
||||
|
||||
# depmap frags
|
||||
%add_maven_depmap JPP-%{name}.pom %{name}.jar -a org.apache.bcel:%{name}
|
||||
|
||||
# javadoc
|
||||
%{__mkdir_p} %{buildroot}%{_javadocdir}/%{name}
|
||||
%if %{with_maven}
|
||||
%{__cp} -pr target/docs/apidocs/* %{buildroot}%{_javadocdir}/%{name}
|
||||
%{__rm} -rf target/docs/apidocs
|
||||
%else
|
||||
%{__cp} -pr dist/docs/api/* %{buildroot}%{_javadocdir}/%{name}
|
||||
%{__rm} -rf dist/docs/api
|
||||
%endif
|
||||
|
||||
# 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
|
||||
%{__cp} LICENSE.txt %{buildroot}%{_docdir}/%{name}-%{version}
|
||||
|
||||
%clean
|
||||
%{__rm} -rf %{buildroot}
|
||||
|
||||
%post
|
||||
%update_maven_depmap
|
||||
|
||||
%postun
|
||||
%update_maven_depmap
|
||||
|
||||
%pre javadoc
|
||||
# workaround for rpm bug, can be removed in F-18
|
||||
[ $1 -gt 1 ] && [ -L %{_javadocdir}/%{name} ] && \
|
||||
%{__rm} -rf $(readlink -f %{_javadocdir}/%{name}) %{_javadocdir}/%{name} || :
|
||||
|
||||
%files
|
||||
%defattr(0644,root,root,0755)
|
||||
%doc %{_docdir}/%{name}-%{version}
|
||||
%doc %{_docdir}/%{name}-%{version}/LICENSE.txt
|
||||
%{_javadir}/%{name}.jar
|
||||
%{_datadir}/maven2/poms/*
|
||||
%{_mavendepmapfragdir}
|
||||
%{_mavenpomdir}/*
|
||||
%{_mavendepmapfragdir}/*
|
||||
|
||||
%files javadoc
|
||||
%defattr(0644,root,root,0755)
|
||||
%doc %{_javadocdir}/%{name}
|
||||
|
||||
%files manual
|
||||
%defattr(0644,root,root,0755)
|
||||
%doc %{_docdir}/%{name}-%{version}
|
||||
|
||||
%changelog
|
||||
* Tue Aug 21 2012 Andy Grimm <agrimm@gmail.com> - 0:5.2-13
|
||||
- This package should not own _mavendepmapfragdir (RHBZ#850005)
|
||||
- Build with maven, and clean up deprecated spec constructs
|
||||
- Fix pom file (See http://jira.codehaus.org/browse/MEV-592)
|
||||
|
||||
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:5.2-12
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user