Name: vtd-xml Version: 2.12 Release: 1%{?dist} Summary: Java XML processing model for SOA and Cloud Computing # Files with license problems (incorrect fsf address, # files without license headers) # https://sourceforge.net/p/vtd-xml/tickets/5/ License: GPLv2+ # http://ximpleware.com/ URL: http://vtd-xml.sourceforge.net/ # https://github.com/dryade/vtd-xml/ Source0: http://downloads.sourceforge.net/vtd-xml/ximpleware-%{version}-java.zip BuildRequires: java-devel BuildRequires: java_cup BuildRequires: javapackages-local BuildArch: noarch %description VTD-XML is the next generation XML parser, indexer, editor, slicer, assembler, XPATH engine that goes beyond DOM, SAX and PULL in performance, memory usage, and ease of use. %package javadoc Summary: Javadoc for %{name} %description javadoc This package contains javadoc for %{name}. %prep %setup -q -n ximpleware-%{version}-java # Cleanup find -name "*.jar" -delete find -name "*.class" -delete mv examples/buffer\ reuse examples/buffer_reuse mv examples/SOAP\ processing examples/SOAP_processing mv Changes\ from\ version\ 2.11 Changes_from_version_2.11 mv xpath\ release\ notes.txt xpath_release_notes.txt rm -rf $(find -name "CVS") # Use system library rm -r java_cup/ # Prepare build structure mkdir -p docs classes src mv com src/ # Add custom mvn pom cat > pom.xml << EOF 4.0.0 com.ximpleware %{name} %{version} jar %{name} XimpleWare's VTD-XML is, far and away, the industry's most advanced and powerful XML processing model for SOA and Cloud Computing %{url} GNU GENERAL PUBLIC LICENSE Version 2, June 1991 http://www.gnu.org/licenses/old-licenses/gpl-2.0 repo java_cup java_cup 0.11b EOF # Convert from dos to unix line ending for file in Readme.txt Usersguide.txt Changes* xpath*.txt; do sed -i.orig 's|\r||g' $file touch -r $file.orig $file rm $file.orig done %mvn_file com.ximpleware:%{name} %{name} %build %javac -d classes -source 1.6 -target 1.6 -cp $(build-classpath java_cup) $(find src -name "*.java") ( cd classes %jar -cf ../%{name}.jar * ) %javadoc -source 1.6 -Xdoclint:none -classpath $(build-classpath java_cup):classes -d docs $(find src -name "*.java") %install %mvn_artifact pom.xml %{name}.jar %mvn_install -J docs %files -f .mfiles %doc Readme.txt Usersguide.txt Changes* xpath*.txt %license License.txt %files javadoc -f .mfiles-javadoc %license License.txt %changelog * Sat Apr 09 2016 gil cattaneo 2.12-1 - initial rpm