[Jpackage-commits] dist/javatools-package-rename-task/devel .cvsignore, 1.1, 1.2 javatools-package-rename-task-jpp-depmap.xml, NONE, 1.1 javatools-package-rename-task.spec, NONE, 1.1 sources, 1.1, 1.2

jpackage jpackage at ryu.zarb.org
Wed May 28 20:33:34 CEST 2008


Update of /home/projects/jpackage/cvs/dist/javatools-package-rename-task/devel
In directory ryu.zarb.org:/tmp/cvs-serv29598/devel

Modified Files:
	.cvsignore sources 
Added Files:
	javatools-package-rename-task-jpp-depmap.xml 
	javatools-package-rename-task.spec 
Log Message:
Import from JPP 5.0

Index: .cvsignore
===================================================================
RCS file: /home/projects/jpackage/cvs/dist/javatools-package-rename-task/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -C 2 -d -r1.1 -r1.2
*** .cvsignore	28 May 2008 18:33:07 -0000	1.1
--- .cvsignore	28 May 2008 18:33:31 -0000	1.2
***************
*** 0 ****
--- 1,2 ----
+ javatools-package-rename-task-1.2-src.tar.gz
+ package-rename-task-autogenerated-files.tar.gz

Index: sources
===================================================================
RCS file: /home/projects/jpackage/cvs/dist/javatools-package-rename-task/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -C 2 -d -r1.1 -r1.2
*** sources	28 May 2008 18:33:07 -0000	1.1
--- sources	28 May 2008 18:33:32 -0000	1.2
***************
*** 0 ****
--- 1,2 ----
+ e5232c941d387de61134802c2a09aca2  javatools-package-rename-task-1.2-src.tar.gz
+ 1e25a9f810131200395a3009120160df  package-rename-task-autogenerated-files.tar.gz

--- NEW FILE: javatools-package-rename-task.spec ---
# Copyright (c) 2000-2008, 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 %{?_with_gcj_support:1}%{!?_with_gcj_support:%{?_without_gcj_support:0}%{!?_without_gcj_support:%{?_gcj_support:%{_gcj_support}}%{!?_gcj_support:0}}}

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

%define with_maven %{!?_without_maven:1}%{?_without_maven:0}
%define without_maven %{?_without_maven:1}%{!?_without_maven:0}

%define section free
%define bname package-rename-task
%define namedversion 1.2-SNAPSHOT

Summary:        Ant task to relocate code from one package tree to another
Name:           javatools-package-rename-task
Version:        1.2
Release:        1jpp
Epoch:          0
License:        CDDL
URL:            https://package-rename-task.dev.java.net/
Group:          Development/Libraries/Java
Vendor: %{?_vendorinfo:%{_vendorinfo}}%{!?_vendorinfo:%{_vendor}}
Distribution: %{?_distribution:%{_distribution}}%{!?_distribution:%{_vendor}}
Source0:        %{name}-%{version}-src.tar.gz
#  cvs -d :pserver:guest at cvs.dev.java.net:/cvs login
#  cvs -d :pserver:guest at cvs.dev.java.net:/cvs export -r HEAD package-rename-task
Source1:        javatools-package-rename-task-jpp-depmap.xml
Source2:        package-rename-task-autogenerated-files.tar.gz
BuildRequires:  jpackage-utils >= 0:1.7.4
BuildRequires:  java-devel = 0:1.5.0
BuildRequires:  ant >= 0:1.6.5
BuildRequires:  junit >= 0:3.8.1
%if %{with_maven}
BuildRequires:  maven2 >= 0:2.0.7
BuildRequires:  maven2-plugin-ant
BuildRequires:  maven2-plugin-compiler
BuildRequires:  maven2-plugin-install
BuildRequires:  maven2-plugin-jar
BuildRequires:  maven2-plugin-javadoc
BuildRequires:  maven2-plugin-plugin
BuildRequires:  maven2-plugin-resources
BuildRequires:  maven2-plugin-surefire
%endif
BuildRequires:  maven2-bootstrap >= 0:2.0.7

