%global oname com.zwitserloot.cmdreader Name: zwitserloot-cmdreader Version: 1.5 Release: 1%{?dist} Summary: Command Line option reading in Java License: MIT URL: http://github.com/rzwitserloot/com.zwitserloot.cmdreader Source0: https://github.com/rzwitserloot/com.zwitserloot.cmdreader/archive/%{version}.tar.gz # Disable ivyplusplus support # Use system libraries # Set source/target/encoding options in java{c,doc} tasks Patch0: zwitserloot-cmdreader-1.5-buildfix.patch BuildRequires: ant BuildRequires: ant-junit BuildRequires: aqute-bnd %if %{?fedora} >= 21 BuildRequires: hamcrest-core BuildRequires: javapackages-local %else BuildRequires: maven-local %endif BuildRequires: junit BuildArch: noarch %description Define the structure of your command line options as fields in a class, annotate these fields with further meta-data about the command line switch, and CmdReader will take care of the rest. Command line parsing for java. %package javadoc Summary: Javadoc for %{name} %description javadoc This package contains javadoc for %{name}. %prep %setup -q -n %{oname}-%{version} # Cleanup find -name "*.class" -print -delete find -name "*.jar" -print -delete %patch0 -p0 %build ant compile javadoc # Generate OSGi manifest %java -jar $(build-classpath aqute-bnd) wrap lib/build/cmdreader.jar mv lib/build/cmdreader.bar lib/build/cmdreader.jar %install # Add maven metadata %mvn_artifact com.zwitserloot:cmdreader:%{version} lib/build/cmdreader.jar %mvn_file com.zwitserloot:cmdreader:%{version} %{name} %mvn_install -J doc/api %check ant test %files -f .mfiles %doc README.markdown %license LICENSE %files javadoc -f .mfiles-javadoc %license LICENSE %changelog * Tue Jun 02 2015 gil cattaneo 1.5-1 - initial rpm