diff --git a/.gitignore b/.gitignore index e69de29..42c8d97 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/netty-3.2.3.Final-dist.tar.bz2 diff --git a/0001-Remove-parent-and-fix-javadoc-plugin-config.patch b/0001-Remove-parent-and-fix-javadoc-plugin-config.patch new file mode 100644 index 0000000..42fc2d6 --- /dev/null +++ b/0001-Remove-parent-and-fix-javadoc-plugin-config.patch @@ -0,0 +1,61 @@ +From 12b26381c9c47432d63f941b2bf4877874e78c12 Mon Sep 17 00:00:00 2001 +From: Stanislav Ochotnicky +Date: Thu, 13 Jan 2011 14:59:07 +0100 +Subject: [PATCH 1/3] Remove parent and fix javadoc plugin config + +--- + pom.xml | 21 --------------------- + 1 files changed, 0 insertions(+), 21 deletions(-) + +diff --git a/pom.xml b/pom.xml +index fbece2d..806f05c 100644 +--- a/pom.xml ++++ b/pom.xml +@@ -17,11 +17,6 @@ + + + 4.0.0 +- +- org.jboss +- jboss-parent +- 5 +- + + org.jboss.netty + netty +@@ -400,23 +395,9 @@ + + + +- org.jboss.apiviz.APIviz +- +- org.jboss.apiviz +- apiviz +- 1.3.1.GA +- +- false + ${basedir}/src/javadoc/stylesheet.css +- ${basedir}/src/javadoc +- true +- true +- ${project.build.directory}/api +- ${project.build.directory}/api +- api + UTF-8 + UTF-8 +- true + true + true + true +@@ -438,8 +419,6 @@ + -group "Reusable I/O event interceptors" ${project.groupId}.handler* + -group "Miscellaneous" ${project.groupId}.logging*:${project.groupId}.util* + +- -sourceclasspath ${project.build.outputDirectory} +- -nopackagediagram + + UTF-8 + en_US +-- +1.7.3.4 + diff --git a/0002-Remove-optional-deps.patch b/0002-Remove-optional-deps.patch new file mode 100644 index 0000000..3567aa8 --- /dev/null +++ b/0002-Remove-optional-deps.patch @@ -0,0 +1,172 @@ +From 13a221991b69065fbd70fd9f6d29d62f03880ef1 Mon Sep 17 00:00:00 2001 +From: Stanislav Ochotnicky +Date: Thu, 13 Jan 2011 14:59:40 +0100 +Subject: [PATCH 2/3] Remove optional deps + +--- + pom.xml | 135 --------------------------------------------------------------- + 1 files changed, 0 insertions(+), 135 deletions(-) + +diff --git a/pom.xml b/pom.xml +index 806f05c..e61a552 100644 +--- a/pom.xml ++++ b/pom.xml +@@ -111,13 +111,6 @@ + true + + +- org.jboss.logging +- jboss-logging-spi +- 2.1.1.GA +- compile +- true +- +- + log4j + log4j + 1.2.16 +@@ -157,12 +150,6 @@ + test + + +- org.easymock +- easymockclassextension +- 2.5.2 +- test +- +- + org.slf4j + slf4j-simple + 1.5.11 +@@ -426,128 +413,6 @@ + + + +- maven-jxr-plugin +- 2.1 +- +- +- generate-xref +- package +- +- jxr +- +- +- +- +- UTF-8 +- UTF-8 +- true +- ${project.build.directory}/xref +- ${project.build.directory}/api +- ${basedir}/src/xref/stylesheet.css +- ${project.name} Source Xref (${project.version}, r${buildNumber}) +- ${project.name} Source Xref (${project.version}, r${buildNumber}) +- +- +- +- org.jboss.maven.plugins +- maven-jdocbook-plugin +- 2.2.1 +- +- +- generate-docbook +- package +- +- resources +- generate +- +- +- +- +- +- org.jboss +- jbossorg-docbook-xslt +- 1.1.0 +- +- +- org.eclipse.wst.css +- core +- +- +- org.eclipse.wst.sse +- core +- +- +- +- +- org.jboss +- jbossorg-jdocbook-style +- 1.1.0 +- jdocbook-style +- +- +- org.eclipse.wst.css +- core +- +- +- org.eclipse.wst.sse +- core +- +- +- +- +- org.jboss +- jbossorg-fonts +- 1.0.0 +- jdocbook-style +- +- +- +- master.xml +- ${basedir}/src/docbook +- +- ${basedir}/src/docbook +- +- css/**/* +- +- +- +- ${basedir}/src/docbook +- +- images/**/* +- +- +- +- +- html +- file:///${basedir}/src/docbook/xslt/xhtml.xsl +- index.html +- +- +- html_single +- file:///${basedir}/src/docbook/xslt/xhtml-single.xsl +- index.html +- +- +- eclipse +- file:///${basedir}/src/docbook/xslt/eclipse.xsl +- index.html +- +- +- pdf +- file:///${basedir}/src/docbook/xslt/pdf.xsl +- netty.pdf +- +- +- +- true +- saxon +- 1.72.0 +- - +- true +- +- +- +- + maven-assembly-plugin + 2.2-beta-5 + +-- +1.7.3.4 + diff --git a/0003-Replace-jboss-logger-with-jdk-logger.patch b/0003-Replace-jboss-logger-with-jdk-logger.patch new file mode 100644 index 0000000..8922699 --- /dev/null +++ b/0003-Replace-jboss-logger-with-jdk-logger.patch @@ -0,0 +1,33 @@ +From 06b89af693f824af86a3103505bb7f93128c22a2 Mon Sep 17 00:00:00 2001 +From: Stanislav Ochotnicky +Date: Thu, 13 Jan 2011 15:02:01 +0100 +Subject: [PATCH 3/3] Replace jboss logger with jdk logger + +--- + .../microcontainer/NettyLoggerConfigurator.java | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/main/java/org/jboss/netty/container/microcontainer/NettyLoggerConfigurator.java b/src/main/java/org/jboss/netty/container/microcontainer/NettyLoggerConfigurator.java +index 2ccc731..eca8a6a 100644 +--- a/src/main/java/org/jboss/netty/container/microcontainer/NettyLoggerConfigurator.java ++++ b/src/main/java/org/jboss/netty/container/microcontainer/NettyLoggerConfigurator.java +@@ -16,7 +16,7 @@ + package org.jboss.netty.container.microcontainer; + + import org.jboss.netty.logging.InternalLoggerFactory; +-import org.jboss.netty.logging.JBossLoggerFactory; ++import org.jboss.netty.logging.JdkLoggerFactory; + + /** + * A bean that configures the default {@link InternalLoggerFactory}. +@@ -27,6 +27,6 @@ import org.jboss.netty.logging.JBossLoggerFactory; + */ + public class NettyLoggerConfigurator { + public NettyLoggerConfigurator() { +- InternalLoggerFactory.setDefaultFactory(new JBossLoggerFactory()); ++ InternalLoggerFactory.setDefaultFactory(new JdkLoggerFactory()); + } + } +-- +1.7.3.4 + diff --git a/netty.spec b/netty.spec new file mode 100644 index 0000000..aa675b7 --- /dev/null +++ b/netty.spec @@ -0,0 +1,136 @@ + +Name: netty +Version: 3.2.3 +Release: 2%{?dist} +Summary: An asynchronous event-driven network application framework and tools for Java + +Group: Development/Libraries +License: ASL 2.0 +URL: http://www.jboss.org/netty +Source0: http://sourceforge.net/projects/jboss/files/%{name}-%{version}.Final-dist.tar.bz2 + +Patch0: 0001-Remove-parent-and-fix-javadoc-plugin-config.patch +Patch1: 0002-Remove-optional-deps.patch +Patch2: 0003-Replace-jboss-logger-with-jdk-logger.patch + +BuildArch: noarch + +# This pulls in all of the required java and maven stuff +BuildRequires: maven +BuildRequires: maven-antrun-plugin +BuildRequires: maven-assembly-plugin +BuildRequires: maven-compiler-plugin +BuildRequires: maven-eclipse-plugin +BuildRequires: maven-javadoc-plugin +BuildRequires: maven-resources-plugin +BuildRequires: maven-release-plugin +BuildRequires: maven-source-plugin +BuildRequires: maven-surefire-plugin +BuildRequires: maven-plugin-bundle +BuildRequires: buildnumber-maven-plugin +BuildRequires: ant-contrib +BuildRequires: subversion +BuildRequires: protobuf-java +BuildRequires: felix-osgi-compendium + + +Requires: java +Requires: protobuf-java +Requires(post): jpackage-utils +Requires(postun): jpackage-utils + + +%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 +Requires: jpackage-utils + +%description javadoc +%{summary}. + +%prep +%setup -q -n %{name}-%{version}.Final + +# just to be sure, but not used anyway +rm -rf jar/ + + +%patch0 -p1 +%patch1 -p1 + +# we don't have jboss logging facilites so we replace it with jdk logger +rm src/main/java/org/jboss/netty/logging/JBossLogger*.java +%patch2 -p1 + +%build +export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository +mkdir -p $MAVEN_REPO_LOCAL + +# skipping tests because we don't have all dependencies in Fedora +mvn-local \ + -Dmaven.repo.local=$MAVEN_REPO_LOCAL \ + -Dmaven.test.skip=true \ + install javadoc:javadoc + + +%install +install -d -m 755 $RPM_BUILD_ROOT%{_javadir} + +install -m 644 target/%{name}-%{version}.Final.jar \ + $RPM_BUILD_ROOT%{_javadir}/%{name}.jar + + +install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name} +cp -pr target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name} + +install -d -m 755 $RPM_BUILD_ROOT%{_mavenpomdir} +install -pm 644 pom.xml $RPM_BUILD_ROOT/%{_mavenpomdir}/JPP-%{name}.pom + +%add_to_maven_depmap org.jboss.netty netty %{version} JPP %{name} + +%post +%update_maven_depmap + +%postun +%update_maven_depmap + + +%files +%defattr(-,root,root,-) +%doc LICENSE.txt NOTICE.txt +%{_javadir}/*.jar +%{_mavendepmapfragdir}/%{name} +%{_mavenpomdir}/JPP-%{name}.pom + +%files javadoc +%defattr(-,root,root,-) +%doc LICENSE.txt NOTICE.txt +%{_javadocdir}/%{name} + + + +%changelog +* Mon Jan 17 2011 Stanislav Ochotnicky - 3.2.3-2 +- Use maven 3 to build +- Drop ant-contrib depmap (no longer needed) + +* Thu Jan 13 2011 Stanislav Ochotnicky - 3.2.3-1 +- Initial version of the package + diff --git a/sources b/sources index e69de29..01fcf79 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +000441ea4a805fc9f3abe3aa1e93c85f netty-3.2.3.Final-dist.tar.bz2