022f2fc
Name:          grizzly-npn
022f2fc
Version:       1.2
5d73894
Release:       11%{?dist}
022f2fc
Summary:       Grizzly Next Protocol Negotiation API
022f2fc
License:       CDDL or GPLv2 with exceptions
022f2fc
URL:           https://grizzly.java.net/spdy.html
022f2fc
# git clone git://java.net/grizzly~npn
022f2fc
# (cd grizzly~npn && git archive --format=tar --prefix=grizzly-npn-1.2/ 1_2 | xz > ../grizzly-npn-1.2.tar.xz)
022f2fc
Source0:       %{name}-%{version}.tar.xz
022f2fc
# https://java.net/jira/browse/GRIZZLY-1770
022f2fc
# wget -O glassfish-LICENSE.txt https://svn.java.net/svn/glassfish~svn/tags/legal-1.1/src/main/resources/META-INF/LICENSE.txt
022f2fc
# grizzly-npn-api package don't include the license file
022f2fc
Source1:       glassfish-LICENSE.txt
022f2fc
022f2fc
BuildRequires: maven-local
022f2fc
BuildRequires: mvn(net.java:jvnet-parent:pom:)
022f2fc
BuildRequires: mvn(org.apache.felix:maven-bundle-plugin)
022f2fc
BuildRequires: mvn(org.apache.maven.plugins:maven-enforcer-plugin)
5d73894
BuildRequires: mvn(org.osgi:osgi.cmpn)
5d73894
BuildRequires: mvn(org.osgi:osgi.core)
022f2fc
022f2fc
BuildArch:     noarch
022f2fc
022f2fc
%description
022f2fc
A pure Java implementation of the
022f2fc
Next Protocol Negotiation TLS Extension
022f2fc
for OpenJDK 7 or greater.
022f2fc
022f2fc
NPN allows the application layer to
022f2fc
negotiate which protocol to use over the
022f2fc
secure connection.
022f2fc
022f2fc
%package bootstrap
022f2fc
Summary:       Grizzly NPN Bootstrap
022f2fc
022f2fc
%description bootstrap
022f2fc
This package contains the JAR that
022f2fc
will be placed on the bootclasspath
022f2fc
in order for NPN to work.
022f2fc
022f2fc
%package osgi
022f2fc
Summary:       Grizzly NPN OSGi
022f2fc
022f2fc
%description osgi
022f2fc
This empty module allows the bootclasspath classes in
022f2fc
org.glassfish.grizzly.npn to be available via the
022f2fc
OSGi classloading mechanisms.
022f2fc
022f2fc
Using GlassFish as an example:
022f2fc
- grizzly-npn-bootstrap.jar goes into the
022f2fc
  domain's bootclasspath (-Xbootclasspath/p:[PATH TO THE JAR])
022f2fc
- grizzly-npn-osgi and grizzly-spdy JARs go into the
022f2fc
  [PATH TO THE GlassFish 4 HOME]/modules directory.
022f2fc
 
022f2fc
%package javadoc
022f2fc
Summary:       Javadoc for %{name}
022f2fc
022f2fc
%description javadoc
022f2fc
This package contains javadoc for %{name}.
022f2fc
022f2fc
%prep
022f2fc
%setup -q
022f2fc
022f2fc
cp -p %{SOURCE1} LICENSE.txt
022f2fc
022f2fc
sed -i "s,59 Temple Place,51 Franklin Street,;s,Suite 330,Fifth Floor,;s,02111-1307,02110-1301,"  $(find -name "*.java") LICENSE.txt
022f2fc
022f2fc
sed -i 's/\r//' LICENSE.txt
022f2fc
022f2fc
mkdir -p osgi/target/classes/META-INF
022f2fc
touch osgi/target/classes/META-INF/MANIFEST.MF
022f2fc
022f2fc
# use jvm jsse
022f2fc
rm -r bootstrap/src/main/java/sun/security/ssl/Alerts.java \
022f2fc
 bootstrap/src/main/java/sun/security/ssl/ClientHandshaker.java \
022f2fc
 bootstrap/src/main/java/sun/security/ssl/ExtensionType.java \
022f2fc
 bootstrap/src/main/java/sun/security/ssl/Handshaker.java \
022f2fc
 bootstrap/src/main/java/sun/security/ssl/HandshakeMessage.java \
022f2fc
 bootstrap/src/main/java/sun/security/ssl/HelloExtensions.java \
022f2fc
 bootstrap/src/main/java/sun/security/ssl/ServerHandshaker.java \
022f2fc
 bootstrap/src/main/java/sun/security/ssl/SSLEngineImpl.java
022f2fc
5d73894
# use latest OSGi implementation
5d73894
%pom_change_dep -r :org.osgi.core org.osgi:osgi.core
5d73894
%pom_change_dep -r :org.osgi.compendium org.osgi:osgi.cmpn
5d73894
022f2fc
%pom_xpath_remove "pom:plugin[pom:artifactId = 'maven-bundle-plugin']/pom:configuration/pom:instructions/pom:Export-Package" bootstrap
022f2fc
%pom_xpath_inject "pom:plugin[pom:artifactId = 'maven-bundle-plugin']/pom:configuration/pom:instructions" "
022f2fc
<Export-Package>
022f2fc
    sun.security.ssl
022f2fc
</Export-Package>
022f2fc
<Import-Package>
022f2fc
    org.glassfish.grizzly.npn
022f2fc
</Import-Package>" bootstrap
022f2fc
022f2fc
%mvn_package :%{name} %{name}
022f2fc
%mvn_package :%{name}-api %{name}
022f2fc
022f2fc
%build
022f2fc
022f2fc
%mvn_build -s
022f2fc
022f2fc
%install
022f2fc
%mvn_install
022f2fc
022f2fc
%files -f .mfiles-%{name}
022f2fc
%license LICENSE.txt
022f2fc
022f2fc
%files bootstrap -f .mfiles-%{name}-bootstrap
022f2fc
%license LICENSE.txt
022f2fc
022f2fc
%files osgi -f .mfiles-%{name}-osgi
022f2fc
%license LICENSE.txt
022f2fc
022f2fc
%files javadoc -f .mfiles-javadoc
022f2fc
%license LICENSE.txt
022f2fc
022f2fc
%changelog
5d73894
* Sat Oct 05 2019 Fabio Valentini <decathorpe@gmail.com> - 1.2-11
5d73894
- Migrate away from the retired felix OSGi implementation.
5d73894
022f2fc
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.2-10
022f2fc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
022f2fc
022f2fc
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.2-9
022f2fc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
022f2fc
022f2fc
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.2-8
022f2fc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
022f2fc
022f2fc
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.2-7
022f2fc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
022f2fc
022f2fc
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.2-6
022f2fc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
022f2fc
022f2fc
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.2-5
022f2fc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
022f2fc
022f2fc
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.2-4
022f2fc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
022f2fc
022f2fc
* Fri Aug 07 2015 gil cattaneo <puntogil@libero.it> 1.2-3
022f2fc
- workaround for new maven-bundle-plugin
022f2fc
022f2fc
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2-2
022f2fc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
022f2fc
022f2fc
* Wed Apr 08 2015 gil cattaneo <puntogil@libero.it> 1.2-1
022f2fc
- update to 1.2
022f2fc
022f2fc
* Wed Apr 08 2015 gil cattaneo <puntogil@libero.it> 1.0-1
022f2fc
- initial rpm