[Jpackage-commits] dist/apache-commons-net/JPP-6 Makefile, NONE, 1.1 apache-commons-net-component-info.xml, NONE, 1.1 apache-commons-net-jpp-depmap.xml, NONE, 1.1 apache-commons-net-settings.xml, NONE, 1.1 apache-commons-net.spec, NONE, 1.1 commons-net-FTP-compat.patch, NONE, 1.1 commons-net-build.xml, NONE, 1.1 commons-net-maven-build.properties, NONE, 1.1 commons-net-maven-build.xml, NONE, 1.1 commons-net-pom.patch, NONE, 1.1 sources, NONE, 1.1

jpackage jpackage at ryu.zarb.org
Sun Sep 5 23:23:36 CEST 2010


Update of /home/projects/jpackage/cvs/dist/apache-commons-net/JPP-6
In directory ryu.zarb.org:/tmp/cvs-serv17151/JPP-6

Added Files:
	Makefile apache-commons-net-component-info.xml 
	apache-commons-net-jpp-depmap.xml 
	apache-commons-net-settings.xml apache-commons-net.spec 
	commons-net-FTP-compat.patch commons-net-build.xml 
	commons-net-maven-build.properties commons-net-maven-build.xml 
	commons-net-pom.patch sources 
Log Message:
Import apache-commons-net into JPP-6

--- NEW FILE: apache-commons-net-settings.xml ---
<settings>
	<profiles>
		<profile>
			<id>JPP</id>
			<repositories>
				<repository>
					<id>internal</id>
					<layout>jpp</layout>
					<url>__JPP_URL_PLACEHOLDER__</url>
				</repository>
				<repository>
					<id>external</id>
					<layout>jpp</layout>
					<url>__JAVADIR_PLACEHOLDER__</url>
				</repository>
				<repository>
					<id>local</id>
					<layout>jpp</layout>
					<url>__MAVENREPO_DIR_PLACEHOLDER__</url>
				</repository>
			</repositories>
			<pluginRepositories>
				<pluginRepository>
					<id>plugins-internal</id>
					<name>plugins-internal</name>
					<layout>jpp</layout>
					<url>__JPP_URL_PLACEHOLDER__</url>
				</pluginRepository>
				<pluginRepository>
					<id>plugins-external</id>
					<name>plugins-external</name>
					<layout>jpp</layout>
					<url>__JAVADIR_PLACEHOLDER__</url>
				</pluginRepository>
				<pluginRepository>
					<id>plugins-maven</id>
					<name>plugins-maven</name>
					<layout>jpp</layout>
					<url>__MAVENDIR_PLUGIN_PLACEHOLDER__</url>
				</pluginRepository>
			</pluginRepositories>
		</profile>
	</profiles>
	<activeProfiles>
		<activeProfile>JPP</activeProfile>
	</activeProfiles>
</settings>

--- NEW FILE: apache-commons-net-component-info.xml ---
<?xml version="1.0" encoding="UTF-8"?>
<project name="">
  <component id="apache-net"
             licenseType=""
             version="@VERSION@"
             tag="@TAG@"
             description=""
             
             > 
              
    <artifact id="commons-net.jar"/>


    <export>
      <include input="commons-net.jar"/>

    </export>
  </component>
</project>

