%global githash 5ce359e %global dirhash a691a35 Name: async-http-client Version: 1.4.1 Release: 2%{?dist} Summary: Asynchronous Http Client for Java Group: Development/Libraries License: ASL 2.0 URL: https://github.com/AsyncHttpClient/%{name} # it seems github has redirects plus it generates tarball on the fly # to get tarball go to https://github.com/AsyncHttpClient/async-http-client/archives/async-http-client-1.4.1 # click "downloads" in upper right corner # click "download .tar.gz" Source0: AsyncHttpClient-%{name}-%{name}-%{version}-0-g%{githash}.tar.gz Patch0: 0001-Remove-test-dependencies.patch BuildArch: noarch BuildRequires: maven BuildRequires: maven-compiler-plugin BuildRequires: maven-shade-plugin BuildRequires: maven-install-plugin BuildRequires: maven-jar-plugin BuildRequires: maven-javadoc-plugin BuildRequires: maven-resources-plugin BuildRequires: maven-site-plugin BuildRequires: maven-surefire-plugin BuildRequires: maven-surefire-provider-junit4 BuildRequires: maven-release-plugin BuildRequires: sonatype-oss-parent BuildRequires: netty Requires: netty Requires: java >= 1:1.6.0 Requires(post): jpackage-utils Requires(postun): jpackage-utils %description Async Http Client library purpose is to allow Java applications to easily execute HTTP requests and asynchronously process the HTTP responses. The Async HTTP Client library is simple to use. %package javadoc Summary: API documentation for %{name} Group: Documentation Requires: jpackage-utils %description javadoc %{summary}. %prep # last part will have to change every time %setup -q -n AsyncHttpClient-%{name}-%{dirhash} %patch0 -p1 %build # we don't have all test dependencies available so disable tests mvn-local -e \ -Dmaven.test.skip=true \ install javadoc:aggregate %install install -d -m 755 %{buildroot}%{_javadir}/ install -d -m 755 %{buildroot}%{_mavenpomdir} install -m 644 target/%{name}-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar install -pm 644 pom.xml %{buildroot}/%{_mavenpomdir}/JPP-%{name}.pom %add_to_maven_depmap com.ning %{name} %{version} JPP %{name} install -d -m 755 %{buildroot}%{_javadocdir}/%{name} cp -pr target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name} %post %update_maven_depmap %postun %update_maven_depmap %files %defattr(-,root,root,-) %doc README changelog.html LICENSE-2.0.txt %{_javadir}/%{name}.jar %{_mavendepmapfragdir}/%{name} %{_mavenpomdir}/JPP-%{name}.pom %files javadoc %defattr(-,root,root,-) %doc LICENSE-2.0.txt %{_javadocdir}/%{name} %changelog * Wed Jan 26 2011 Stanislav Ochotnicky - 1.4.1-2 - Add maven-shade-plugin to BR * Mon Jan 17 2011 Stanislav Ochotnicky - 1.4.1-1 - Initial version