# Disable generation of debuginfo package %global debug_package %{nil} %global namedreltag .Final %global namedversion %{version}%{?namedreltag} # Conditionals to help with missing dependencies %if 0%{?fedora} # Use com.fasterxml:aalto-xml:1.0.0 %bcond_with aalto %bcond_with gmaven # https://bugzilla.redhat.com/show_bug.cgi?id=1209685 %bcond_with javanano %endif Name: netty41 Version: 4.1.6 Release: 1%{?dist} Summary: An asynchronous event-driven network application framework and tools for Java License: ASL 2.0 URL: http://netty.io/ Source0: https://github.com/netty/netty/archive/netty-%{namedversion}.tar.gz # See http://groovy.github.io/gmaven/ do not support groovy > 2.1.5 # Source generated code using groovy-maven-plugin Patch0: netty-4.1.6.Final-common-generated-sources.patch # Disable jetty npn alpn supports Patch1: netty-4.1.6.Final-npn_alpn_ssl_fixes.patch BuildRequires: maven-local BuildRequires: mvn(ant-contrib:ant-contrib) BuildRequires: mvn(commons-logging:commons-logging) %if %{with aalto} BuildRequires: mvn(com.fasterxml:aalto-xml) %endif BuildRequires: mvn(com.github.jponge:lzma-java) BuildRequires: mvn(com.google.code.gson:gson) BuildRequires: mvn(com.google.protobuf:protobuf-java) %if %{with javanano} BuildRequires: mvn(com.google.protobuf.nano:protobuf-javanano) %endif BuildRequires: mvn(com.ning:compress-lzf) BuildRequires: mvn(com.jcraft:jzlib) BuildRequires: mvn(kr.motd.maven:os-maven-plugin) BuildRequires: mvn(log4j:log4j:1.2.17) BuildRequires: mvn(net.jpountz.lz4:lz4) BuildRequires: mvn(org.apache.felix:maven-bundle-plugin) BuildRequires: mvn(org.apache.logging.log4j:log4j-api) BuildRequires: mvn(org.apache.maven.plugins:maven-antrun-plugin) BuildRequires: mvn(org.apache.maven.plugins:maven-dependency-plugin) BuildRequires: mvn(org.bouncycastle:bcpkix-jdk15on) BuildRequires: mvn(org.codehaus.mojo:build-helper-maven-plugin) # BuildRequires: mvn(org.codehaus.mojo:xml-maven-plugin) >= 1.0.1 # hawtjni:1.14 BuildRequires: mvn(org.fusesource.hawtjni:maven-hawtjni-plugin) # javassist:3.20.0-GA BuildRequires: mvn(org.javassist:javassist) BuildRequires: mvn(org.jboss.marshalling:jboss-marshalling) BuildRequires: mvn(org.jctools:jctools-core) >= 1.2.1 BuildRequires: mvn(org.rxtx:rxtx) BuildRequires: mvn(org.slf4j:slf4j-api) BuildRequires: mvn(org.sonatype.oss:oss-parent:pom:) %if %{with gmaven} BuildRequires: mvn(org.apache.ant:ant) BuildRequires: mvn(org.codehaus.gmaven:groovy-maven-plugin) BuildRequires: mvn(org.codehaus.groovy:groovy-all) %endif %description Netty is a NIO client server framework which enables quick and easy development of network applications such as protocol servers and clients. It greatly simplifies and streamlines network programming such as TCP and UDP socket server. 'Quick and easy' doesn't mean that a resulting application will suffer from a maintainability or a performance issue. Netty has been designed carefully with the experiences earned from the implementation of a lot of protocols such as FTP, SMTP, HTTP, and various binary and text-based legacy protocols. As a result, Netty has succeeded to find a way to achieve ease of development, performance, stability, and flexibility without a compromise. %package all Summary: Netty All-in-One %description all This package provides Netty All-in-One. %package buffer Summary: Netty Buffer BuildArch: noarch %description buffer This package provides Netty Buffer. %package codec Summary: Netty Codec BuildArch: noarch %description codec This package provides Netty Codec. %package codec-dns Summary: Netty Codec DNS BuildArch: noarch %description codec-dns This package provides Netty Codec DNS. %package codec-haproxy Summary: Netty Codec HAProxy BuildArch: noarch %description codec-haproxy This package provides Netty Codec HAProxy. %package codec-http Summary: Netty Codec HTTP # BSD (3 clause): ./codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocket*FrameDecoder.java # ./codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocket*FrameEncoder.java # MIT/X11 (BSD like) ./codec-http/src/main/java/io/netty/handler/codec/http/websocketx/Utf8Validator.java License: ASL 2.0 and BSD and MIT BuildArch: noarch # https://github.com/webbit/webbit unknow release/version # ./codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocket*FrameDecoder.java # ./codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocket*FrameEncoder.java Provides: bundled(webbit) %description codec-http This package provides Netty Codec HTTP. %package codec-http2 Summary: Netty Codec HTTP2 BuildArch: noarch %description codec-http2 This package provides Netty Codec HTTP2. %package codec-memcache Summary: Netty Codec Memcache BuildArch: noarch %description codec-memcache This package provides Netty Codec Memcache. %package codec-mqtt Summary: Netty Codec MQTT BuildArch: noarch %description codec-mqtt This package provides Netty Codec MQTT. %package codec-redis Summary: Netty Codec Redis BuildArch: noarch %description codec-redis This package provides Netty Codec Redis. %package codec-smtp Summary: Netty Codec SMTP BuildArch: noarch %description codec-smtp This package provides Netty Codec SMTP. %package codec-socks Summary: Netty Codec Socks BuildArch: noarch %description codec-socks This package provides Netty Codec Socks. %package codec-stomp Summary: Netty Codec Stomp BuildArch: noarch %description codec-stomp This package provides Netty Codec Stomp. %if %{with aalto} %package codec-xml Summary: Netty Codec XML BuildArch: noarch %description codec-xml This package provides Netty Codec XML. %endif %package common Summary: Netty Common # MIT/X11 (BSD like) ./common/src/main/java/io/netty/util/internal/logging/Log4JLogger.java # ./common/src/main/java/io/netty/util/internal/logging/InternalLogger.java # ./common/src/main/java/io/netty/util/internal/logging/JdkLogger.java # ./common/src/main/java/io/netty/util/internal/logging/CommonsLogger.java License: ASL 2.0 and MIT BuildArch: noarch # ./common/src/main/java/io/netty/util/internal/logging/FormattingTuple.java # ./common/src/main/java/io/netty/util/internal/logging/MessageFormatter.java # unknow release/version Provides: bundled(slf4j-api) %description common This package provides Netty Common. %package handler Summary: Netty Handler BuildArch: noarch %description handler This package provides Netty Handler. %package handler-proxy Summary: Netty Handler Proxy BuildArch: noarch %description handler-proxy This package provides Netty Handler Proxy. %package javadoc Summary: Javadoc for %{name} BuildArch: noarch %description javadoc This package contains javadoc for %{name}. %package parent Summary: Netty Parent POM BuildArch: noarch %description parent This package provides Netty Parent POM. %package resolver Summary: Netty Resolver BuildArch: noarch %description resolver This package provides Netty Resolver. %package resolver-dns Summary: Netty Resolver DNS BuildArch: noarch %description resolver-dns This package provides Netty Resolver DNS. %package transport Summary: Netty Transport BuildArch: noarch %description transport This package provides Netty Transport. %package transport-native-epoll Summary: Netty Transport Native Epoll %description transport-native-epoll This package provides Netty Transport Native Epoll. %package transport-rxtx Summary: Netty Transport RXTX BuildArch: noarch %description transport-rxtx This package provides Netty Transport RXTX. %package transport-sctp Summary: Netty Transport SCTP BuildArch: noarch %description transport-sctp This package provides Netty Transport SCTP. %prep %setup -q -n netty-netty-%{namedversion} %if %{without gmaven} %patch0 -p1 %pom_remove_plugin :groovy-maven-plugin common %else sed -i "s|groupId>ant|groupId>org.apache.ant|" common/pom.xml sed -i "s|artifactId>ant-optional|artifactId>ant|" common/pom.xml %endif %patch1 -p1 rm handler/src/main/java/io/netty/handler/ssl/JdkAlpn*.java \ handler/src/main/java/io/netty/handler/ssl/JdkNpn*.java \ handler/src/main/java/io/netty/handler/ssl/OpenSsl.java \ handler/src/main/java/io/netty/handler/ssl/OpenSslClientContext.java \ handler/src/main/java/io/netty/handler/ssl/OpenSslContext.java \ handler/src/main/java/io/netty/handler/ssl/OpenSslEngine.java \ handler/src/main/java/io/netty/handler/ssl/OpenSslServerContext.java \ handler/src/main/java/io/netty/handler/ssl/OpenSslServerSessionContext.java \ handler/src/main/java/io/netty/handler/ssl/OpenSslSessionContext.java \ handler/src/main/java/io/netty/handler/ssl/OpenSslSessionStats.java \ handler/src/main/java/io/netty/handler/ssl/OpenSslSessionTicketKey.java \ handler/src/main/java/io/netty/handler/ssl/OpenSslKeyMaterialManager.java \ handler/src/main/java/io/netty/handler/ssl/OpenSslExtendedKeyMaterialManager.java \ handler/src/main/java/io/netty/handler/ssl/OpenSslEngineMap.java \ handler/src/main/java/io/netty/handler/ssl/ReferenceCountedOpenSslClientContext.java \ handler/src/main/java/io/netty/handler/ssl/OpenSslCertificateException.java \ handler/src/main/java/io/netty/handler/ssl/ReferenceCountedOpenSslContext.java \ handler/src/main/java/io/netty/handler/ssl/ReferenceCountedOpenSslEngine.java \ handler/src/main/java/io/netty/handler/ssl/ReferenceCountedOpenSslServerContext.java %pom_remove_plugin -r :animal-sniffer-maven-plugin # Use com.ceilfors.maven.plugin:enforcer-rules:1.1.0 %pom_remove_plugin -r :maven-enforcer-plugin %pom_remove_plugin -r :maven-checkstyle-plugin %pom_remove_plugin :maven-dependency-plugin %pom_remove_plugin :maven-antrun-plugin %pom_remove_plugin -r :maven-jxr-plugin %pom_remove_plugin -r :maven-deploy-plugin %pom_remove_plugin -r :maven-clean-plugin %pom_remove_plugin -r :maven-release-plugin %pom_remove_plugin -r :maven-source-plugin # Failed to execute goal org.codehaus.mojo:xml-maven-plugin:1.0.1:check-format (check-style) on project netty-parent: There are XML formatting violations. Check the above log for details. %pom_remove_plugin :xml-maven-plugin %pom_remove_plugin :maven-shade-plugin common # Missing com.barchart.udt:barchart-udt-bundle:jar:2.3.0 %pom_disable_module "transport-udt" %pom_remove_dep ":netty-transport-udt" all %pom_remove_dep -r ":netty-build" # Not needed %pom_disable_module "example" %pom_remove_dep ":netty-example" all %pom_disable_module "testsuite" %pom_disable_module "testsuite-osgi" %pom_disable_module "tarball" # org.agrona:Agrona:0.5.1 %pom_disable_module "microbench" %if %{without aalto} %pom_disable_module codec-xml %endif # Optional things we don't ship %pom_remove_dep -r :'${tcnative.artifactId}' %pom_remove_dep -r "org.eclipse.jetty.npn:npn-api" %pom_remove_dep -r "org.eclipse.jetty.alpn:alpn-api" #%% pom_remove_dep -r "org.mortbay.jetty.npn:npn-boot" #%% pom_remove_dep -r "org.mortbay.jetty.alpn:alpn-boot" %if %{without javanano} %pom_remove_dep -r :protobuf-javanano rm codec/src/main/java/io/netty/handler/codec/protobuf/ProtobufDecoderNano.java \ codec/src/main/java/io/netty/handler/codec/protobuf/ProtobufEncoderNano.java sed -i '/CodedInputByteBufferNano/d' codec/src/main/java/io/netty/handler/codec/protobuf/ProtobufVarint32FrameDecoder.java %endif %pom_change_dep -r log4j: ::1.2.17 %pom_xpath_inject "pom:plugins/pom:plugin[pom:artifactId = 'maven-antrun-plugin']" ' ant-contrib ant-contrib 1.0b3 ' all sed -i 's|taskdef|taskdef classpathref="maven.plugin.classpath"|' all/pom.xml %pom_xpath_inject "pom:execution[pom:id = 'build-native-lib']/pom:configuration" ' true' transport-native-epoll %pom_xpath_remove "pom:execution[pom:id = 'build-native-lib']/pom:configuration/pom:configureArgs" transport-native-epoll # Tell xmvn to install attached artifact, which it does not # do by default. In this case install all attached artifacts with # the linux classifier. %mvn_package ":netty-transport-native-epoll::linux*:" netty-transport-native-epoll %mvn_compat_version : %{version} %{namedversion} 4.1 4 %build # skipping tests because we don't have easymockclassextension export CFLAGS="$RPM_OPT_FLAGS" LDFLAGS="$RPM_LD_FLAGS" %mvn_build -fs %install %mvn_install %files all -f .mfiles-netty-all %license LICENSE.txt NOTICE.txt %files buffer -f .mfiles-netty-buffer %files codec -f .mfiles-netty-codec %files codec-dns -f .mfiles-netty-codec-dns %files codec-haproxy -f .mfiles-netty-codec-haproxy %files codec-http -f .mfiles-netty-codec-http %files codec-http2 -f .mfiles-netty-codec-http2 %files codec-memcache -f .mfiles-netty-codec-memcache %files codec-mqtt -f .mfiles-netty-codec-mqtt %files codec-redis -f .mfiles-netty-codec-redis %files codec-smtp -f .mfiles-netty-codec-smtp %files codec-socks -f .mfiles-netty-codec-socks %files codec-stomp -f .mfiles-netty-codec-stomp %if %{with aalto} %files codec-xml -f .mfiles-netty-codec-xml %endif %files common -f .mfiles-netty-common %doc README.md %license LICENSE.txt NOTICE.txt %files handler -f .mfiles-netty-handler %files handler-proxy -f .mfiles-netty-handler-proxy %files javadoc -f .mfiles-javadoc %license LICENSE.txt NOTICE.txt %files parent -f .mfiles-netty-parent %license LICENSE.txt NOTICE.txt %files resolver -f .mfiles-netty-resolver-dns %files resolver-dns -f .mfiles-netty-resolver %files transport -f .mfiles-netty-transport %files transport-native-epoll -f .mfiles-netty-transport-native-epoll %doc transport-native-epoll/README.md %files transport-rxtx -f .mfiles-netty-transport-rxtx %files transport-sctp -f .mfiles-netty-transport-sctp %changelog * Thu Nov 17 2016 gil cattaneo 4.1.6-1 - initial rpm