--- NEW FILE: apache-commons-net-jpp-depmap.xml ---
<dependencies>
    <dependency>
        <maven>
            <groupId>xmlpull</groupId>
            <artifactId>xmlpull</artifactId>
            <version>1.1.3.1</version>
        </maven>
        <jpp>
            <groupId>JPP</groupId>
            <artifactId>xpp3</artifactId>
            <version>1.1.3.8</version>
        </jpp>
    </dependency>
    <dependency>
        <maven>
            <groupId>net.sf.clirr</groupId>
            <artifactId>clirr-core</artifactId>
            <version>0.6</version>
        </maven>
        <jpp>
            <groupId>JPP</groupId>
            <artifactId>clirr-core</artifactId>
            <version>0.6</version>
        </jpp>
    </dependency>
    <dependency>
        <maven>
            <groupId>maven</groupId>
            <artifactId>dom4j</artifactId>
            <version>1.7-20060614</version>
        </maven>
        <jpp>
            <groupId>JPP</groupId>
            <artifactId>dom4j</artifactId>
            <version>1.6.1</version>
        </jpp>
    </dependency>
    <dependency>
        <maven>
            <groupId>ant</groupId>
            <artifactId>ant-trax</artifactId>
            <version>1.6.5</version>
        </maven>
        <jpp>
            <groupId>JPP/ant</groupId>
            <artifactId>ant-trax</artifactId>
            <version>1.7.1</version>
        </jpp>
    </dependency>
    <dependency>
        <maven>
            <groupId>maven</groupId>
            <artifactId>commons-jelly</artifactId>
            <version>1.0.1-20060717</version>
        </maven>
        <jpp>
            <groupId>JPP</groupId>
            <artifactId>commons-jelly</artifactId>
            <version>1.0.1</version>
        </jpp>
    </dependency>
    <dependency>
        <maven>
            <groupId>commons-jelly</groupId>
            <artifactId>commons-jelly-tags-ant</artifactId>
            <version>1.1</version>
        </maven>
        <jpp>
            <groupId>JPP</groupId>
            <artifactId>commons-jelly-tags-ant</artifactId>
            <version>1.1</version>
        </jpp>
    </dependency>
    <dependency>
        <maven>
            <groupId>commons-jelly</groupId>
            <artifactId>commons-jelly-tags-define</artifactId>
            <version>1.0</version>
        </maven>
        <jpp>
            <groupId>JPP</groupId>
            <artifactId>commons-jelly-tags-define</artifactId>
            <version>1.0</version>
        </jpp>
    </dependency>
    <dependency>
        <maven>
            <groupId>commons-jelly</groupId>
            <artifactId>commons-jelly-tags-util</artifactId>
            <version>1.1.1</version>
        </maven>
        <jpp>
            <groupId>JPP</groupId>
            <artifactId>commons-jelly-tags-util</artifactId>
            <version>1.1.1</version>
        </jpp>
    </dependency>
    <dependency>
        <maven>
            <groupId>commons-jelly</groupId>
            <artifactId>commons-jelly-tags-xml</artifactId>
            <version>1.1</version>
        </maven>
        <jpp>
            <groupId>JPP</groupId>
            <artifactId>commons-jelly-tags-xml</artifactId>
            <version>1.1</version>
        </jpp>
    </dependency>
    <dependency>
        <maven>
            <groupId>xml-resolver</groupId>
            <artifactId>xml-resolver</artifactId>
            <version>1.1</version>
        </maven>
        <jpp>
            <groupId>JPP</groupId>
            <artifactId>xml-commons-resolver11</artifactId>
            <version>1.1</version>
        </jpp>
    </dependency>
    <dependency>
        <maven>
            <groupId>com.bea.xml</groupId>
            <artifactId>jsr173-ri</artifactId>
            <version>1.0</version>
        </maven>
        <jpp>
            <groupId>JPP</groupId>
            <artifactId>bea-stax-ri</artifactId>
            <version>1.0</version>
        </jpp>
    </dependency>
    <dependency>
        <maven>
            <groupId>jdepend</groupId>
            <artifactId>jdepend</artifactId>
            <version>2.9.1</version>
        </maven>
        <jpp>
            <groupId>JPP</groupId>
            <artifactId>jdepend</artifactId>
            <version>2.9.1</version>
        </jpp>
    </dependency>

</dependencies>

--- NEW FILE: commons-net-maven-build.xml ---
<?xml version="1.0" encoding="UTF-8"?>

