%global commit 4eb81fee1f807cb97bf8fb39d23652c947561bf2 %global shortcommit %(c=%{commit}; echo ${c:0:7}) Name: okhttp Version: 1.2.1 Release: 1%{?dist} Summary: An HTTP+SPDY client for Java applications License: ASL 2.0 URL: http://square.github.io/%{name}/ Source0: https://github.com/square/%{name}/archive/%{commit}/%{name}-%{version}-%{shortcommit}.tar.gz BuildArch: noarch BuildRequires: maven-local BuildRequires: mvn(com.google.code.gson:gson) BuildRequires: mvn(org.apache.maven.plugins:maven-checkstyle-plugin) BuildRequires: mvn(org.sonatype.oss:oss-parent) %description An HTTP+SPDY client for Android and Java applications. %package javadoc Summary: Javadoc for %{name} %description javadoc API documentation for %{name}. %package protocols Summary: OkHttp SPDY and HTTP/2.0 internals %description protocols %{summary}. %package parent Summary: Parent POM for OkHttp %description parent %{summary}. %package apache Summary: OkHttp Apache HttpClient %description apache %{summary}. %package samples Summary: OkHttp Samples (Parent) %description samples %{summary}. %package samples-guide Summary: OkHttp Sample: Guide %description samples-guide %{summary}. %package samples-simple-client Summary: OkHttp Sample: Simple Client %description samples-simple-client %{summary}. %prep %setup -q -n %{name}-%{commit} # Plugin prevents build %pom_remove_plugin org.codehaus.mojo:animal-sniffer-maven-plugin %pom_disable_module mockwebserver %pom_remove_dep org.mortbay.jetty.npn:npn-boot okhttp %pom_remove_dep org.mortbay.jetty.npn:npn-boot okhttp-protocols %build # We don't have all test deps (e.g. npn-boot) %mvn_build -s --skip-tests %install %mvn_install %files protocols -f .mfiles-%{name}-protocols %dir %{_javadir}/%{name} %doc LICENSE.txt CHANGELOG.md CONTRIBUTING.md README.md %files javadoc -f .mfiles-javadoc %doc LICENSE.txt %files parent -f .mfiles-parent %doc LICENSE.txt %files -f .mfiles-%{name} %files apache -f .mfiles-%{name}-apache %files samples -f .mfiles-sample-parent %files samples-guide -f .mfiles-guide %files samples-simple-client -f .mfiles-simple-client %changelog * Sat Nov 23 2013 Gerard Ryan - 1.2.1-1 - Initial rpm