%global namedreltag .Final %global namedversion %{version}%{?namedreltag} Name: netty3 Version: 3.9.3 Release: 1%{?dist} Summary: An asynchronous event-driven network application framework and tools for Java License: ASL 2.0 and BSD URL: https://netty.io/ Source0: http://netty.googlecode.com/files/netty-%{namedversion}-dist.tar.bz2 Patch0: netty-port-to-jzlib-1.1.0.patch Patch1: disableNPN.patch BuildArch: noarch BuildRequires: maven-local BuildRequires: maven-antrun-plugin BuildRequires: maven-assembly-plugin BuildRequires: maven-compiler-plugin BuildRequires: maven-enforcer-plugin BuildRequires: maven-javadoc-plugin BuildRequires: maven-plugin-bundle BuildRequires: maven-resources-plugin BuildRequires: maven-source-plugin BuildRequires: maven-surefire-plugin BuildRequires: ant-contrib BuildRequires: netty-tcnative BuildRequires: java-devel BuildRequires: bouncycastle-pkix BuildRequires: felix-osgi-compendium BuildRequires: felix-osgi-core BuildRequires: jboss-logging BuildRequires: jboss-marshalling BuildRequires: protobuf-java BuildRequires: slf4j BuildRequires: sonatype-oss-parent BuildRequires: tomcat-servlet-3.0-api Requires: netty-tcnative Requires: java-headless %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 javadoc Summary: API documentation for %{name} Group: Documentation %description javadoc %{summary}. %prep %setup -q -n netty-%{namedversion} # just to be sure, but not used anyway rm -rf jar doc license %pom_remove_plugin :maven-jxr-plugin %pom_remove_plugin :maven-checkstyle-plugin %pom_remove_plugin org.eclipse.m2e:lifecycle-mapping %pom_remove_dep javax.activation:activation %pom_remove_plugin :animal-sniffer-maven-plugin %pom_remove_dep :npn-api %pom_xpath_remove "pom:extension[pom:artifactId[text()='os-maven-plugin']]" %pom_xpath_remove "pom:execution[pom:id[text()='remove-examples']]" %pom_xpath_remove "pom:plugin[pom:artifactId[text()='maven-javadoc-plugin']]/pom:configuration" %pom_xpath_remove "pom:dependency[pom:artifactId[text()='netty-tcnative']]/pom:classifier" %pom_xpath_remove "pom:dependency[pom:artifactId[text()='netty-tcnative']]/pom:scope" # Set scope of optional compile dependencies to 'provided' %pom_xpath_set "pom:dependency[pom:scope[text()='compile'] and pom:optional[text()='true']]/pom:scope" provided sed s/jboss-logging-spi/jboss-logging/ -i pom.xml # Remove bundled jzlib and use system jzlib rm -rf src/main/java/org/jboss/netty/util/internal/jzlib %pom_add_dep com.jcraft:jzlib sed -i s/org.jboss.netty.util.internal.jzlib/com.jcraft.jzlib/ \ $(find src/main/java/org/jboss/netty/handler/codec -name \*.java | sort -u) %patch0 -p1 %patch1 -p1 #adapting to excluded dep rm -v src/main/java/org/jboss/netty/handler/ssl/JettyNpnSslEngine.java %build %mvn_compat_version : %{version} %{namedversion} 3 %mvn_alias : org.jboss.netty: %mvn_file : %{name} # skipping tests because we don't have easymockclassextension %mvn_build -f %install %mvn_install %files -f .mfiles %doc LICENSE.txt NOTICE.txt %files javadoc -f .mfiles-javadoc %doc LICENSE.txt NOTICE.txt %changelog * Thu Feb 12 2015 Marek Goldmann - 3.9.3-1 - Rebuild to fix the release * Thu Feb 12 2015 Jiri Vanek - 3.9.3-0 - Updated to netty 3.9.3 - uploaded sources netty-3.10.0.Final-dist.tar.bz2 and netty-3.9.3.Final-dist.tar.bz2 - added and applied patch1, disableNPN.patch - modified patch0 netty-port-to-jzlib-1.1.0.patch - release reset to 0 - added build requires java-devel and bouncycastle-pkix - xpathed out npn-api and os-maven-plugin - xpathed out from netty-tcnative classifier and scope - from sources removed JettyNpnSslEngine.java * Tue Jun 10 2014 Michal Srb - 3.6.6-4 - Rebuilt to fix provides * Sat Jun 07 2014 Fedora Release Engineering - 3.6.6-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Fri Mar 28 2014 Michael Simacek - 3.6.6-2 - Use Requires: java-headless rebuild (#1067528) * Mon Dec 30 2013 Marek Goldmann - 3.6.6-1 - Initial packaging of compat version 3 as a compat package