<!-- ====================================================================== -->
<!-- Ant build file (http://ant.apache.org/) for Ant 1.6.2 or above.        -->
<!-- ====================================================================== -->

<!-- ====================================================================== -->
<!-- ===================== - DO NOT EDIT THIS FILE! - ===================== -->
<!-- ====================================================================== -->
<!--                                                                        -->
<!-- Any modifications will be overwritten.                                 -->
<!--                                                                        -->
<!-- Generated by Maven Ant Plugin on 11/3/09 9:13 AM                       -->
<!-- See: http://maven.apache.org/plugins/maven-ant-plugin/                 -->
<!--                                                                        -->
<!-- ====================================================================== -->

<project name="commons-net-from-maven" default="package" basedir=".">

  <!-- ====================================================================== -->
  <!-- Build environnement properties                                         -->
  <!-- ====================================================================== -->

  <property file="${user.home}/.m2/maven.properties"/>
  <property file="maven-build.properties"/>

  <property name="maven.build.finalName" value="commons-net-2.0"/>
  <property name="maven.build.dir" value="target"/>
  <property name="maven.build.outputDir" value="${maven.build.dir}/classes"/>
  <property name="maven.build.srcDir.0" value="src/main/java"/>
  <property name="maven.build.resourceDir.0" value="."/>
  <property name="maven.build.testOutputDir" value="${maven.build.dir}/test-classes"/>
  <property name="maven.build.testDir.0" value="src/test/java"/>
  <property name="maven.build.testResourceDir.0" value="."/>
  <property name="maven.test.reports" value="${maven.build.dir}/test-reports"/>
  <property name="maven.reporting.outputDirectory" value="${maven.build.dir}/site"/>

  <property name="maven.repo.local" value=".m2/repository"/>
  <property name="maven.settings.offline" value="false"/>
  <property name="maven.settings.interactiveMode" value="true"/>

  <!-- ====================================================================== -->
  <!-- Defining classpaths                                                    -->
  <!-- ====================================================================== -->

  <path id="build.classpath">
    <fileset dir="${maven.repo.local}">
      <include name="*.jar"/>
    </fileset>
  </path>
  <path id="build.test.classpath">
    <fileset dir="${maven.repo.local}">
      <include name="junit/junit/4.4/junit-4.4.jar"/>
    </fileset>
  </path>

  <!-- ====================================================================== -->
  <!-- Cleaning up target                                                     -->
  <!-- ====================================================================== -->

  <target name="clean" description="Clean the output directory">
    <delete dir="${maven.build.dir}"/>
  </target>

  <!-- ====================================================================== -->
  <!-- Compilation target                                                     -->
  <!-- ====================================================================== -->

  <target name="compile" depends="get-deps" description="Compile the code">
    <mkdir dir="${maven.build.outputDir}"/>
    <javac destdir="${maven.build.outputDir}" 
           nowarn="false" 
           debug="true" 
           optimize="false" 
           deprecation="true" 
           target="1.5" 
           verbose="false" 
           fork="false" 
           source="1.5">
      <src>
        <pathelement location="${maven.build.srcDir.0}"/>
      </src>
      <classpath refid="build.classpath"/>
    </javac>
    <mkdir dir="${maven.build.outputDir}/META-INF"/>
    <copy todir="${maven.build.outputDir}/META-INF">
      <fileset dir="${maven.build.resourceDir.0}">
        <include name="NOTICE.txt"/>
        <include name="LICENSE.txt"/>
      </fileset>
    </copy>
  </target>

  <!-- ====================================================================== -->
  <!-- Test-compilation target                                                -->
  <!-- ====================================================================== -->

  <target name="compile-tests" 
          depends="junit-present, compile" 
          description="Compile the test code" 
          if="junit.present">
    <mkdir dir="${maven.build.testOutputDir}"/>
    <javac destdir="${maven.build.testOutputDir}" 
           nowarn="false" 
           debug="true" 
           optimize="false" 
           deprecation="true" 
           target="1.5" 
           verbose="false" 
           fork="false" 
           source="1.5">
      <src>
        <pathelement location="${maven.build.testDir.0}"/>
      </src>
      <classpath>
        <path refid="build.test.classpath"/>
        <pathelement location="${maven.build.outputDir}"/>
      </classpath>
    </javac>
    <copy todir="${maven.build.testOutputDir}">
      <fileset dir="${maven.build.testResourceDir.0}">
        <include name="**/*Test.java"/>
      </fileset>
    </copy>
  </target>

  <!-- ====================================================================== -->
  <!-- Run all tests                                                          -->
  <!-- ====================================================================== -->

  <target name="test" 
          depends="junit-present, compile-tests" 
          if="junit.present" 
          description="Run the test cases">
    <mkdir dir="${maven.test.reports}"/>
    <junit printSummary="yes" haltonerror="false" haltonfailure="false" fork="true" dir=".">
      <sysproperty key="basedir" value="."/>
      <formatter type="xml"/>
      <formatter type="plain" usefile="false"/>
      <classpath>
        <path refid="build.test.classpath"/>
        <pathelement location="${maven.build.outputDir}"/>
        <pathelement location="${maven.build.testOutputDir}"/>
      </classpath>
      <batchtest todir="${maven.test.reports}">
        <fileset dir="${maven.build.testDir.0}">
          <include name="**/*Test.java"/>
          <exclude name="**/*Abstract*Test.java"/>
        </fileset>
      </batchtest>
    </junit>
  </target>

  <target name="test-junit-present">
    <available classname="junit.framework.Test" property="junit.present"/>
  </target>

  <target name="junit-present" 
          depends="test-junit-present" 
          unless="junit.present">
    <echo>=================================== WARNING ===================================</echo>
    <echo> Junit isn't present in your $ANT_HOME/lib directory. Tests not executed. </echo>
    <echo>===============================================================================</echo>
  </target>

  <!-- ====================================================================== -->
  <!-- Javadoc target                                                         -->
  <!-- ====================================================================== -->

  <target name="javadoc" description="Generates the Javadoc of the application">
    <javadoc sourcepath="${maven.build.srcDir.0}" 
             packagenames="*" 
             destdir="${maven.reporting.outputDirectory}/apidocs" 
             access="protected" 
             old="false" 
             verbose="false" 
             version="true" 
             use="true" 
             author="true" 
             splitindex="false" 
             nodeprecated="false" 
             nodeprecatedlist="false" 
             notree="false" 
             noindex="false" 
             nohelp="false" 
             nonavbar="false" 
             serialwarn="false" 
             charset="ISO-8859-1" 
             source="1.5" 
             linksource="true" 
             breakiterator="false"/>
  </target>

  <!-- ====================================================================== -->
  <!-- Package target                                                         -->
  <!-- ====================================================================== -->

  <target name="package" depends="compile,test" description="Package the application">
    <jar jarfile="${maven.build.dir}/${maven.build.finalName}.jar" 
         compress="true" 
         index="false" 
         basedir="${maven.build.outputDir}" 
         excludes="**/package.html"/>
  </target>

  <!-- ====================================================================== -->
  <!-- A dummy target for the package named after the type it creates         -->
  <!-- ====================================================================== -->

  <target name="jar" depends="package" description="Builds the jar for the application"/>

  <!-- ====================================================================== -->
  <!-- Download dependencies target                                           -->
  <!-- ====================================================================== -->

  <target name="test-offline">
    <condition property="maven.mode.offline">
      <equals arg1="${maven.settings.offline}" arg2="true"/>
    </condition>
  </target>

  <target name="get-deps" 
          depends="test-offline" 
          description="Download all dependencies" 
          unless="maven.mode.offline">
    <mkdir dir="${maven.repo.local}"/>
  </target>
</project>

--- NEW FILE: commons-net-maven-build.properties ---
#Generated by Maven Ant Plugin - DO NOT EDIT THIS FILE!
#Tue Nov 03 09:13:01 CET 2009
maven.settings.offline=false
maven.compile.target=1.5
maven.build.finalName=commons-net-2.0
maven.build.resourceDir.0=.
maven.build.testOutputDir=${maven.build.dir}/test-classes
maven.build.testResourceDir.0=src/test/java
maven.reporting.outputDirectory=${maven.build.dir}/site
maven.build.srcDir.0=src/main/java
project.build.directory=${maven.build.dir}
maven.test.reports=${maven.build.dir}/test-reports
commons.jira.pid=12310487
commons.binary.suffix=
maven.build.dir=target
commons.release.version=2.0
project.build.outputDirectory=${maven.build.outputDir}
maven.compile.source=1.5
maven.build.testDir.0=src/test/java
maven.settings.interactiveMode=true
maven.repo.local=.m2/repository
commons.componentid=net
maven.build.outputDir=${maven.build.dir}/classes
commons.jira.id=NET

--- NEW FILE: apache-commons-net.spec ---
# Copyright (c) 2000-2010, 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.
#

# If you don't want to build with maven, and use straight ant instead,
# give rpmbuild option '--without maven'

%define with()          %{expand:%%{?with_%{1}:1}%%{!?with_%{1}:0}}
%define without()       %{expand:%%{?with_%{1}:0}%%{!?with_%{1}:1}}
%define bcond_with()    %{expand:%%{?_with_%{1}:%%global with_%{1} 1}}
%define bcond_without() %{expand:%%{!?_without_%{1}:%%global with_%{1} 1}}

%bcond_without maven
%bcond_with gcj_support
%bcond_without repolib
%bcond_without tests

%define repodir %{_javadir}/repository.jboss.com/apache-%{base_name}/%{version}-brew
%define repodirlib %{repodir}/lib
%define repodirres %{repodir}/resources
%define repodirsrc %{repodir}/src

%if %with gcj_support
%define gcj_support 1
%else
%define gcj_support 0
%endif

%define base_name       net
%define short_name      commons-%{base_name}
%define section         free

Name:           apache-commons-net
Version:        2.0
Release:        2%{?dist}
Epoch:          0
Summary:        Apache Commons Net Package
License:        Apache Software License 2.0
Group:          Development/Libraries/Java
Url:            http://commons.apache.org/net/
Source0:        http://www.apache.org/dist/commons/net/source/commons-net-2.0-src.tar.gz
Source1:        %{name}-settings.xml
Source2:        %{name}-jpp-depmap.xml
Source3:        %{name}-component-info.xml
Source4:        commons-net-build.xml
Source5:        commons-net-maven-build.xml
Source6:        commons-net-maven-build.properties
Patch0:         commons-net-pom.patch
Patch1:         commons-net-FTP-compat.patch
BuildRequires:  jpackage-utils >= 0:5.0.0
BuildRequires:  java-devel >= 0:1.5.0
BuildRequires:  ant >= 0:1.7
%if ! %without tests
BuildRequires:  ant-junit
%endif
BuildRequires:  junit
BuildRequires:  java-javadoc
BuildRequires:  oro >= 2.0.8
%if %with maven
BuildRequires:  apache-commons-parent >= 0:12
BuildRequires:  maven2 >= 0:2.0.8
BuildRequires:  maven-surefire-maven-plugin
BuildRequires:  maven-surefire-provider-junit
BuildRequires:  maven2-plugin-antrun
BuildRequires:  maven2-plugin-assembly
BuildRequires:  maven2-plugin-compiler
BuildRequires:  maven2-plugin-idea
BuildRequires:  maven2-plugin-install
BuildRequires:  maven2-plugin-jar
BuildRequires:  maven2-plugin-javadoc
BuildRequires:  maven2-plugin-resources
BuildRequires:  maven2-default-skin
BuildRequires:  mojo-maven2-plugin-clirr
%endif

%if ! %{gcj_support}
BuildArch:      noarch
%endif
BuildRoot:      %{_tmppath}/%{name}-%{version}-buildroot
Provides:       %{short_name} = %{epoch}:%{version}-%{release}
Obsoletes:      %{short_name} < %{epoch}:%{version}-%{release}
Provides:       jakarta-%{short_name} = %{epoch}:%{version}-%{release}
Obsoletes:      jakarta-%{short_name} < %{epoch}:%{version}-%{release}
Requires(post):    jpackage-utils >= 0:5.0.0
Requires(postun):  jpackage-utils >= 0:5.0.0
Requires:       java >= 0:1.5.0
Requires:       apache-commons-parent >= 0:12
Requires:       oro >= 0:2.0.8
%if %{gcj_support}
BuildRequires:    java-gcj-compat-devel
Requires(post):   java-gcj-compat
Requires(postun): java-gcj-compat
%endif

%description
This is an Internet protocol suite Java library originally developed by
ORO, Inc.  This version supports Finger, Whois, TFTP, Telnet, POP3, FTP,
NNTP, SMTP, and some miscellaneous protocols like Time and Echo as well
as BSD R command support. The purpose of the library is to provide
fundamental protocol access, not higher-level abstractions. 

%if %with repolib
%package repolib
Summary:        Artifacts to be uploaded to a repository library
Group:          Development/Libraries/Java
Provides:       jakarta-%{short_name}-repolib = %{epoch}:%{version}-%{release}
Obsoletes:      jakarta-%{short_name}-repolib < %{epoch}:%{version}-%{release}
Provides:       %{short_name}-repolib = %{epoch}:%{version}-%{release}
Obsoletes:      %{short_name}-repolib < %{epoch}:%{version}-%{release}

%description repolib
Artifacts to be uploaded to a repository library.
This package is not meant to be installed but so its contents
can be extracted through rpm2cpio.
%endif

%package javadoc
Summary:        Javadoc for %{name}
Group:          Development/Documentation
Provides:       %{short_name}-javadoc = %{epoch}:%{version}-%{release}
Obsoletes:      %{short_name}-javadoc < %{epoch}:%{version}-%{release}
Provides:       jakarta-%{short_name}-javadoc = %{epoch}:%{version}-%{release}
Obsoletes:      jakarta-%{short_name}-javadoc < %{epoch}:%{version}-%{release}

%description javadoc
Javadoc for %{name}.

%if %with maven
%package manual
Summary:        Documents for %{name}
Group:          Development/Documentation
Provides:       %{short_name}-manual = %{epoch}:%{version}-%{release}
Obsoletes:      %{short_name}-manual < %{epoch}:%{version}-%{release}
Provides:       jakarta-%{short_name}-manual = %{epoch}:%{version}-%{release}
Obsoletes:      jakarta-%{short_name}-manual < %{epoch}:%{version}-%{release}

%description manual
%{summary}.
%endif

%prep
%setup -q -n %{short_name}-%{version}-src
# remove all binary libs
find . -name "*.jar" -exec rm -f {} \;
%patch0 -b .sav0
%patch1 -b .sav1
%{__perl} -pi \
    -e 's/\r$//g;' \
  PROPOSAL.html LICENSE.txt NOTICE.txt RELEASE-NOTES.txt
cp %{SOURCE4} build.xml
cp %{SOURCE5} maven-build.xml
cp %{SOURCE6} maven-build.properties

%if %with maven
cp -p %{SOURCE1} settings.xml
sed -i -e "s|<url>__JPP_URL_PLACEHOLDER__</url>|<url>file://`pwd`/.m2/repository</url>|g" settings.xml
sed -i -e "s|<url>__JAVADIR_PLACEHOLDER__</url>|<url>file://`pwd`/external_repo</url>|g" settings.xml
sed -i -e "s|<url>__MAVENREPO_DIR_PLACEHOLDER__</url>|<url>file://`pwd`/.m2/repository</url>|g" settings.xml
sed -i -e "s|<url>__MAVENDIR_PLUGIN_PLACEHOLDER__</url>|<url>file:///usr/share/maven2/plugins</url>|g" settings.xml
sed -i -e "s|<url>__ECLIPSEDIR_PLUGIN_PLACEHOLDER__</url>|<url>file:///usr/share/eclipse/plugins</url>|g" settings.xml

mkdir external_repo
ln -s %{_javadir} external_repo/JPP
%endif

%build
%if %with maven
export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository
mkdir -p ${MAVEN_REPO_LOCAL}
export MAVEN_OPTS="-Dmaven2.jpp.mode=true -Dmaven2.jpp.depmap.file=%{SOURCE2} -Dmaven.repo.local=${MAVEN_REPO_LOCAL} -Dmaven.test.failure.ignore=true"
%{_bindir}/mvn-jpp \
        -e \
        -s $(pwd)/settings.xml \
        install javadoc:javadoc site

%else
mkdir -p target/lib
ln -s %{_javadir}/oro.jar target/lib
ln -s %{_javadir}/junit.jar target/lib

%if %without tests
ant -Dnoget=true -Dfinal.name=commons-net-%{version} -Dj2se.api=%{_javadocdir}/java jar javadoc
%else
export OPT_JAR_LIST="ant/ant-junit junit"
ant -Dnoget=true -Dfinal.name=commons-net-%{version} -Dj2se.api=%{_javadocdir}/java jar test javadoc
%endif
%endif

%install
rm -rf $RPM_BUILD_ROOT

# jars
install -d -m 755 $RPM_BUILD_ROOT%{_javadir}
install -m 644 target/%{short_name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
%add_to_maven_depmap %{short_name} %{short_name} %{version} JPP %{short_name}
(cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}*; do ln -sf ${jar} `echo $jar| sed  "s|apache-||g"`; done)
(cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}*; do ln -sf ${jar} `echo $jar| sed  "s|-%{version}||g"`; done)

