Name: ezmorph Version: 1.0.6 Release: 2%{?dist} Summary: Object transformation library for Java Group: Development/Libraries License: ASL 2.0 URL: http://ezmorph.sourceforge.net/ # A plain jarball with the source is provided by upstream. We could use # it, but we choose to build with maven for the sake of consistency. # Therefore we pull the tree with maven metadata from VCS. # cvs -d:pserver:anonymous@ezmorph.cvs.sourceforge.net:/cvsroot/ezmorph login # cvs -z3 -d:pserver:anonymous@ezmorph.cvs.sourceforge.net:/cvsroot/ezmorph co -r REL_1_0_6 -d ezmorph-1.0.6 -P ezmorph # tar czf ezmorph-1.0.6.tar.gz --exclude CVS ezmorph-1.0.6 Source0: %{name}-%{version}.tar.gz Patch0: ezmorph-1.0.6-maven.patch BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) BuildRequires: java-devel BuildRequires: jpackage-utils BuildRequires: jakarta-oro BuildRequires: junit4 BuildRequires: maven2-plugin-compiler BuildRequires: maven2-plugin-install BuildRequires: maven2-plugin-jar BuildRequires: maven2-plugin-javadoc BuildRequires: maven2-plugin-resources BuildRequires: maven-doxia-sitetools BuildRequires: maven-surefire-maven-plugin BuildRequires: maven-surefire-provider-junit Requires: java Requires: jpackage-utils Requires(post): jpackage-utils Requires(postun): jpackage-utils BuildArch: noarch %description EZMorph is simple java library for transforming an Object to another Object. It supports transformations for primitives and Objects and multidimensional arrays. %package javadoc Group: Documentation Summary: Javadoc for %{name} Requires: %{name} = %{version} %description javadoc API documentation for %{name}. %prep %setup -q %patch0 -p1 -b .maven %build export MAVEN_REPO_LOCAL=$PWD/.m2/repository mkdir -p $MAVEN_REPO_LOCAL mvn-jpp -Dmaven.repo.local=$MAVEN_REPO_LOCAL \ install javadoc:javadoc %install rm -rf $RPM_BUILD_ROOT # Code install -d $RPM_BUILD_ROOT%{_javadir} # Bad version number, likely a typo install -m644 target/%{name}-1.0.5.jar \ $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar ln -sf %{name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar # Documentation install -d $RPM_BUILD_ROOT%{_javadocdir} cp -ap target/site/apidocs $RPM_BUILD_ROOT%{_javadocdir}/%{name} # Maven install -d -m 755 $RPM_BUILD_ROOT%{_mavenpomdir} install -pm 644 pom.xml $RPM_BUILD_ROOT/%{_mavenpomdir}/JPP-%{name}.pom %add_to_maven_depmap net.sf.ezmorph %{name} %{version} JPP %{name} %clean rm -rf $RPM_BUILD_ROOT %post %update_maven_depmap %postun %update_maven_depmap %files %defattr(-,root,root,-) %{_javadir}/* %{_mavendepmapfragdir}/* %{_mavenpomdir}/* %files javadoc %defattr(-,root,root,-) %{_javadocdir}/* %changelog * Thu Jun 17 2010 Lubomir Rintel <lkundrak@v3.sk> - 1.0.6-2 - Carry the build over to Maven - Package Maven poms & add depmap - Add javadoc subpackage * Thu May 20 2010 Lubomir Rintel <lkundrak@v3.sk> - 1.0.6-1 - Initial packaging