Name: foundrylogic-vpp Version: 2.2.1 Release: 1%{?dist} Summary: Velocity Preprocessor License: BSD URL: http://vpp.sourceforge.net/ Source0: http://downloads.sourceforge.net/vpp/%{name}-%{version}.tar.gz # custom pom file Source1: %{name}-%{version}.pom # use system libraries # disable embedded velocity copy Patch0: %{name}-%{version}-build.patch BuildRequires: ant BuildRequires: apache-commons-collections BuildRequires: javapackages-local BuildRequires: velocity BuildArch: noarch %description The purpose of this project is to provide an Ant-based CPP-like pre-processing capability using the Velocity Template Engine. %package javadoc Summary: Javadoc for %{name} %description javadoc This package contains javadoc for %{name}. %package manual Summary: Manual for %{name} Requires: %{name}-javadoc = %{version}-%{release} %description manual This package contains manual for %{name}. %prep %setup -q -c %{name}-%{version} # clean up find . -name "*.class" -delete find . -name "*.jar" -delete rm -r doc/api %patch0 -p0 # fix wrong-file-end-of-line-encoding sed -i 's/\r//' README doc/LICENSE doc/CHANGES %mvn_file foundrylogic.vpp:vpp %{name} %build %ant optimize jar javadoc %install %mvn_artifact %{SOURCE1} %{name}-%{version}.jar %mvn_install -J doc/api rm -rf doc/api sed -i "s|../api/index.html|%{_javadocdir}/%{name}/index.html|" doc/manual/toc.html mkdir -p %{buildroot}%{_sysconfdir}/ant.d echo "ant commons-collections %{name} velocity" > %{name} install -p -m 644 %{name} %{buildroot}%{_sysconfdir}/ant.d/%{name} %files -f .mfiles %config(noreplace) %{_sysconfdir}/ant.d/%{name} %doc README %license doc/LICENSE %files javadoc -f .mfiles-javadoc %license doc/LICENSE %files manual %doc doc/manual doc/CHANGES doc/*.html %license doc/LICENSE %changelog * Thu Nov 29 2012 gil cattaneo 2.2.1-1 - initial rpm