# pom
install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/maven2/poms
install -m 644 pom.xml \
    $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP-%{name}.pom

# javadoc
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
cp -pr target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
rm -rf target/site/apidocs
ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name} # ghost symlink
# manual
install -d -m 755 $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
cp LICENSE.txt $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
%if %with maven
install -d -m 755 $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/site
cp -pr target/site/* $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/site
%endif

%if %with repolib
%{__mkdir_p} %{buildroot}%{repodir}
%{__mkdir_p} %{buildroot}%{repodirlib}
%{__install} -m 0644 %{SOURCE3} %{buildroot}%{repodir}/component-info.xml
tag=`/bin/echo %{name}-%{version}-%{release} | %{__sed} 's|\.|_|g'`
%{__sed} -i "s/@TAG@/$tag/g" %{buildroot}%{repodir}/component-info.xml
%{__sed} -i "s/@VERSION@/%{version}-brew/g" %{buildroot}%{repodir}/component-info.xml
%{__mkdir_p} %{buildroot}%{repodirsrc}
#%{__install} -m 0644 %{PATCH0} %{buildroot}%{repodirsrc}/
%{__install} -m 0644 %{SOURCE0} %{buildroot}%{repodirsrc}/
%{__cp} -p %{buildroot}%{_javadir}/%{name}-%{version}.jar %{buildroot}%{repodirlib}/%{short_name}.jar
%endif

%if %{gcj_support}
%{_bindir}/aot-compile-rpm
%endif

%clean
rm -rf $RPM_BUILD_ROOT

%post
%update_maven_depmap
%if %{gcj_support}
if [ -x %{_bindir}/rebuild-gcj-db ]
then
  %{_bindir}/rebuild-gcj-db
fi
%endif

%postun
%update_maven_depmap
%if %{gcj_support}
if [ -x %{_bindir}/rebuild-gcj-db ]
then
  %{_bindir}/rebuild-gcj-db
fi
%endif

%files
%defattr(0644,root,root,0755)
%{_javadir}/*
%{_datadir}/maven2/poms/*
%{_mavendepmapfragdir}/*
%dir %{_docdir}/%{name}-%{version}
%doc %{_docdir}/%{name}-%{version}/LICENSE.txt
%if %{gcj_support}
%attr(-,root,root) %{_libdir}/gcj/%{name}
%endif

%files javadoc
%defattr(0644,root,root,0755)
%{_javadocdir}/%{name}-%{version}
%ghost %{_javadocdir}/%{name}

%if %with maven
%files manual
%defattr(0644,root,root,0755)
%doc %{_docdir}/%{name}-%{version}/site
%endif

%if %with repolib
%files repolib
%defattr(0644,root,root,0755)
%{_javadir}/repository.jboss.com
%endif

%changelog
* Thu Jun 17 2010 Ralph Apel <r.apel at r-apel.de> - 0:2.0-2
- Patch FTP.java to restore IMAGE_FILE_TYPE as synonym of BINARY_FILE_TYPE

* Wed Nov 18 2009 Ralph Apel <r.apel at r-apel.de> - 0:2.0-1
- 2.0
- rename to apache-commons-net
- build with maven2 by default

* Fri Aug 31 2007 Ralph Apel <r.apel at r-apel.de> - 0:1.4.1-4jpp
- Add oro Requires
- Add pom and depmap frags
- Make Vendor, Distribution based on macro

* Thu May 03 2007 Ralph Apel <r.apel at r-apel.de> - 0:1.4.1-3jpp
- Fix project_properties.patch to meet new plugins
- Add maven-plugin-* BRs

* Mon Feb 12 2007 Ralph Apel <r.apel at r-apel.de> - 0:1.4.1-2jpp
- Add gcj_support
- Tests optional when building without maven

* Mon May 08 2006 Ralph Apel <r.apel at r-apel.de> - 0:1.4.1-1jpp
- Upgrade to 1.4.1
- First JPP-1.7 release
- Add -manual subpackage
- Build with maven by default
- Optionally build with straight ant

* Sat Nov 13 2004 Ville Skyttä <scop at jpackage.org> - 0:1.2.2-3jpp
- BuildRequire ant-junit, thanks to Nicolas Mailhot for the catch.
- Crosslink with local J2SE API docs, remove extra api/ from javadoc dir.

* Sun Aug 23 2004 Randy Watler <rwatler at finali.com> - 0:1.2.2-2jpp
- Rebuild with ant-1.6.2

* Sun Jun 27 2004 Kaj J. Niemi <kajtzu at fi.basen.net> 0:1.2.2-1jpp
- Update to 1.2.2

* Tue Oct 28 2003 Henri Gomez <hgomez at users.sourceforge.net> 0:1.1.0-1jpp
- commons-net 1.1.0

* Tue May 06 2003 David Walluck <david at anti-microsoft.org> 0:1.0.0-3jpp
- update for JPackage 1.5

* Thu Feb 27 2003 Henri Gomez <hgomez at users.sourceforge.net> 1.0.0-2jpp
- fix ASF license and add packager tag

* Mon Feb 24 2003 Henri Gomez <hgomez at users.sourceforge.net> 1.0.0-1jpp
- 1.0.0
- initial release

--- NEW FILE: Makefile ---
# Makefile for source rpm: apache-commons-net
# $Id: Makefile,v 1.1 2010/09/05 21:23:34 jpackage Exp $
NAME := apache-commons-net
SPECFILE = $(firstword $(wildcard *.spec))

define find-makefile-common
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
endef

MAKEFILE_COMMON := $(shell $(find-makefile-common))

ifeq ($(MAKEFILE_COMMON),)
# attept a checkout
define checkout-makefile-common
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
endef

MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
endif

include $(MAKEFILE_COMMON)

--- NEW FILE: commons-net-FTP-compat.patch ---
--- src/main/java/org/apache/commons/net/ftp/FTP.java.sav	2010-06-17 19:23:36.987564785 +0200
+++ src/main/java/org/apache/commons/net/ftp/FTP.java	2010-06-17 19:24:26.101488694 +0200
@@ -124,6 +124,7 @@
      * indicate file types.
      ***/
     public static final int BINARY_FILE_TYPE = 2;
