120 lines
4.2 KiB
RPMSpec
120 lines
4.2 KiB
RPMSpec
%global name_reltag .Final
|
|
%global name_ver %{version}%{name_reltag}
|
|
%global bundled_jzlib_dir src/main/java/org/jboss/netty/util/internal/jzlib
|
|
%global netty_handler_dir src/main/java/org/jboss/netty/handler
|
|
|
|
Name: netty3
|
|
Version: 3.10.6
|
|
Release: 6
|
|
Summary: An asynchronous event-driven network application framework and tools for Java
|
|
License: ASL 2.0 and BSD and CC0
|
|
URL: http://netty.io/
|
|
Source0: https://github.com/netty/netty/archive/netty-%{name_ver}.tar.gz
|
|
Patch0: disableNPN.patch
|
|
Patch1: netty-3.10.6-port-to-jzlib-1.1.0.patch
|
|
|
|
BuildRequires: maven-local
|
|
BuildRequires: mvn(org.sonatype.oss:oss-parent:pom:)
|
|
BuildRequires: mvn(org.slf4j:slf4j-api)
|
|
BuildRequires: mvn(org.jboss.marshalling:jboss-marshalling)
|
|
BuildRequires: mvn(org.jboss.logging:jboss-logging)
|
|
BuildRequires: mvn(org.bouncycastle:bcpkix-jdk15on)
|
|
BuildRequires: mvn(org.apache.maven.plugins:maven-resources-plugin)
|
|
BuildRequires: mvn(org.apache.maven.plugins:maven-enforcer-plugin)
|
|
BuildRequires: mvn(org.apache.maven.plugins:maven-antrun-plugin)
|
|
BuildRequires: mvn(org.apache.felix:org.osgi.core)
|
|
BuildRequires: mvn(org.apache.felix:org.osgi.compendium)
|
|
BuildRequires: mvn(org.apache.felix:maven-bundle-plugin)
|
|
BuildRequires: mvn(org.apache.ant:ant-launcher)
|
|
BuildRequires: mvn(org.apache.ant:ant)
|
|
BuildRequires: mvn(log4j:log4j:12)
|
|
BuildRequires: mvn(javax.servlet:javax.servlet-api)
|
|
BuildRequires: mvn(io.netty:netty-tcnative)
|
|
BuildRequires: mvn(commons-logging:commons-logging)
|
|
BuildRequires: mvn(com.jcraft:jzlib)
|
|
BuildRequires: mvn(com.google.protobuf:protobuf-java)
|
|
BuildRequires: mvn(ant-contrib:ant-contrib)
|
|
|
|
BuildArch: noarch
|
|
|
|
Requires: netty-tcnative
|
|
|
|
Provides: bundled(java-base64)
|
|
Provides: netty3-javadoc
|
|
Obsoletes: netty3-javadoc
|
|
|
|
%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.
|
|
|
|
|
|
%prep
|
|
%setup -q -n netty-netty-%{name_ver}
|
|
|
|
rm -rf jar doc license
|
|
|
|
%pom_remove_plugin :animal-sniffer-maven-plugin
|
|
%pom_remove_plugin :maven-checkstyle-plugin
|
|
%pom_remove_plugin :maven-jxr-plugin
|
|
%pom_remove_plugin org.eclipse.m2e:lifecycle-mapping
|
|
|
|
%pom_remove_dep javax.activation:activation
|
|
%pom_remove_dep :npn-api
|
|
|
|
%pom_xpath_remove "pom:dependency[pom:artifactId[text()='netty-tcnative']]/pom:classifier"
|
|
%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_set "pom:dependency[pom:scope[text()='compile'] and pom:optional[text()='true']]/pom:scope" provided
|
|
%pom_xpath_set "pom:dependency[pom:artifactId = 'log4j']/pom:version" 12
|
|
|
|
%pom_change_dep :servlet-api javax.servlet:javax.servlet-api:3.1.0
|
|
|
|
%pom_remove_plugin :maven-assembly-plugin
|
|
%pom_remove_plugin :maven-javadoc-plugin
|
|
%pom_remove_plugin :maven-source-plugin
|
|
%pom_remove_plugin kr.motd.maven:exec-maven-plugin
|
|
|
|
sed s/jboss-logging-spi/jboss-logging/ -i pom.xml
|
|
|
|
rm -r %{bundled_jzlib_dir}
|
|
%pom_add_dep com.jcraft:jzlib
|
|
#javafile=
|
|
sed -i s/org.jboss.netty.util.internal.jzlib/com.jcraft.jzlib/ \
|
|
`find %{netty_handler_dir}/codec -name \*.java | sort -u`
|
|
|
|
%patch0 -p1
|
|
%patch1 -p1
|
|
|
|
rm -v %{netty_handler_dir}/ssl/JettyNpnSslEngine.java
|
|
|
|
%mvn_compat_version : %{version} 3.9.3 %{name_ver} 3.9.3.Final 3
|
|
%mvn_alias : org.jboss.netty:
|
|
%mvn_file : %{name}
|
|
|
|
%build
|
|
%mvn_build -f
|
|
|
|
%install
|
|
%mvn_install
|
|
|
|
%files -f .mfiles
|
|
%doc README.md
|
|
%doc %{_javadocdir}/%{name}
|
|
%license LICENSE.txt NOTICE.txt
|
|
|
|
|
|
%changelog
|
|
* Sat Dec 7 2019 huyan <hu.huyan@huawei.com> - 3.10.6-6
|
|
- Package Initialization |