%global project sling %global bundle org.apache.sling.api Name: sling-api Version: 2.4.2 Release: 1%{?dist} Summary: Apache Sling API License: ASL 2.0 URL: http://sling.apache.org Source0: http://www.apache.org/dist/sling/%{bundle}-%{version}-source-release.zip BuildRequires: java-devel BuildRequires: mvn(biz.aQute:bndlib) BuildRequires: mvn(javax.servlet:servlet-api) BuildRequires: mvn(org.apache.sling:sling) BuildRequires: mvn(org.slf4j:slf4j-api) # test deps BuildRequires: mvn(junit:junit) BuildRequires: mvn(org.jmock:jmock-junit4) # Circular deps %if 0 BuildRequires: mvn(org.apache.sling:org.apache.sling.commons.testing) %endif BuildRequires: maven-local BuildArch: noarch %description The Apache Sling API defines an extension to the Servlet API 2.4 to provide access to content and unified access to request parameters hiding the differences between the different methods of transferring parameters from client to server. Note that the Apache Sling API bundle does not include the Servlet API but instead requires the API to be provided by the Servlet container in which the Apache Sling framework is running or by another bundle. %package javadoc Summary: Javadoc for %{name} %description javadoc This package contains javadoc for %{name}. %prep %setup -q -n %{bundle}-%{version} %pom_xpath_inject "pom:project/pom:dependencies/pom:dependency[pom:artifactId='junit']" "test" %pom_xpath_inject "pom:project/pom:dependencies/pom:dependency[pom:artifactId='jmock-junit4']" "test" %pom_remove_dep org.apache.sling:org.apache.sling.commons.testing rm -r src/test/java/org/apache/sling/api/request/RequestUtilTest.java %mvn_file :%{bundle} %{project}/%{bundle} %build %mvn_build %install %mvn_install %files -f .mfiles %dir %{_javadir}/%{project} %doc LICENSE NOTICE README.txt %files javadoc -f .mfiles-javadoc %doc LICENSE NOTICE %changelog * Fri Jun 28 2013 gil cattaneo 2.4.2-1 - initial rpm