[netty31] Initial commit

Andy Grimm arg at fedoraproject.org
Mon Jul 16 20:08:52 UTC 2012


commit 70285aff924d3747c9e296dcbabdd6779b528b99
Author: Andy Grimm <agrimm at gmail.com>
Date:   Mon Jul 16 16:08:43 2012 -0400

    Initial commit

 .gitignore                        |    1 +
 netty31-dep-fixes.patch           |   69 +++++++++++++++
 netty31-disable-doc-plugins.patch |  174 +++++++++++++++++++++++++++++++++++++
 netty31.spec                      |  126 +++++++++++++++++++++++++++
 sources                           |    1 +
 5 files changed, 371 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..809bcac 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/netty-3.1.5.GA-dist.tar.bz2
diff --git a/netty31-dep-fixes.patch b/netty31-dep-fixes.patch
new file mode 100644
index 0000000..dba2549
--- /dev/null
+++ b/netty31-dep-fixes.patch
@@ -0,0 +1,69 @@
+diff -bur netty-3.1.5.GA.orig/pom.xml netty-3.1.5.GA/pom.xml
+--- netty-3.1.5.GA.orig/pom.xml	2012-02-20 04:19:55.041149883 -0500
++++ netty-3.1.5.GA/pom.xml	2012-02-20 04:14:47.832178061 -0500
+@@ -52,21 +52,6 @@
+   </scm>
+ 
+   <dependencies>
+-    <!-- JBoss XNIO - completely optional -->
+-    <dependency>
+-      <groupId>org.jboss.xnio</groupId>
+-      <artifactId>xnio-api</artifactId>
+-      <version>1.2.1.GA</version>
+-      <scope>compile</scope>
+-      <optional>true</optional>
+-    </dependency>
+-    <dependency>
+-      <groupId>org.jboss.xnio</groupId>
+-      <artifactId>xnio-nio</artifactId>
+-      <version>1.2.1.GA</version>
+-      <scope>compile</scope>
+-      <optional>true</optional>
+-    </dependency>
+   
+     <!-- Google Protocol Buffers - completely optional -->
+     <dependency>
+@@ -88,13 +73,6 @@
+ 
+     <!-- IoC/DI containers - completely optional -->
+     <dependency>
+-      <groupId>org.jboss.microcontainer</groupId>
+-      <artifactId>jboss-kernel</artifactId>
+-      <version>2.0.8.GA</version>
+-      <scope>compile</scope>
+-      <optional>true</optional>
+-    </dependency>
+-    <dependency>
+       <groupId>org.apache.felix</groupId>
+       <artifactId>org.osgi.core</artifactId>
+       <version>1.2.0</version>
+@@ -119,19 +97,12 @@
+       </exclusions>
+     </dependency>
+     <dependency>
+-      <groupId>com.google.code.guice</groupId>
++      <groupId>com.google.inject</groupId>
+       <artifactId>guice</artifactId>
+       <version>1.0</version>
+       <scope>compile</scope>
+       <optional>true</optional>
+     </dependency>
+-    <dependency>
+-      <groupId>org.springframework</groupId>
+-      <artifactId>spring</artifactId>
+-      <version>2.0.8</version>
+-      <scope>compile</scope>
+-      <optional>true</optional>
+-    </dependency>
+   
+     <!-- Logging frameworks - completely optional -->
+     <dependency>
+@@ -150,7 +121,7 @@
+     </dependency>
+     <dependency>
+       <groupId>org.jboss.logging</groupId>
+-      <artifactId>jboss-logging-spi</artifactId>
++      <artifactId>jboss-logging</artifactId>
+       <version>2.0.5.GA</version>
+       <scope>compile</scope>
+       <optional>true</optional>
diff --git a/netty31-disable-doc-plugins.patch b/netty31-disable-doc-plugins.patch
new file mode 100644
index 0000000..89eb3a3
--- /dev/null
+++ b/netty31-disable-doc-plugins.patch
@@ -0,0 +1,174 @@
+diff -ur netty-3.1.5.GA.orig/pom.xml netty-3.1.5.GA/pom.xml
+--- netty-3.1.5.GA.orig/pom.xml	2012-02-20 04:19:55.041149883 -0500
++++ netty-3.1.5.GA/pom.xml	2012-02-20 04:14:47.832178061 -0500
+@@ -461,170 +432,6 @@
+           <excludePackageNames>${project.groupId}.example*:${project.groupId}.util.internal*</excludePackageNames>
+         </configuration>
+       </plugin>
+-      <plugin>
+-        <artifactId>maven-jxr-plugin</artifactId>
+-        <version>2.1</version>
+-        <executions>
+-          <execution>
+-            <id>generate-xref</id>
+-            <phase>package</phase>
+-            <goals>
+-              <goal>jxr</goal>
+-            </goals>
+-          </execution>
+-        </executions>
+-        <configuration>
+-          <inputEncoding>UTF-8</inputEncoding>
+-          <outputEncoding>UTF-8</outputEncoding>
+-          <linkJavadoc>true</linkJavadoc>
+-          <destDir>${project.build.directory}/xref</destDir>
+-          <javadocDir>${project.build.directory}/api</javadocDir>
+-          <stylesheet>${basedir}/src/xref/stylesheet.css</stylesheet>
+-          <docTitle>${project.name} Source Xref (${project.version}, r${buildNumber})</docTitle>
+-          <windowTitle>${project.name} Source Xref (${project.version}, r${buildNumber})</windowTitle>
+-        </configuration>
+-      </plugin>
+-      <plugin>
+-        <groupId>org.jboss.maven.plugins</groupId>
+-        <artifactId>maven-jdocbook-plugin</artifactId>
+-        <version>2.2.0</version>
+-        <executions>
+-          <execution>
+-            <id>generate-docbook</id>
+-            <phase>package</phase>
+-            <goals>
+-              <goal>resources</goal>
+-              <goal>generate</goal>
+-            </goals>
+-          </execution>
+-        </executions>
+-        <dependencies>
+-          <dependency>
+-            <groupId>org.jboss</groupId>
+-            <artifactId>jbossorg-docbook-xslt</artifactId>
+-            <version>1.1.0</version>
+-            <exclusions>
+-              <exclusion>
+-                <groupId>org.eclipse.wst.css</groupId>
+-                <artifactId>core</artifactId>
+-              </exclusion>
+-              <exclusion>
+-                <groupId>org.eclipse.wst.sse</groupId>
+-                <artifactId>core</artifactId>
+-              </exclusion>
+-            </exclusions>
+-          </dependency>
+-          <dependency>
+-            <groupId>org.jboss</groupId>
+-            <artifactId>jbossorg-jdocbook-style</artifactId>
+-            <version>1.1.0</version>
+-            <type>jdocbook-style</type>
+-            <exclusions>
+-              <exclusion>
+-                <groupId>org.eclipse.wst.css</groupId>
+-                <artifactId>core</artifactId>
+-              </exclusion>
+-              <exclusion>
+-                <groupId>org.eclipse.wst.sse</groupId>
+-                <artifactId>core</artifactId>
+-              </exclusion>
+-            </exclusions>
+-          </dependency>
+-          <dependency>
+-            <groupId>org.jboss</groupId>
+-            <artifactId>jbossorg-fonts</artifactId>
+-            <version>1.0.0</version>
+-            <type>jdocbook-style</type>
+-          </dependency>
+-        </dependencies>
+-        <configuration>
+-          <sourceDocumentName>master.xml</sourceDocumentName>
+-          <sourceDirectory>${basedir}/src/docbook</sourceDirectory>
+-          <cssResource>
+-            <directory>${basedir}/src/docbook</directory>
+-            <includes>
+-              <include>css/**/*</include>
+-            </includes>
+-          </cssResource>
+-          <imageResource>
+-            <directory>${basedir}/src/docbook</directory>
+-            <includes>
+-              <include>images/**/*</include>
+-            </includes>
+-          </imageResource>
+-          <formats>
+-            <format>
+-              <formatName>html</formatName>
+-              <stylesheetResource>file:///${basedir}/src/docbook/xslt/xhtml.xsl</stylesheetResource>
+-              <finalName>index.html</finalName>
+-            </format>
+-            <format>
+-              <formatName>html_single</formatName>
+-              <stylesheetResource>file:///${basedir}/src/docbook/xslt/xhtml-single.xsl</stylesheetResource>
+-              <finalName>index.html</finalName>
+-            </format>
+-            <format>
+-              <formatName>eclipse</formatName>
+-              <stylesheetResource>file:///${basedir}/src/docbook/xslt/eclipse.xsl</stylesheetResource>
+-              <finalName>index.html</finalName>
+-            </format>
+-            <format>
+-              <formatName>pdf</formatName>
+-              <stylesheetResource>file:///${basedir}/src/docbook/xslt/pdf.xsl</stylesheetResource>
+-              <finalName>netty.pdf</finalName>
+-            </format>
+-          </formats>
+-          <options>
+-            <xincludeSupported>true</xincludeSupported>
+-            <xmlTransformerType>saxon</xmlTransformerType>
+-            <docbookVersion>1.72.0</docbookVersion>
+-            <localeSeparator>-</localeSeparator>
+-            <autoDetectFonts>true</autoDetectFonts>
+-          </options>
+-        </configuration>
+-      </plugin>
+-      <plugin>
+-        <artifactId>maven-assembly-plugin</artifactId>
+-        <version>2.2-beta-4</version>
+-        <executions>
+-          <execution>
+-            <id>generate-distribution</id>
+-            <phase>package</phase>
+-            <goals>
+-              <goal>single</goal>
+-            </goals>
+-          </execution>
+-        </executions>
+-        <configuration>
+-          <descriptors>
+-            <descriptor>${basedir}/src/assembly/default.xml</descriptor>
+-          </descriptors>
+-          <attach>${attach-distribution}</attach>
+-          <appendAssemblyId>true</appendAssemblyId>
+-          <tarLongFileMode>gnu</tarLongFileMode>
+-        </configuration>
+-      </plugin>
+-      <plugin>
+-        <artifactId>maven-release-plugin</artifactId>
+-        <version>2.0-beta-9</version>
+-        <configuration>
+-          <tagBase>https://svn.jboss.org/repos/netty/tags</tagBase>
+-          <!-- We don't want to use the default release profile because it
+-               causes the JavaDoc and source jars to be deployed twice. -->
+-          <useReleaseProfile>false</useReleaseProfile>
+-          <!-- Activate a custom profile called "release" -->
+-          <arguments>-Prelease</arguments>
+-        </configuration>
+-      </plugin>
+-      <plugin>
+-        <groupId>org.apache.maven.plugins</groupId>
+-        <artifactId>maven-eclipse-plugin</artifactId>
+-        <version>2.7</version>
+-        <configuration>
+-          <downloadSources>true</downloadSources>
+-          <addVersionToProjectName>true</addVersionToProjectName>
+-        </configuration>
+-      </plugin>
+     </plugins>
+   </build>
+ 
diff --git a/netty31.spec b/netty31.spec
new file mode 100644
index 0000000..e2a11e6
--- /dev/null
+++ b/netty31.spec
@@ -0,0 +1,126 @@
+%global oname netty
+
+Name:           netty31
+Version:        3.1.5
+Release:        2%{?dist}
+Summary:        An asynchronous event-driven network application framework and tools for Java
+
+Group:          Development/Libraries
+License:        ASL 2.0
+URL:            https://netty.io/
+Source0:        http://sourceforge.net/projects/jboss/files/netty-3.1.5.GA-dist.tar.bz2
+
+# 1) Remove optional xnio dep
+# 2) Remove optional spring dep
+# 3) Fix google-guice and jboss-logging deps
+Patch0:         netty31-dep-fixes.patch
+# These plugins break with maven 3, so disable them for now
+Patch1:         netty31-disable-doc-plugins.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
+BuildRequires:  jboss-parent
+BuildRequires:  jboss-logging
+BuildRequires:  dos2unix
+BuildRequires:  axis
+BuildRequires:  apiviz
+BuildRequires:  java-devel
+
+Requires:       java
+Requires:       protobuf-java
+Requires:       axis
+
+%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 %{oname}-%{version}.GA
+
+# just to be sure, but not used anyway
+rm -rf jar/
+
+# example doesn't build with our protobuf
+rm -rf src/main/java/org/jboss/netty/example/localtime
+
+# convert the pom file before patching
+dos2unix pom.xml LICENSE.txt NOTICE.txt
+%patch0 -p1
+%patch1 -p1
+
+# XNIO and spring deps are removed from this build
+rm -rf src/main/java/org/jboss/netty/container/spring/
+rm -rf src/main/java/org/jboss/netty/channel/xnio/
+
+%build
+# skipping tests because we don't have all dependencies in Fedora
+mvn-rpmbuild -Dmaven.test.skip=true \
+        install javadoc:javadoc
+dos2unix target/api/stylesheet.css
+
+%install
+install -d -m 755 $RPM_BUILD_ROOT%{_javadir}
+
+install -m 644 target/%{oname}-%{version}.GA.jar \
+  $RPM_BUILD_ROOT%{_javadir}/%{name}.jar
+
+
+install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}
+cp -pr target/api/* $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_maven_depmap JPP-%{name}.pom %{name}.jar
+
+%files
+%doc LICENSE.txt NOTICE.txt
+%{_javadir}/%{name}.jar
+%{_mavendepmapfragdir}/%{name}
+%{_mavenpomdir}/JPP-%{name}.pom
+
+%files javadoc
+%doc LICENSE.txt NOTICE.txt
+%{_javadocdir}/%{name}
+
+%changelog
+* Thu Jul 11 2012 Andy Grimm <agrimm at gmail.com> - 3.1.5-2
+- Fixes for package review
+
+* Wed Feb 15 2012 Andy Grimm <agrimm at gmail.com> - 3.1.5-1
+- Initial netty31 package
diff --git a/sources b/sources
index e69de29..a960fa7 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+20a38720a01d1a60613f657362c162e5  netty-3.1.5.GA-dist.tar.bz2


More information about the scm-commits mailing list