+    public static final int IMAGE_FILE_TYPE = 2;
 
     /***
      * A constant used to indicate the file(s) being transfered should

--- NEW FILE: sources ---
583630202369df3cf996cbdba4d8634b  commons-net-2.0-src.tar.gz

--- NEW FILE: commons-net-build.xml ---
<?xml version="1.0" encoding="UTF-8"?>

<!-- ====================================================================== -->
<!-- Ant build file (http://ant.apache.org/) for Ant 1.6.2 or above.        -->
<!-- ====================================================================== -->

<project name="commons-net" default="package" basedir=".">

  <!-- ====================================================================== -->
  <!-- Import maven-build.xml into the current project                        -->
  <!-- ====================================================================== -->

  <import file="maven-build.xml"/>
  
  <!-- ====================================================================== -->
  <!-- Help target                                                            -->
  <!-- ====================================================================== -->

  <target name="help">
    <echo message="Please run: $ant -projecthelp"/>
  </target>
</project>
--- NEW FILE: commons-net-pom.patch ---
--- pom.xml.sav	2009-11-03 09:31:18.000000000 +0100
+++ pom.xml	2009-11-03 09:31:41.000000000 +0100
@@ -218,6 +218,7 @@
 
 	<reporting>
 		<plugins>
+<!--
 			<plugin>
 				<groupId>org.apache.maven.plugins</groupId>
 				<artifactId>maven-changes-plugin</artifactId>
@@ -235,6 +236,7 @@
 					</reportSet>
 				</reportSets>
 			</plugin>
+-->
 			<plugin>
 				<groupId>org.codehaus.mojo</groupId>
 				<artifactId>clirr-maven-plugin</artifactId>




More information about the JPackage-commits mailing list