Blob Blame History Raw
Name:          grizzly-npn
Version:       1.2
Release:       11%{?dist}
Summary:       Grizzly Next Protocol Negotiation API
License:       CDDL or GPLv2 with exceptions
URL:           https://grizzly.java.net/spdy.html
# git clone git://java.net/grizzly~npn
# (cd grizzly~npn && git archive --format=tar --prefix=grizzly-npn-1.2/ 1_2 | xz > ../grizzly-npn-1.2.tar.xz)
Source0:       %{name}-%{version}.tar.xz
# https://java.net/jira/browse/GRIZZLY-1770
# wget -O glassfish-LICENSE.txt https://svn.java.net/svn/glassfish~svn/tags/legal-1.1/src/main/resources/META-INF/LICENSE.txt
# grizzly-npn-api package don't include the license file
Source1:       glassfish-LICENSE.txt

BuildRequires: maven-local
BuildRequires: mvn(net.java:jvnet-parent:pom:)
BuildRequires: mvn(org.apache.felix:maven-bundle-plugin)
BuildRequires: mvn(org.apache.maven.plugins:maven-enforcer-plugin)
BuildRequires: mvn(org.osgi:osgi.cmpn)
BuildRequires: mvn(org.osgi:osgi.core)

BuildArch:     noarch

%description
A pure Java implementation of the
Next Protocol Negotiation TLS Extension
for OpenJDK 7 or greater.

NPN allows the application layer to
negotiate which protocol to use over the
secure connection.

%package bootstrap
Summary:       Grizzly NPN Bootstrap

%description bootstrap
This package contains the JAR that
will be placed on the bootclasspath
in order for NPN to work.

%package osgi
Summary:       Grizzly NPN OSGi

%description osgi
This empty module allows the bootclasspath classes in
org.glassfish.grizzly.npn to be available via the
OSGi classloading mechanisms.

Using GlassFish as an example:
- grizzly-npn-bootstrap.jar goes into the
  domain's bootclasspath (-Xbootclasspath/p:[PATH TO THE JAR])
- grizzly-npn-osgi and grizzly-spdy JARs go into the
  [PATH TO THE GlassFish 4 HOME]/modules directory.
 
%package javadoc
Summary:       Javadoc for %{name}

%description javadoc
This package contains javadoc for %{name}.

%prep
%setup -q

cp -p %{SOURCE1} LICENSE.txt

sed -i "s,59 Temple Place,51 Franklin Street,;s,Suite 330,Fifth Floor,;s,02111-1307,02110-1301,"  $(find -name "*.java") LICENSE.txt

sed -i 's/\r//' LICENSE.txt

mkdir -p osgi/target/classes/META-INF
touch osgi/target/classes/META-INF/MANIFEST.MF

# use jvm jsse
rm -r bootstrap/src/main/java/sun/security/ssl/Alerts.java \
 bootstrap/src/main/java/sun/security/ssl/ClientHandshaker.java \
 bootstrap/src/main/java/sun/security/ssl/ExtensionType.java \
 bootstrap/src/main/java/sun/security/ssl/Handshaker.java \
 bootstrap/src/main/java/sun/security/ssl/HandshakeMessage.java \
 bootstrap/src/main/java/sun/security/ssl/HelloExtensions.java \
 bootstrap/src/main/java/sun/security/ssl/ServerHandshaker.java \
 bootstrap/src/main/java/sun/security/ssl/SSLEngineImpl.java

# use latest OSGi implementation
%pom_change_dep -r :org.osgi.core org.osgi:osgi.core
%pom_change_dep -r :org.osgi.compendium org.osgi:osgi.cmpn

%pom_xpath_remove "pom:plugin[pom:artifactId = 'maven-bundle-plugin']/pom:configuration/pom:instructions/pom:Export-Package" bootstrap
%pom_xpath_inject "pom:plugin[pom:artifactId = 'maven-bundle-plugin']/pom:configuration/pom:instructions" "
<Export-Package>
    sun.security.ssl
</Export-Package>
<Import-Package>
    org.glassfish.grizzly.npn
</Import-Package>" bootstrap

%mvn_package :%{name} %{name}
%mvn_package :%{name}-api %{name}

%build

%mvn_build -s

%install
%mvn_install

%files -f .mfiles-%{name}
%license LICENSE.txt

%files bootstrap -f .mfiles-%{name}-bootstrap
%license LICENSE.txt

%files osgi -f .mfiles-%{name}-osgi
%license LICENSE.txt

%files javadoc -f .mfiles-javadoc
%license LICENSE.txt

%changelog
* Sat Oct 05 2019 Fabio Valentini <decathorpe@gmail.com> - 1.2-11
- Migrate away from the retired felix OSGi implementation.

* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.2-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild

* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.2-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild

* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.2-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.2-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.2-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.2-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.2-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Fri Aug 07 2015 gil cattaneo <puntogil@libero.it> 1.2-3
- workaround for new maven-bundle-plugin

* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Wed Apr 08 2015 gil cattaneo <puntogil@libero.it> 1.2-1
- update to 1.2

* Wed Apr 08 2015 gil cattaneo <puntogil@libero.it> 1.0-1
- initial rpm