Name: jetty-npn Version: 1.1.5.v20130313 Release: 1%{?dist} Summary: Jetty :: Next Protocol Negotiation Group: Development/Libraries License: ASL 2.0 and EPL and (CDDL or GPLv2 with exceptions) URL: http://wiki.eclipse.org/Jetty/Feature/NPN # git clone git://github.com/jetty-project/jetty-npn.git jetty-npn-1.1.5.v20130313 # (cd jetty-npn-1.1.5.v20130313/ && git archive --format=tar --prefix=jetty-npn-1.1.5.v20130313/ npn-project-1.1.5.v20130313 | xz > ../jetty-npn-1.1.5.v20130313.tar.xz) Source0: %{name}-%{version}.tar.xz Source1: http://www.apache.org/licenses/LICENSE-2.0.txt Patch0: %{name}-1.1.5.v20130313-fix-incorrect-fsf-address.patch BuildRequires: java-devel BuildRequires: jpackage-utils BuildRequires: jetty-parent BuildRequires: jetty-npn-api # test deps BuildRequires: junit BuildRequires: maven-local BuildRequires: maven-compiler-plugin BuildRequires: maven-enforcer-plugin BuildRequires: maven-jar-plugin BuildRequires: maven-javadoc-plugin BuildRequires: maven-plugin-build-helper BuildRequires: maven-plugin-bundle BuildRequires: maven-resources-plugin # BuildRequires: maven-shade-plugin BuildRequires: maven-surefire-plugin BuildRequires: maven-surefire-provider-junit4 Requires: jetty-npn-api Requires: java Requires: jpackage-utils BuildArch: noarch %description A pure Java(TM) implementation of the Next Protocol Negotiation TLS Extension. %package javadoc Group: Documentation Summary: Javadoc for %{name} Requires: jpackage-utils %description javadoc This package contains javadoc for %{name}. %prep %setup -q %patch0 -p0 # disable jetty-npn-api embedded copy and fix tests %pom_xpath_remove "pom:build/pom:plugins/pom:plugin[pom:artifactId = 'maven-bundle-plugin']/pom:executions/pom:execution/pom:configuration/pom:instructions/pom:Export-Package" npn-boot %pom_xpath_inject "pom:build/pom:plugins/pom:plugin[pom:artifactId = 'maven-bundle-plugin']/pom:executions/pom:execution/pom:configuration/pom:instructions" 'sun.security.ssl;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}"' npn-boot %pom_xpath_remove "pom:build/pom:plugins/pom:plugin[pom:artifactId = 'maven-bundle-plugin']/pom:executions/pom:execution/pom:configuration/pom:instructions/pom:Import-Package" npn-boot %pom_xpath_inject "pom:build/pom:plugins/pom:plugin[pom:artifactId = 'maven-bundle-plugin']/pom:executions/pom:execution/pom:configuration/pom:instructions" "!sun.*,org.eclipse.jetty.npn" npn-boot %pom_remove_plugin :maven-shade-plugin npn-boot %pom_xpath_remove "pom:build/pom:plugins/pom:plugin[pom:artifactId = 'maven-surefire-plugin']/pom:configuration/pom:argLine" npn-tests %pom_xpath_inject "pom:build/pom:plugins/pom:plugin[pom:artifactId = 'maven-surefire-plugin']/pom:configuration" '-Xbootclasspath/p:${basedir}/../${boot-artifactId}/target/${boot-artifactId}-${project.version}.jar:%{_javadir}/jetty-npn-api.jar' npn-tests cp -p %{SOURCE1} . sed -i 's/\r//' LICENSE-2.0.txt %build mvn-rpmbuild package javadoc:aggregate %install mkdir -p %{buildroot}%{_mavenpomdir} install -pm 644 pom.xml %{buildroot}%{_mavenpomdir}/JPP-%{name}-project.pom %add_maven_depmap JPP-%{name}-project.pom mkdir -p %{buildroot}%{_javadir} for m in boot tests; do install -m 644 npn-${m}/target/npn-${m}-%{version}.jar %{buildroot}%{_javadir}/%{name}-${m}.jar install -pm 644 npn-${m}/pom.xml %{buildroot}%{_mavenpomdir}/JPP-%{name}-${m}.pom %add_maven_depmap JPP-%{name}-${m}.pom %{name}-${m}.jar done mkdir -p %{buildroot}%{_javadocdir}/%{name} cp -pr target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name} %files %{_javadir}/%{name}-*.jar %{_mavenpomdir}/JPP-%{name}-*.pom %{_mavendepmapfragdir}/%{name} %doc LICENSE LICENSE-2.0.txt README.md %files javadoc %{_javadocdir}/%{name} %doc LICENSE LICENSE-2.0.txt %changelog * Fri Apr 12 2013 gil cattaneo 1.1.5.v20130313-1 - initial rpm