%global namedreltag .BETA2 %global namedversion %{version}%{?namedreltag} Name: attoparser Version: 2.0.0 Release: 0.1.BETA2%{?dist} Summary: Java parser for XML and HTML markup License: ASL 2.0 URL: http://www.attoparser.org/ Source0: https://github.com/attoparser/attoparser/archive/%{name}-%{namedversion}.tar.gz BuildRequires: maven-local BuildRequires: mvn(junit:junit) BuildRequires: mvn(org.apache.commons:commons-io) BuildRequires: mvn(org.apache.commons:commons-lang3) BuildRequires: mvn(org.apache.felix:maven-bundle-plugin) BuildArch: noarch %description attoparser is a Java parser for XML and HTML markup. It is a SAX-style event-based parser though it does not implement the SAX standard but it can also act as a DOM-style parser. %package javadoc Summary: Javadoc for %{name} %description javadoc This package contains javadoc for %{name}. %prep %setup -q -n %{name}-%{name}-%{namedversion} find -name "*.class" -delete find -name "*.jar" -print -delete rm -r src/site %pom_remove_plugin :maven-gpg-plugin %pom_remove_plugin :maven-source-plugin %pom_remove_plugin :maven-assembly-plugin %pom_remove_plugin :maven-site-plugin %pom_xpath_set "pom:properties/pom:maven.compile.source" 1.6 %pom_xpath_set "pom:properties/pom:maven.compile.target" 1.6 %pom_xpath_remove "pom:build/pom:plugins/pom:plugin[pom:artifactId = 'maven-javadoc-plugin']/pom:executions" %pom_xpath_remove "pom:build/pom:plugins/pom:plugin[pom:artifactId = 'maven-javadoc-plugin']/pom:configuration/pom:reportOutputDirectory" # Default is US-ASCII %pom_xpath_set "pom:build/pom:plugins/pom:plugin[pom:artifactId = 'maven-compiler-plugin']/pom:configuration/pom:encoding" UTF-8 %pom_xpath_set "pom:build/pom:plugins/pom:plugin[pom:artifactId = 'maven-resources-plugin']/pom:configuration/pom:encoding" UTF-8 chmod 644 ChangeLog.txt LICENSE.txt NOTICE.txt README.txt USAGE.txt %mvn_file : %{name} %build %mvn_build %install %mvn_install %files -f .mfiles %doc CONTRIBUTING.markdown ChangeLog.txt README.txt USAGE.txt %license LICENSE.txt NOTICE.txt %files javadoc -f .mfiles-javadoc %license LICENSE.txt NOTICE.txt %changelog * Thu Mar 19 2015 gil cattaneo 2.0.0-0.1.BETA2 - initial rpm