%global base_name dbutils %global short_name commons-%{base_name} Name: apache-%{short_name} Version: 1.3 Release: 2%{?dist} Summary: Apache Commons DbUtils Package Group: Development/Libraries License: ASL 2.0 URL: http://commons.apache.org/%{base_name}/ Source0: http://www.apache.org/dist/commons/%{base_name}/source/%{short_name}-%{version}-src.tar.gz BuildArch: noarch BuildRequires: java-devel >= 1:1.6.0 BuildRequires: jpackage-utils BuildRequires: apache-commons-parent Requires: java >= 1:1.6.0 Requires: jpackage-utils Requires(post): jpackage-utils Requires(postun): jpackage-utils %description DbUtils is a small set of classes designed to make working with JDBC easier. JDBC resource cleanup code is mundane, error prone work so these classes abstract out all of the cleanup tasks from your code leaving you with what you really wanted to do with JDBC in the first place: query and update data. %package javadoc Summary: Javadoc for %{name} Group: Documentation Requires: jpackage-utils %description javadoc This package contains the API documentation for %{name}. %prep %setup -q -n %{short_name}-%{version}-src sed -i 's/\r//' *.txt %build mvn-rpmbuild install javadoc:aggregate %install # jars install -d -m 0755 %{buildroot}%{_javadir} install -m 644 target/%{short_name}-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar ln -sf %{name}.jar %{buildroot}%{_javadir}/%{short_name}.jar # poms install -d -m 0755 %{buildroot}%{_mavenpomdir} install -pm 644 pom.xml %{buildroot}%{_mavenpomdir}/JPP-%{short_name}.pom %add_to_maven_depmap commons-dbutils %{short_name} %{version} JPP %{short_name} # javadoc install -d -m 0755 %{buildroot}%{_javadocdir}/%{name} cp -pr target/site/api*/* %{buildroot}%{_javadocdir}/%{name} %post %update_maven_depmap %postun %update_maven_depmap %files %doc LICENSE.txt RELEASE-NOTES.txt NOTICE.txt %{_javadir}/* %{_mavenpomdir}/JPP-%{short_name}.pom %{_mavendepmapfragdir}/* %files javadoc %doc LICENSE.txt NOTICE.txt %doc %{_javadocdir}/%{name} %changelog * Thu May 12 2011 Chris Spike 1.3-2 - Removed defattr macros - Fixed groupId * Fri Apr 22 2011 Chris Spike 1.3-1 - Initial version of the package