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

jpackage jpackage at ryu.zarb.org
Sat Sep 11 11:26:53 CEST 2010


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

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

--- NEW FILE: apache-commons-dbutils-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-dbutils" 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: apache-commons-dbutils-maven-build.properties ---
#Generated by Maven Ant Plugin - DO NOT EDIT THIS FILE!
#Fri Nov 06 16:56:44 CET 2009
maven.settings.offline=false
maven.build.finalName=commons-dbutils-1.2
maven.build.resourceDir.0=.
maven.build.testOutputDir=${maven.build.dir}/test-classes
maven.build.testResourceDir.0=src/test/resources
maven.reporting.outputDirectory=${maven.build.dir}/site
maven.build.srcDir.0=src/java
project.build.directory=${maven.build.dir}
maven.test.reports=${maven.build.dir}/test-reports
commons.jira.pid=12310470
commons.binary.suffix=
maven.build.dir=target
commons.release.version=1.2
project.build.outputDirectory=${maven.build.outputDir}
maven.build.testDir.0=src/test
maven.settings.interactiveMode=true
commons.rc.version=RC3
maven.repo.local=.m2/repository
commons.componentid=dbutils
maven.build.outputDir=${maven.build.dir}/classes
commons.jira.id=DBUTILS

--- NEW FILE: apache-commons-dbutils-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>urbanophile</groupId>
            <artifactId>java-getopt</artifactId>
            <version>1.0.9</version>
        </maven>
        <jpp>
            <groupId>JPP</groupId>
            <artifactId>gnu-getopt</artifactId>
            <version>1.0.13</version>
        </jpp>
    </dependency>
    <dependency>
        <maven>
            <groupId>net.sourceforge.findbugs</groupId>
            <artifactId>findbugs</artifactId>
            <version>1.3.2</version>
        </maven>
        <jpp>
            <groupId>JPP/findbugs/lib</groupId>
            <artifactId>findbugs</artifactId>
            <version>1.3.4</version>
        </jpp>
    </dependency>
    <dependency>
        <maven>
            <groupId>findbugs</groupId>
            <artifactId>bcel</artifactId>
            <version>5.2</version>
        </maven>
        <jpp>
            <groupId>JPP</groupId>
            <artifactId>bcel</artifactId>
            <version>5.1</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: apache-commons-dbutils-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/6/09 4:56 PM                       -->
<!-- See: http://maven.apache.org/plugins/maven-ant-plugin/                 -->
<!--                                                                        -->
<!-- ====================================================================== -->

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

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

  <property file="maven-build.properties"/>

  <property name="maven.build.finalName" value="commons-dbutils-1.2"/>
  <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/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"/>
  <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.4" 
           verbose="false" 
           fork="false" 
           source="1.4">
      <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.4" 
           verbose="false" 
           fork="false" 
           source="1.4">
      <src>
        <pathelement location="${maven.build.testDir.0}"/>
      </src>
      <classpath>
        <path refid="build.test.classpath"/>
        <pathelement location="${maven.build.outputDir}"/>
      </classpath>
    </javac>
  </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="true" haltonfailure="true" 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" 
             linksource="false" 
             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: Makefile ---
# Makefile for source rpm: apache-commons-dbutils
# $Id: Makefile,v 1.1 2010/09/11 09:26:50 jpackage Exp $
NAME := apache-commons-dbutils
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: apache-commons-dbutils-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: sources ---
915e39b5257b38287f4cc6e8ae401b89  commons-dbutils-1.2-src.tar.gz

--- NEW FILE: apache-commons-dbutils.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.
#

%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

%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 section free
%define short_name commons-dbutils
%define base_name dbutils

Name:           apache-commons-dbutils
Version:        1.2
Release:        2%{?dist}
Epoch:          0
Summary:        Apache Commons JDBC Utility Component
License:        Apache Software License 2.0
Group:          Development/Libraries/Java
URL:            http://commons.apache.org/dbutils/
Source0:        http://www.apache.org/dist/commons/dbutils/source/commons-dbutils-1.2-src.tar.gz
Source1:        %{name}-settings.xml
Source2:        %{name}-jpp-depmap.xml
Source3:        %{name}-component-info.xml
Source4:        %{name}-build.xml
Source5:        %{name}-maven-build.xml
Source6:        %{name}-maven-build.properties

Patch0:         apache-commons-dbutils-pom.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-buildroot

%if ! %{gcj_support}
BuildArch:      noarch
%endif

BuildRequires:  jpackage-utils >= 0:5.0.0
BuildRequires:  java-devel >= 0:1.6.0
BuildRequires:  ant >= 0:1.7
BuildRequires:  junit
BuildRequires:  java-javadoc
%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-checkstyle
BuildRequires:  maven2-plugin-compiler
BuildRequires:  maven2-plugin-idea
BuildRequires:  maven2-plugin-install
BuildRequires:  maven2-plugin-jar
BuildRequires:  maven2-plugin-javadoc
BuildRequires:  maven2-plugin-pmd
BuildRequires:  maven2-plugin-resources
BuildRequires:  maven2-default-skin
BuildRequires:  mojo-maven2-plugin-cobertura
%endif
Requires:       java >= 0:1.6.0
Requires:       apache-commons-parent >= 0:12
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
%if %{gcj_support}
BuildRequires:     java-gcj-compat-devel
Requires(post):    java-gcj-compat
Requires(postun):  java-gcj-compat
%endif

