BuildRequires: /proc BuildRequires: jpackage-1.4-compat # Copyright (c) 2000-2005, JPackage Project # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the # distribution. # 3. Neither the name of the JPackage Project nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # %define gcj_support 0 Name: tl-netty2 Version: 1.9.2 Release: alt1_1jpp1.7 Epoch: 0 Summary: Event based network application framework License: Apache Software License 2.0 Group: Development/Java URL: http://geronimo.apache.org/ Source0: tl-netty2-1.9.2.tar.gz # svn export https://wush.net/svn/trustin/tl-netty2/tags/1.9.2 tl-netty2-1.9.2 Source1: pom-maven2jpp-depcat.xsl Source2: pom-maven2jpp-newdepmap.xsl Source3: pom-maven2jpp-mapdeps.xsl Source4: %{name}-%{version}-jpp-depmap.xml Patch0: tl-netty2-1.9.2-nomina.patch BuildRequires: maven-plugins >= 0:1.1 BuildRequires: saxon BuildRequires: saxon-scripts BuildRequires: jpackage-utils >= 0:1.6 BuildRequires: jakarta-commons-logging %if %{gcj_support} BuildRequires: java-gcj-compat-devel Requires(post): java-gcj-compat Requires(postun): java-gcj-compat %endif %if ! %{gcj_support} BuildArch: noarch %endif %description This package provides an easy event-based API (like Swing) to develop high-performance, maintainable TCP/IP server/client application. Netty handles many essential features such as readiness selection, thread pooling, and buffer reuse which are required to build high- performance and capacity network applications. %package javadoc Summary: Javadoc for %{name} Group: Development/Documentation %description javadoc %{summary}. %package manual Summary: Documents for %{name} Group: Development/Documentation %description manual %{summary}. %prep %setup -q -n %{name}-%{version} %patch0 -b .sav rm -rf src/main/net/gleamynode/netty2/mina %build if [ ! -f %{SOURCE4} ]; then export DEPCAT=$(pwd)/%{name}-%{version}-depcat.new.xml echo '<?xml version="1.0" standalone="yes"?>' > $DEPCAT echo '<depset>' >> $DEPCAT for p in $(find . -name project.xml); do pushd $(dirname $p) /usr/bin/saxon project.xml %{SOURCE1} >> $DEPCAT popd done echo >> $DEPCAT echo '</depset>' >> $DEPCAT /usr/bin/saxon $DEPCAT %{SOURCE2} > %{name}-%{version}-depmap.new.xml fi for p in $(find . -name project.xml); do pushd $(dirname $p) cp project.xml project.xml.orig /usr/bin/saxon -o project.xml project.xml.orig %{SOURCE3} map=%{SOURCE4} popd done export MAVEN_HOME_LOCAL=$(pwd)/.maven maven \ -Dmaven.repo.remote=file:/usr/share/maven/repository \ -Dmaven.home.local=$MAVEN_HOME_LOCAL \ jar:install javadoc:generate xdoc:transform %install # jars install -dm 0755 $RPM_BUILD_ROOT%{_javadir} install -m 0644 target/%{name}-%{version}.jar \ $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar (cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}*; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done) # javadoc install -dm 0755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} cp -pr target/docs/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} rm -rf target/docs/apidocs ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name} # ghost symlink # manual install -dm 0755 $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} cp -pr target/docs/* $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %if %{gcj_support} %{_bindir}/aot-compile-rpm %endif %post javadoc rm -f %{_javadocdir}/%{name} ln -s %{name}-%{version} %{_javadocdir}/%{name} %postun javadoc if [ "$1" = "0" ]; then rm -f %{_javadocdir}/%{name} fi %if %{gcj_support} %post if [ -x %{_bindir}/rebuild-gcj-db ] then %{_bindir}/rebuild-gcj-db fi %endif %if %{gcj_support} %postun if [ -x %{_bindir}/rebuild-gcj-db ] then %{_bindir}/rebuild-gcj-db fi %endif %files %doc LICENSE.txt %{_javadir}/*.jar %if %{gcj_support} %dir %{_libdir}/gcj/%{name} %{_libdir}/gcj/%{name}/%{name}-%{version}.jar.* %endif %files javadoc %doc %{_javadocdir}/%{name}-%{version} %ghost %doc %{_javadocdir}/%{name} %files manual %doc %{_docdir}/%{name}-%{version} %changelog * Tue Jul 24 2007 Igor Vlasenko <viy@altlinux.ru> 0:1.9.2-alt1_1jpp1.7 - converted from JPackage by jppimport script