%global oname io-thrift Name: twitter-common-io-thrift Version: 0.0.61 Release: 1%{?dist} Summary: Twitter Common IO Thrift License: ASL 2.0 URL: https://github.com/twitter/commons Source0: http://repo.typesafe.com/typesafe/releases/com/twitter/common/%{oname}/%{version}/%{oname}-%{version}-sources.jar Source1: http://repo.typesafe.com/typesafe/releases/com/twitter/common/%{oname}/%{version}/%{oname}-%{version}.pom Source2: http://www.apache.org/licenses/LICENSE-2.0.txt BuildRequires: maven-local BuildRequires: mvn(com.google.code.findbugs:jsr305) BuildRequires: mvn(com.google.guava:guava) BuildRequires: mvn(com.twitter.common:base) BuildRequires: mvn(com.twitter.common:io) BuildRequires: mvn(commons-lang:commons-lang) BuildRequires: mvn(org.apache.thrift:libthrift) BuildRequires: mvn(org.slf4j:slf4j-api) BuildRequires: mvn(org.slf4j:slf4j-jdk14) BuildArch: noarch %description Twitter Common IO Thrift. %package javadoc Summary: Javadoc for %{name} %description javadoc This package contains javadoc for %{name}. %prep %setup -T -q -c mkdir -p src/main/{java,resources} ( cd src/main/java %jar -xf %{SOURCE0} rm -rf META-INF ) cp -p %{SOURCE1} pom.xml # clone source directory structure find src/main/java/ -type d | while read dirname ; do newdirname=`echo $dirname | sed "s:src/main/java:src/main/resources:g"` mkdir -p $newdirname done # copy everything except *.java sources find src/main/java/ -type f | grep -v "\.java" | while read cpfrom ; do cpto=`echo $cpfrom | sed "s:src/main/java:src/main/resources:g"` cp $cpfrom $cpto done cp -p %{SOURCE2} LICENSE sed -i 's/\r//' LICENSE %mvn_file : %{oname} %build %mvn_build -- -Dproject.build.sourceEncoding=UTF-8 %install %mvn_install %files -f .mfiles %license LICENSE %files javadoc -f .mfiles-javadoc %license LICENSE %changelog * Thu Mar 12 2015 gil cattaneo 0.0.61-1 - initial rpm