%global namedreltag .RELEASE %global namedversion %{version}%{?namedreltag} Name: spring-uaa Version: 1.0.3 Release: 1%{?dist} Summary: Spring User Agent Analysis License: ASL 2.0 URL: http://www.vmware.com/ Source0: http://repo.grails.org/grails/core/org/springframework/uaa/org.springframework.uaa.client/%{namedversion}/org.springframework.uaa.client-%{namedversion}-sources.jar Source1: http://repo.grails.org/grails/core/org/springframework/uaa/org.springframework.uaa.root/%{namedversion}/org.springframework.uaa.root-%{namedversion}.pom Source2: http://repo.grails.org/grails/core/org/springframework/uaa/org.springframework.uaa.osgi.bundle/%{namedversion}/org.springframework.uaa.osgi.bundle-%{namedversion}.pom Source3: http://repo.grails.org/grails/core/org/springframework/uaa/org.springframework.uaa.client/%{namedversion}/org.springframework.uaa.client-%{namedversion}.pom Source4: http://www.apache.org/licenses/LICENSE-2.0.txt BuildRequires: java-devel BuildRequires: mvn(com.googlecode.json-simple:json-simple) BuildRequires: mvn(com.google.protobuf:protobuf-java) BuildRequires: mvn(org.bouncycastle:bcprov-jdk16) BuildRequires: mvn(org.bouncycastle:bcpg-jdk16) BuildRequires: mvn(org.osgi:org.osgi.compendium) BuildRequires: mvn(org.osgi:org.osgi.core) BuildRequires: mvn(junit:junit) BuildRequires: maven-local BuildArch: noarch %description Spring User Agent Analysis allows SpringSource projects to consolidate usage statistics and transmit these via the HTTP User-Agent header. %package javadoc Summary: Javadoc for %{name} %description javadoc This package contains javadoc for %{name}. %prep %setup -T -q -c # Prepare sources structures mkdir -p client/src/main/{java,resources} osgi-bundle cp -p %{SOURCE1} pom.xml cp -p %{SOURCE2} osgi-bundle/pom.xml cp -p %{SOURCE3} client/pom.xml ( cd client ( cd src/main/java %jar -xf %{SOURCE0} rm -r META-INF ) # 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 ) %pom_disable_module server # Remove org.springframework.build.aws:org.springframework.build.aws.maven:3.1.0.RELEASE %pom_xpath_remove "pom:project/pom:build/pom:extensions" %pom_remove_plugin :maven-enforcer-plugin %pom_remove_plugin :maven-gpg-plugin %pom_remove_plugin :maven-source-plugin %pom_xpath_remove "pom:project/pom:build/pom:plugins/pom:plugin[pom:artifactId='maven-bundle-plugin']/pom:configuration/pom:instructions/pom:_include" osgi-bundle %pom_remove_plugin :exec-maven-plugin osgi-bundle %pom_remove_plugin :maven-antrun-plugin osgi-bundle %pom_remove_plugin :maven-dependency-plugin osgi-bundle # Fix build deps %pom_remove_dep org.springframework.roo.wrapping: %pom_remove_dep org.springframework.roo.wrapping: client %pom_add_dep com.googlecode.json-simple:json-simple:1.1.1 client %pom_add_dep com.google.protobuf:protobuf-java:2.5.0 client %pom_add_dep org.bouncycastle:bcprov-jdk16:1.46 client %pom_add_dep org.bouncycastle:bcpg-jdk16:1.46 client cp -p %{SOURCE4} . sed -i 's/\r//' LICENSE-2.0.txt %build %mvn_file :org.springframework.uaa.client %{name}-client %mvn_build -- -Dproject.build.sourceEncoding=UTF-8 %install %mvn_install %files -f .mfiles %doc LICENSE-2.0.txt %files javadoc -f .mfiles-javadoc %doc LICENSE-2.0.txt %changelog * Sun Oct 06 2013 gil cattaneo 1.0.3-1 - initial rpm