%description
DbUtils is a small set of classes designed to make working with JDBC
easier. JDBC resource cleanup code is mundane, error prone work so
these classes abstract out all of the cleanup tasks from your code
leaving you with what you really wanted to do with JDBC in the first
place: query and update data.

%if %with repolib
%package repolib
Summary:        Artifacts to be uploaded to a repository library
Group:          Development/Libraries/Java
Provides:       %{short_name}-repolib = %{epoch}:%{version}-%{release}
Obsoletes:      %{short_name}-repolib = %{epoch}:%{version}-%{release}
Provides:       jakarta-%{short_name}-repolib = %{epoch}:%{version}-%{release}
Obsoletes:      jakarta-%{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
%{summary}.

%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
%patch0 -b .sav0
%{__perl} -pi \
    -e 's/\r$//g;' \
  PROPOSAL.html LICENSE.txt NOTICE.txt RELEASE-NOTES.txt
cp -p %{SOURCE1} settings.xml

%if %with maven
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

%else
cp %{SOURCE4} build.xml
cp %{SOURCE5} maven-build.xml
cp %{SOURCE6} maven-build.properties
%endif

%build
export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository
mkdir -p ${MAVEN_REPO_LOCAL}
%if %with maven
export MAVEN_OPTS="-Dmaven2.jpp.mode=true -Dmaven2.jpp.depmap.file=%{SOURCE2} -Dmaven.repo.local=${MAVEN_REPO_LOCAL}"
%{_bindir}/mvn-jpp \
        -e \
        -s $(pwd)/settings.xml \
        install javadoc:javadoc site
%else
#export CLASSPATH=%(build-classpath jdbc-stdext)
ant \
  -Dmaven.mode.offline=true \
  jar javadoc
%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
ln -s %{name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar
ln -s %{name}-%{version}.jar \
  $RPM_BUILD_ROOT%{_javadir}/%{short_name}-%{version}.jar
ln -s %{short_name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{short_name}.jar
%add_to_maven_depmap %{short_name} %{short_name} %{version} JPP %{short_name}

# 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 -dm 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
cp -pR target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name}

# manual
install -dm 755 $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/site
install -m 644 LICENSE.txt $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
%if %with maven
rm -rf target/site/apidocs
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)
%doc %{_docdir}/%{name}-%{version}/LICENSE.txt
%{_javadir}/*.jar
%{_datadir}/maven2/poms/*
%{_mavendepmapfragdir}/*
%if %{gcj_support}
%attr(-,root,root) %{_libdir}/gcj/%{name}/%{name}-%{version}.jar.*
%endif

%files javadoc
%defattr(0644,root,root,0755)
%doc %{_javadocdir}/%{name}-%{version}
%doc %{_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
* Sat Sep 11 2010 Ralph Apel <r.apel at r-apel.de> - 0:1.2-2
- OK move it to free

* Fri Nov 27 2009 Ralph Apel <r.apel at r-apel.de> - 0:1.2-1
- 1.2
- rename to apache-commons-dbutils

* Thu Aug 30 2007 Ralph Apel <r.apel at r-apel.de> - 0:1.1-1jpp
- Upgrade to 1.1
- Add gcj_support option
- Add pom and depmap frags
- Make Vendor, Distribution based on macro
- Add manual subpackage when built with maven

* Wed May 17 2006 Ralph Apel <r.apel at r-apel.de> - 0:1.0-3jpp
- First JPP-1.7 release
- Build with maven by default
- Optionally build with straight ant
* Sun Aug 23 2004 Randy Watler <rwatler at finali.com> - 0:1.0-2jpp
- Rebuild with ant-1.6.2
* Sun Dec 14 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:1.0-1jpp
- First build.

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


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

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

--- NEW FILE: apache-commons-dbutils-pom.patch ---
--- pom.xml.sav0	2009-03-15 20:04:25.000000000 +0100
+++ pom.xml	2009-11-28 09:49:20.000000000 +0100
@@ -223,6 +223,7 @@
 
   <reporting>
     <plugins>
+<!--
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-changes-plugin</artifactId>
@@ -239,6 +240,8 @@
           </reportSet>
         </reportSets>
       </plugin>
+-->
+<!--
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-checkstyle-plugin</artifactId>
@@ -257,6 +260,7 @@
           <effort>Default</effort>
        </configuration>
       </plugin>
+-->
       <plugin>
         <groupId>org.codehaus.mojo</groupId>
         <artifactId>cobertura-maven-plugin</artifactId>




More information about the JPackage-commits mailing list