%global namedreltag .20120312gitd4b6f2 %global namedversion %{version}%{?namedreltag} Name: jboss-servlet-3.0-api Version: 1.0.1 Release: 0.1%{namedreltag}%{dist} Summary: Java Servlet 3.0 API Group: Development/Libraries License: CDDL Url: http://www.jboss.org # git clone git://github.com/jboss/jboss-servlet-api_spec.git # cd jboss-servlet-api_spec/ && git archive --format=tar --prefix=jboss-servlet-3.0-api/ d4b6f2c02fb07100c725ac7b81b5116339442b9b | xz > jboss-servlet-3.0-api-1.0.1.20120312gitd4b6f2.tar.xz Source0: jboss-servlet-3.0-api-%{namedversion}.tar.xz BuildRequires: java-devel BuildRequires: jboss-specs-parent BuildRequires: jpackage-utils BuildRequires: maven BuildRequires: maven-compiler-plugin BuildRequires: maven-install-plugin BuildRequires: maven-jar-plugin BuildRequires: maven-javadoc-plugin Requires: jpackage-utils Requires: java BuildArch: noarch %description The Java Servlet 3.0 API classes. %package javadoc Summary: Javadocs for %{name} Group: Development/Libraries Requires: jpackage-utils %description javadoc This package contains the API documentation for %{name}. %prep %setup -q -n jboss-servlet-3.0-api %build mvn-rpmbuild install javadoc:aggregate %install install -d -m 755 $RPM_BUILD_ROOT%{_javadir} install -d -m 755 $RPM_BUILD_ROOT%{_mavenpomdir} install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name} # JAR install -pm 644 target/jboss-servlet-api_3.0_spec-%{version}-SNAPSHOT.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar # POM install -pm 644 pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP-%{name}.pom # DEPMAP %add_maven_depmap JPP-%{name}.pom %{name}.jar # APIDOCS cp -rp target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name} %files %{_javadir}/%{name}.jar %{_mavenpomdir}/* %{_mavendepmapfragdir}/* %doc LICENSE README %files javadoc %{_javadocdir}/%{name} %doc LICENSE README %changelog * Thu Aug 11 2011 Marek Goldmann 1.0.1-0.1.20120312gitd4b6f2 - Packaging after license cleanup - Spec cleanup * Thu Aug 11 2011 Marek Goldmann 1.0.0-1 - Initial packaging