diff --git a/.gitignore b/.gitignore
index 3b95841..165d760 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1 @@
-bcel-5.2-src.tar.gz
-bcel-jakarta-site2.tar.gz
+/bcel-5.2-src.tar.gz
diff --git a/bcel-5.2-build.xml b/bcel-5.2-build.xml
deleted file mode 100644
index 1327969..0000000
--- a/bcel-5.2-build.xml
+++ /dev/null
@@ -1,188 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ================================= WARNING ================================
- Junit isn't present in your ${ANT_HOME}/lib directory. Tests not executed.
- ==========================================================================
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Proxy used :
- Proxy host [${proxy.host}]
- Proxy port [${proxy.port}]
- Proxy user [${proxy.username}]
-
-
-
- Proxy not used.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- The Jakarta-Site2 module is not present! Please check
- to make sure that you have checked it out from CVS.
-
- <http://jakarta.apache.org/site/jakarta-site2.html>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/bcel-5.2-jpp-depmap.xml b/bcel-5.2-jpp-depmap.xml
deleted file mode 100644
index f515b68..0000000
--- a/bcel-5.2-jpp-depmap.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- regexp
- regexp
- 1.2
-
-
- JPP
- regexp
- regexp.jar
- 1.2
-
-
-
\ No newline at end of file
diff --git a/bcel-5.2-project_properties.patch b/bcel-5.2-project_properties.patch
deleted file mode 100644
index 73734fb..0000000
--- a/bcel-5.2-project_properties.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- project.properties.sav 2007-06-26 15:21:10.000000000 +0200
-+++ project.properties 2007-06-26 15:21:35.000000000 +0200
-@@ -42,7 +42,7 @@
-
- maven.changes.issue.template = %URL%/bugzilla/show_bug.cgi?id=%ISSUE%
-
--maven.xdoc.jsl = ../commons-build/commons-site.jsl
-+maven.xdoc.jsl = file:${basedir}/commons-build/commons-site.jsl
- maven.xdoc.date = left
- maven.xdoc.poweredby.image = maven-feather.png
- maven.xdoc.version = ${pom.currentVersion}
diff --git a/bcel-5.2.pom b/bcel-5.2.pom
deleted file mode 100644
index a106230..0000000
--- a/bcel-5.2.pom
+++ /dev/null
@@ -1,13 +0,0 @@
-
- 4.0.0
- bcel
- bcel
- 5.2
-
-
- regexp
- regexp
- 1.4
-
-
-
diff --git a/bcel-MANIFEST.MF b/bcel-MANIFEST.MF
deleted file mode 100644
index 2170afd..0000000
--- a/bcel-MANIFEST.MF
+++ /dev/null
@@ -1,17 +0,0 @@
-Manifest-Version: 1.0
-Ant-Version: Apache Ant 1.8.2
-Created-By: 1.7.0_b147-icedtea-mockbuild_2011_11_10_18_56-b00 (Oracle
- Corporation)
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.apache.bcel
-Export-Package: org.apache.bcel;version="5.2.0",org.apache.bcel.classf
- ile;version="5.2.0",org.apache.bcel.generic;version="5.2.0",org.apach
- e.bcel.util;version="5.2.0",org.apache.bcel.verifier;version="5.2.0",
- org.apache.bcel.verifier.exc;version="5.2.0",org.apache.bcel.verifier
- .statics;version="5.2.0",org.apache.bcel.verifier.structurals;version
- ="5.2.0"
-Bundle-Version: 5.2.0.v201005080400
-Bundle-ManifestVersion: 2
diff --git a/bcel-pom.xml b/bcel-pom.xml
new file mode 100644
index 0000000..a2aaad5
--- /dev/null
+++ b/bcel-pom.xml
@@ -0,0 +1,33 @@
+
+ 4.0.0
+ org.apache.bcel
+ bcel
+ 5.2
+ bundle
+
+ ISO-8859-1
+
+
+
+ regexp
+ regexp
+ 1.2
+
+
+
+ src/java
+
+
+ org.apache.felix
+ maven-bundle-plugin
+ true
+
+
+ <_nouses>true
+ org.apache.bcel.*
+
+
+
+
+
+
diff --git a/bcel.spec b/bcel.spec
index 7cc37f4..21499f4 100644
--- a/bcel.spec
+++ b/bcel.spec
@@ -1,68 +1,20 @@
-# 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.
-#
-
Name: bcel
Version: 5.2
-Release: 15%{?dist}
+Release: 16%{?dist}
Epoch: 0
Summary: Byte Code Engineering Library
License: ASL 2.0
-Source0: %{name}-%{version}-src.tar.gz
-#svn export https://svn.apache.org/repos/asf/jakarta/bcel/tags/BCEL_5_2
-#tar czvf bcel-5.2-src.tar.gz BCEL_5_2
-Source1: pom-maven2jpp-depcat.xsl
-Source2: pom-maven2jpp-newdepmap.xsl
-Source3: pom-maven2jpp-mapdeps.xsl
-Source4: %{name}-%{version}-jpp-depmap.xml
-#Source5: commons-build.tar.gz
-Source5: bcel-jakarta-site2.tar.gz
-Source6: %{name}-%{version}-build.xml
-Source7: %{name}-%{version}.pom
-Source8: %{name}-MANIFEST.MF
-
-Patch0: %{name}-%{version}-project_properties.patch
-URL: http://jakarta.apache.org/%{name}/
-Group: Development/Libraries
-Requires: regexp
-BuildRequires: zip
-BuildRequires: ant
-BuildRequires: jdom
-BuildRequires: velocity
-BuildRequires: jakarta-commons-collections
-BuildRequires: apache-commons-lang
-BuildRequires: avalon-logkit
-BuildRequires: werken-xpath
-BuildRequires: regexp
-BuildRequires: jpackage-utils >= 0:1.7.2
+URL: http://commons.apache.org/proper/commons-bcel/
+Source0: http://archive.apache.org/dist/commons/bcel/source/bcel-5.2-src.tar.gz
+# Upstream uses Maven 1, which is not available in Fedora.
+# The following is upstream project.xml converted to Maven 2/3.
+Source1: %{name}-pom.xml
BuildArch: noarch
+BuildRequires: maven-local
+BuildRequires: mvn(regexp:regexp)
+BuildRequires: mvn(org.apache.felix:maven-bundle-plugin)
+
%description
The Byte Code Engineering Library (formerly known as JavaClass) is
intended to give users a convenient possibility to analyze, create, and
@@ -80,91 +32,37 @@ optimizers, obsfuscators and analysis tools, the most popular probably
being the Xalan XSLT processor at Apache.
%package javadoc
-Summary: Javadoc for %{name}
-Group: Documentation
-Requires: jpackage-utils
+Summary: API documentation for %{name}
+Obsoletes: %{name}-manual < %{version}-%{release}
%description javadoc
-%{summary}.
-
-%package manual
-Summary: Manual for %{name}
-Group: Documentation
-
-%description manual
-%{summary}.
+This package provides %{summary}.
%prep
-%setup -q -n BCEL_5_2
-gzip -dc %{SOURCE5} | tar xf -
-# remove all binary libs
-find . -name "*.jar" -exec rm -f {} \;
-mkdir jakarta-site2/lib
-pushd jakarta-site2/lib/
- build-jar-repository -s -p . jdom
- build-jar-repository -s -p . velocity
- build-jar-repository -s -p . commons-collections
- build-jar-repository -s -p . commons-lang
- build-jar-repository -s -p . avalon-logkit
- build-jar-repository -s -p . werken-xpath
-popd
-cp %{SOURCE6} build.xml
-%patch0 -b .sav
-
-# fix wrong-file-end-of-line-encoding
-sed -i 's/\r//' docs/verifier/V_API_SD.eps docs/eps/classloader.fig
+%setup -q
+cp -p %{SOURCE1} pom.xml
+%mvn_alias : bcel:
+%mvn_file : %{name}
%build
-#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
+%mvn_build
%install
-# inject OSGi manifests
-mkdir -p META-INF
-cp -p %{SOURCE8} META-INF/MANIFEST.MF
-touch META-INF/MANIFEST.MF
-zip -u target/%{name}-%{version}.jar META-INF/MANIFEST.MF
-
-# jars
-%{__mkdir_p} %{buildroot}%{_javadir}
-%{__install} -m 0644 target/%{name}-%{version}.jar \
- %{buildroot}%{_javadir}/%{name}.jar
-
-# pom
-%{__mkdir_p} %{buildroot}%{_mavenpomdir}
-%{__install} -m 0644 %{SOURCE7} \
- %{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}
-%{__cp} -pr dist/docs/api/* %{buildroot}%{_javadocdir}/%{name}
-%{__rm} -rf dist/docs/api
-
-# manual
-%{__mkdir_p} %{buildroot}%{_docdir}/%{name}-%{version}
-%{__cp} -pr docs/* %{buildroot}%{_docdir}/%{name}-%{version}
-%{__cp} LICENSE.txt %{buildroot}%{_docdir}/%{name}-%{version}
-%{__cp} NOTICE.txt %{buildroot}%{_docdir}/%{name}-%{version}
-
-%files
-%doc %{_docdir}/%{name}-%{version}
-%{_javadir}/%{name}.jar
-%{_mavenpomdir}/*
-%{_mavendepmapfragdir}/*
-
-%files javadoc
-%doc %{_javadocdir}/%{name}
-
-%files manual
-%doc %{_docdir}/%{name}-%{version}
+%mvn_install
+
+%files -f .mfiles
+%doc README.txt
+%doc LICENSE.txt NOTICE.txt
+
+%files javadoc -f .mfiles-javadoc
+%doc LICENSE.txt NOTICE.txt
%changelog
+* Fri Jun 14 2013 Mikolaj Izdebski - 0:5.2-16
+- Complete spec file rewrite
+- Build with Maven instead of Ant
+- Remove manual subpackage
+
* Wed Feb 13 2013 Fedora Release Engineering - 0:5.2-15
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
diff --git a/pom-maven2jpp-depcat.xsl b/pom-maven2jpp-depcat.xsl
deleted file mode 100644
index 92834cc..0000000
--- a/pom-maven2jpp-depcat.xsl
+++ /dev/null
@@ -1,109 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-ERROR
-
-
-
-
-
-
-
-
-
- JPP
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-ERROR
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-ERROR
-
-
-
-
-
- .jar
- .
-
-
- .jar
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/pom-maven2jpp-mapdeps.xsl b/pom-maven2jpp-mapdeps.xsl
deleted file mode 100644
index 566a1da..0000000
--- a/pom-maven2jpp-mapdeps.xsl
+++ /dev/null
@@ -1,74 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/pom-maven2jpp-newdepmap.xsl b/pom-maven2jpp-newdepmap.xsl
deleted file mode 100644
index 3b8dbfa..0000000
--- a/pom-maven2jpp-newdepmap.xsl
+++ /dev/null
@@ -1,23 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/sources b/sources
index a66fbdd..2d4bc00 100644
--- a/sources
+++ b/sources
@@ -1,2 +1 @@
-15c882886f67f90ee773cb526b84b4fa bcel-5.2-src.tar.gz
-2c511b30e00109b501c6f3bd757a1ce1 bcel-jakarta-site2.tar.gz
+905b7e718e30e7ca726530ecf106e532 bcel-5.2-src.tar.gz