Requires:          java >= 0:1.5.0
Requires:          maven2-bootstrap >= 0:2.0.7
Requires(post):    jpackage-utils >= 0:1.7.4
Requires(postun):  jpackage-utils >= 0:1.7.4

%if ! %{gcj_support}
BuildArch:      noarch
%endif
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-buildroot

%if %{gcj_support}
BuildRequires:    gnu-crypto
BuildRequires:    java-gcj-compat-devel
Requires(post):   java-gcj-compat
Requires(postun): java-gcj-compat
%endif

%description
Ant task to relocate code from one package tree to another.

%package javadoc
Summary:        Javadoc for %{name}
Group:          Development/Documentation
Requires(post):   /bin/rm,/bin/ln
Requires(postun): /bin/rm

%description javadoc
%{summary}.

%prep
%setup -q -n %{bname}
for j in $(find . -name "*.jar"); do
    mv $j $j.no
done
mv %{bname}/build.xml %{bname}/test-build.xml
%if %{without_maven}
gzip -dc %{SOURCE2} | tar xf -
%endif

%build
cd %{bname}
%if %{with_maven}
mkdir external_repo
ln -s %{_javadir} external_repo/JPP

export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository
mkdir -p $MAVEN_REPO_LOCAL

mvn-jpp \
        -e \
        -Dmaven2.jpp.depmap.file=%{SOURCE1} \
        -Dmaven.repo.local=$MAVEN_REPO_LOCAL \
        ant:ant install javadoc:javadoc
ant -f test-build.xml
%else
export CLASSPATH=$(build-classpath \
maven2/plugin-api \
maven2/project \
)
CLASSPATH=$CLASSPATH:target/classes:target/test-classes
ant -Dmaven.settings.offline=true -Dbuild.sysclasspath=only jar test javadoc
ant -f test-build.xml
%endif

%install
rm -rf $RPM_BUILD_ROOT

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

install -d -m 755 ${RPM_BUILD_ROOT}%{_datadir}/maven2/plugins
pushd ${RPM_BUILD_ROOT}%{_datadir}/maven2/plugins
    ln -sf %{_javadir}/%{name}-%{version}.jar %{name}.jar
popd

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

# javadoc
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
cp -pr %{bname}/target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name} # ghost symlink

%if %{gcj_support}
export CLASSPATH=$(build-classpath gnu-crypto)
%{_bindir}/aot-compile-rpm
%endif

%clean
rm -rf $RPM_BUILD_ROOT

%post javadoc
rm -f %{_javadocdir}/%{name}
ln -s %{name}-%{version} %{_javadocdir}/%{name}

%postun javadoc
if [ "$1" = "0" ]; then
  rm -f %{_javadocdir}/%{name}
fi

%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}/%{name}.jar
%{_javadir}/%{name}-%{version}.jar
%{_datadir}/maven2
%{_mavendepmapfragdir}
%if %{gcj_support}
%dir %attr(-,root,root) %{_libdir}/gcj/%{name}
%attr(-,root,root) %{_libdir}/gcj/%{name}/%{name}-%{version}.jar.*
%endif

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

%changelog
* Tue Mar 11 2008 Ralph Apel <r.apel at r-apel.de> 0:1.2-1jpp
- First release


--- NEW FILE: javatools-package-rename-task-jpp-depmap.xml ---
<dependencies>
<!--
	<dependency>
	  <maven>
		<groupId>logkit</groupId>
		<artifactId>logkit</artifactId>
		<version>1.0.1</version>
	  </maven>
	  <jpp>
		<groupId>JPP</groupId>
		<artifactId>avalon-logkit</artifactId>
		<version>2.2.1</version>
	  </jpp>
	</dependency>
-->

</dependencies>




More information about the JPackage-commits mailing list