[Jpackage-commits] dist/sun-codemodel/devel .cvsignore, 1.1, 1.2 sources, 1.1, 1.2 sun-codemodel-2.0-jpp-depmap.xml, NONE, 1.1 sun-codemodel.spec, NONE, 1.1

jpackage jpackage at ryu.zarb.org
Wed May 28 21:51:07 CEST 2008


Update of /home/projects/jpackage/cvs/dist/sun-codemodel/devel
In directory ryu.zarb.org:/tmp/cvs-serv27664/devel

Modified Files:
	.cvsignore sources 
Added Files:
	sun-codemodel-2.0-jpp-depmap.xml sun-codemodel.spec 
Log Message:
Import from JPP 5.0

Index: .cvsignore
===================================================================
RCS file: /home/projects/jpackage/cvs/dist/sun-codemodel/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -C 2 -d -r1.1 -r1.2
*** .cvsignore	28 May 2008 19:50:49 -0000	1.1
--- .cvsignore	28 May 2008 19:51:05 -0000	1.2
***************
*** 0 ****
--- 1,2 ----
+ sun-codemodel-2.0.tar.gz
+ sun-codemodel-autogenerated-files.tar.gz

--- NEW FILE: sun-codemodel-2.0-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>

--- NEW FILE: sun-codemodel.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 codemodel

Summary:        Java source code generation library
Name:           sun-codemodel
Version:        2.0
Release:        1jpp
Epoch:          0
License:        CDDL
URL:            https://codemodel.dev.java.net/
Group:          Development/Libraries/Java
Vendor: %{?_vendorinfo:%{_vendorinfo}}%{!?_vendorinfo:%{_vendor}}
Distribution: %{?_distribution:%{_distribution}}%{!?_distribution:%{_vendor}}
Source0:        %{name}-%{version}.tar.gz
# svn export -r 69 https://codemodel.dev.java.net/svn/codemodel/trunk  sun-codemodel-2.0 --username guest

Source1:        sun-codemodel-autogenerated-files.tar.gz
Source2:        sun-codemodel-2.0-jpp-depmap.xml

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 >= 2.0.4-11
BuildRequires:  maven2-plugin-ant
BuildRequires:  maven2-plugin-compiler
BuildRequires:  maven2-plugin-install
BuildRequires:  maven2-plugin-jar
BuildRequires:  maven2-plugin-javadoc
BuildRequires:  maven2-plugin-resources
BuildRequires:  maven2-plugin-surefire
%endif

Requires:          java >= 0:1.5.0
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
Java source code generation library.

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

%description javadoc
%{summary}.

%if %{with_maven}
%package manual
Summary:        Documents for %{name}
Group:          Development/Documentation

%description manual
%{summary}.
%endif

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

%build
export JAVA_HOME=%{_jvmdir}/java-1.5.0
%if %{with_maven}
mkdir external_repo
ln -s %{_javadir} external_repo/JPP

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

cd codemodel
mvn-jpp \
        -e \
        -Dmaven2.jpp.depmap.file=%{SOURCE2} \
        -Dmaven.repo.local=$MAVEN_REPO_LOCAL \
        ant:ant install javadoc:javadoc

%else
export CLASSPATH=target/classes:target/test-classes
pushd %{bname}/%{bname}
ant -Dmaven.settings.offline=true -Dbuild.sysclasspath=only jar javadoc
popd
CLASSPATH=$CLASSPATH:$(pwd)/%{bname}/%{bname}/target/%{bname}-%{version}.jar
pushd %{bname}/%{bname}-annotation-compiler
ant -Dmaven.settings.offline=true -Dbuild.sysclasspath=only jar javadoc
popd
%endif

%install
rm -rf $RPM_BUILD_ROOT

# jars
mkdir -p $RPM_BUILD_ROOT%{_javadir}

install -m 644 %{bname}/%{bname}/target/%{bname}-%{version}.jar \
      $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
install -m 644 %{bname}/%{bname}-annotation-compiler/target/%{bname}-annotation-compiler-%{version}.jar \
      $RPM_BUILD_ROOT%{_javadir}/%{name}-annotation-compiler-%{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 %{bname} %{version} JPP %{name}-parent
%add_to_maven_depmap com.sun.codemodel %{bname} %{version} JPP %{name}
%add_to_maven_depmap com.sun.codemodel %{bname}-annotation-compiler %{version} JPP %{name}-annotation-compiler

# 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}-parent.pom
install -m 644 %{bname}/%{bname}/pom.xml \
    $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP-%{name}.pom
install -m 644 %{bname}/%{bname}-annotation-compiler/pom.xml \
    $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP-%{name}-annotation-compiler.pom

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

# manual
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
cp %{bname}/LICENSE.txt $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}

%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)
%doc %{_docdir}/%{name}-%{version}/LICENSE.txt
%{_javadir}/*.jar
%{_datadir}/maven2/poms/*
%{_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:2.0-1jpp
- First release


Index: sources
===================================================================
RCS file: /home/projects/jpackage/cvs/dist/sun-codemodel/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -C 2 -d -r1.1 -r1.2
*** sources	28 May 2008 19:50:49 -0000	1.1
--- sources	28 May 2008 19:51:05 -0000	1.2
***************
*** 0 ****
--- 1,2 ----
+ e25c5c4558944392079217ea6ced7b10  sun-codemodel-2.0.tar.gz
+ 2e1637534e9ed4843284e4465d10ffaf  sun-codemodel-autogenerated-files.tar.gz




More information about the JPackage-commits mailing list