Matt Wringe 9c5033f
# Copyright (c) 2000-2005, JPackage Project
Matt Wringe 9c5033f
# All rights reserved.
Matt Wringe 9c5033f
#
Matt Wringe 9c5033f
# Redistribution and use in source and binary forms, with or without
Matt Wringe 9c5033f
# modification, are permitted provided that the following conditions
Matt Wringe 9c5033f
# are met:
Matt Wringe 9c5033f
#
Matt Wringe 9c5033f
# 1. Redistributions of source code must retain the above copyright
Matt Wringe 9c5033f
#    notice, this list of conditions and the following disclaimer.
Matt Wringe 9c5033f
# 2. Redistributions in binary form must reproduce the above copyright
Matt Wringe 9c5033f
#    notice, this list of conditions and the following disclaimer in the
Matt Wringe 9c5033f
#    documentation and/or other materials provided with the
Matt Wringe 9c5033f
#    distribution.
Matt Wringe 9c5033f
# 3. Neither the name of the JPackage Project nor the names of its
Matt Wringe 9c5033f
#    contributors may be used to endorse or promote products derived
Matt Wringe 9c5033f
#    from this software without specific prior written permission.
Matt Wringe 9c5033f
#
Matt Wringe 9c5033f
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
Matt Wringe 9c5033f
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
Matt Wringe 9c5033f
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
Matt Wringe 9c5033f
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
Matt Wringe 9c5033f
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
Matt Wringe 9c5033f
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
Matt Wringe 9c5033f
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
Matt Wringe 9c5033f
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
Matt Wringe 9c5033f
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
Matt Wringe 9c5033f
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
Matt Wringe 9c5033f
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Matt Wringe 9c5033f
#
Stanislav Ochotnicky b1568b7
%define __jar_repack %{nil}
Matt Wringe 9c5033f
Matt Wringe 9c5033f
Name:           modello
Stanislav Ochotnicky b1568b7
Version:        1.4
Stanislav Ochotnicky 3c1461b
Release:        2%{?dist}
Matt Wringe 9c5033f
Epoch:          0
Matt Wringe 9c5033f
Summary:        Modello Data Model toolkit
Stanislav Ochotnicky b1568b7
License:        MIT
Stanislav Ochotnicky b1568b7
Group:          Development/Libraries
Matt Wringe 9c5033f
URL:            http://modello.codehaus.org/
Stanislav Ochotnicky b1568b7
# svn export https://svn.codehaus.org/modello/tags/modello-1.4
Stanislav Ochotnicky b1568b7
# tar czf modello-1.4-src.tar.xz modello-1.4
Stanislav Ochotnicky b1568b7
Source0:        %{name}-%{version}-src.tar.xz
Matt Wringe 9c5033f
Source1:        modello.script
Matt Wringe 9c5033f
Stanislav Ochotnicky b1568b7
Source2:        %{name}-jpp-depmap.xml
Stanislav Ochotnicky b1568b7
Stanislav Ochotnicky b1568b7
Patch0:         0001-Use-public-function-for-component-lookup.patch
Matt Wringe 9c5033f
Matt Wringe 9c5033f
BuildArch:      noarch
Matt Wringe 9c5033f
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Matt Wringe 9c5033f
Matt Wringe 9c5033f
BuildRequires:  ant >= 0:1.6
Matt Wringe 9c5033f
BuildRequires:  jpackage-utils >= 0:1.7.2
Matt Wringe 9c5033f
BuildRequires:  maven2 >= 2.0.4-9
Stanislav Ochotnicky b1568b7
BuildRequires:  maven-assembly-plugin
Stanislav Ochotnicky b1568b7
BuildRequires:  maven-compiler-plugin
Stanislav Ochotnicky b1568b7
BuildRequires:  maven-install-plugin
Stanislav Ochotnicky b1568b7
BuildRequires:  maven-jar-plugin
6039ba0
BuildRequires:  maven-javadoc-plugin
Stanislav Ochotnicky b1568b7
BuildRequires:  maven-resources-plugin
Stanislav Ochotnicky b1568b7
BuildRequires:  maven-surefire-maven-plugin
6039ba0
BuildRequires:  maven-site-plugin
6039ba0
BuildRequires:  maven-surefire-provider-junit
Stanislav Ochotnicky b1568b7
BuildRequires:  maven-dependency-plugin
Stanislav Ochotnicky b1568b7
BuildRequires:  maven-plugin-plugin
6039ba0
BuildRequires:  maven-shared-reporting-impl
Stanislav Ochotnicky b1568b7
BuildRequires:  maven-shared-invoker
Matt Wringe 9c5033f
BuildRequires:  classworlds >= 0:1.1
Matt Wringe 9c5033f
BuildRequires:  plexus-container-default
Matt Wringe 9c5033f
BuildRequires:  plexus-utils
Matt Wringe 9c5033f
BuildRequires:  plexus-velocity
Matt Wringe 9c5033f
BuildRequires:  velocity
6039ba0
BuildRequires:  maven-doxia
6039ba0
BuildRequires:  maven-doxia-sitetools
6039ba0
BuildRequires:  maven-doxia-tools
6039ba0
BuildRequires:  plexus-build-api
Stanislav Ochotnicky b1568b7
BuildRequires:  ws-jaxme
Stanislav Ochotnicky b1568b7
BuildRequires:  xmlunit
Stanislav Ochotnicky b1568b7
BuildRequires:  jpa_api = 3.0
Stanislav Ochotnicky b1568b7
BuildRequires:  geronimo-parent-poms
Matt Wringe 9c5033f
Matt Wringe 9c5033f
Requires:       classworlds >= 0:1.1
Matt Wringe 9c5033f
Requires:       plexus-container-default
a79df6f
Requires:       plexus-build-api
Matt Wringe 9c5033f
Requires:       plexus-utils
Matt Wringe 9c5033f
Requires:       plexus-velocity
Matt Wringe 9c5033f
Requires:       velocity
Matt Wringe 9c5033f
Stanislav Ochotnicky b1568b7
Requires:          jpackage-utils
Stanislav Ochotnicky b1568b7
Requires(post):    jpackage-utils
Stanislav Ochotnicky b1568b7
Requires(postun):  jpackage-utils
Matt Wringe 9c5033f
Matt Wringe 9c5033f
Provides:       modello-maven-plugin = %{epoch}:%{version}-%{release}
Matt Wringe 9c5033f
Obsoletes:      modello-maven-plugin < 0:1.0-0.a8.3jpp
Matt Wringe 9c5033f
Matt Wringe 9c5033f
%description
Stanislav Ochotnicky b1568b7
Modello is a Data Model toolkit in use by the
Matt Wringe 9c5033f
http://maven.apache.org/maven2.
Stanislav Ochotnicky b1568b7
It all starts with the Data Model. Once a data model is defined,
Stanislav Ochotnicky b1568b7
the toolkit can be used to generate any of the following at compile
Matt Wringe 9c5033f
time.
Matt Wringe 9c5033f
Java POJOs of the model.
Matt Wringe 9c5033f
Java POJOs to XML Writer (provided via xpp3 or dom4j).
Matt Wringe 9c5033f
XML to Java Pojos Reader (provided via xpp3 or dom4j).
Matt Wringe 9c5033f
XDoc documentation of the data model.
Matt Wringe 9c5033f
Java model to [Prevayler|http://www.prevayler.org/] Store.
Matt Wringe 9c5033f
Java model to [JPOX|http://www.jpox.org/] Store.
Matt Wringe 9c5033f
Java model to [JPOX|http://www.jpox.org/] Mapping.
Matt Wringe 9c5033f
Matt Wringe 9c5033f
Matt Wringe 9c5033f
%package javadoc
Matt Wringe 9c5033f
Summary:        Javadoc for %{name}
Stanislav Ochotnicky b1568b7
Group:          Documentation
Stanislav Ochotnicky b1568b7
Requires:       jpackage-utils
Matt Wringe 9c5033f
Matt Wringe 9c5033f
%description javadoc
Stanislav Ochotnicky b1568b7
API documentation for %{name}.
Matt Wringe 9c5033f
Matt Wringe 9c5033f
%prep
Stanislav Ochotnicky b1568b7
%setup -q -n %{name}-%{version}
Matt Wringe 9c5033f
Stanislav Ochotnicky b1568b7
# fix test compilation failure with new plexus-containers
Stanislav Ochotnicky b1568b7
# not really needed now because we are skipping tests for other
Stanislav Ochotnicky b1568b7
# problems...
Stanislav Ochotnicky b1568b7
%patch0 -p1
Matt Wringe 9c5033f
Matt Wringe 9c5033f
Matt Wringe 9c5033f
%build
Matt Wringe 9c5033f
Matt Wringe 9c5033f
export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository
Matt Wringe 9c5033f
mkdir -p $MAVEN_REPO_LOCAL
Matt Wringe 9c5033f
Stanislav Ochotnicky b1568b7
# skip tests because we have too old xmlunit in Fedora now (1.0.8)
Matt Wringe 9c5033f
mvn-jpp \
Matt Wringe 9c5033f
        -e \
Andrew Overholt a9bb07f
        -Dmaven.repo.local=$MAVEN_REPO_LOCAL \
Andrew Overholt a9bb07f
        -Dmaven2.jpp.depmap.file=%{SOURCE2} \
6039ba0
        -Dmaven.test.skip=true \
Stanislav Ochotnicky b1568b7
        install javadoc:aggregate
Matt Wringe 9c5033f
Matt Wringe 9c5033f
%install
Matt Wringe 9c5033f
rm -rf $RPM_BUILD_ROOT
Matt Wringe 9c5033f
Matt Wringe 9c5033f
# poms
Stanislav Ochotnicky b1568b7
install -d -m 755 $RPM_BUILD_ROOT%{_mavenpomdir}
Matt Wringe 9c5033f
for i in `find . -name pom.xml | grep -v \\\./pom.xml`; do
Stanislav Ochotnicky b1568b7
        cp -p $i $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.`basename \`dirname $i\``.pom
Matt Wringe 9c5033f
done
Matt Wringe 9c5033f
Matt Wringe 9c5033f
# Depmap fragments
Matt Wringe 9c5033f
for i in `find . -name pom.xml | grep -v \\\./pom.xml |  grep -v modello-plugins-sandbox`; do
Matt Wringe 9c5033f
    # i is in format ..../artifactid/pom.xml
Matt Wringe 9c5033f
    artifactname=`basename \`dirname $i\` | sed -e s:^modello-::g`
Matt Wringe 9c5033f
Stanislav Ochotnicky b1568b7
    %add_to_maven_depmap org.codehaus.modello modello-$artifactname %{version} JPP/%{name} $artifactname
Matt Wringe 9c5033f
done
Matt Wringe 9c5033f
Stanislav Ochotnicky b1568b7
cp -p pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.modello-modello.pom
Stanislav Ochotnicky b1568b7
%add_to_maven_depmap org.codehaus.modello modello %{version} JPP/%{name} modello
Matt Wringe 9c5033f
Matt Wringe 9c5033f
# script
Matt Wringe 9c5033f
install -d -m 755 $RPM_BUILD_ROOT%{_bindir}
Matt Wringe 9c5033f
install -m 755 %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/%{name}
Matt Wringe 9c5033f
Matt Wringe 9c5033f
# jars
6039ba0
Matt Wringe 9c5033f
install -d -m 755 $RPM_BUILD_ROOT%{_javadir}/%{name}
Stanislav Ochotnicky b1568b7
for jar in $(find -type f -name "*-%{version}.jar" | grep -E target/.*.jar); do
Matt Wringe 9c5033f
        install -m 644 $jar $RPM_BUILD_ROOT%{_javadir}/%{name}/`basename $jar |sed -e s:modello-::g`
Matt Wringe 9c5033f
done
Matt Wringe 9c5033f
Stanislav Ochotnicky b1568b7
(cd $RPM_BUILD_ROOT%{_javadir}/%{name} && for jar in *-%{version}*; do ln -sf ${jar} `echo $jar| sed  "s|-%{version}||g"`; done)
Matt Wringe 9c5033f
Matt Wringe 9c5033f
# javadoc
Matt Wringe 9c5033f
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
Stanislav Ochotnicky b1568b7
cp -pr target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
Stanislav Ochotnicky b1568b7
(cd $RPM_BUILD_ROOT%{_javadocdir} && ln -sf %{name}-%{version} %{name})
Matt Wringe 9c5033f
Matt Wringe 9c5033f
%clean
Matt Wringe 9c5033f
rm -rf $RPM_BUILD_ROOT
Matt Wringe 9c5033f
Matt Wringe 9c5033f
%post
Matt Wringe 9c5033f
%update_maven_depmap
Matt Wringe 9c5033f
Matt Wringe 9c5033f
%postun
Matt Wringe 9c5033f
%update_maven_depmap
Matt Wringe 9c5033f
Matt Wringe 9c5033f
%files
Matt Wringe 9c5033f
%defattr(-,root,root,-)
Stanislav Ochotnicky b1568b7
%{_mavenpomdir}/*
Matt Wringe 9c5033f
%{_javadir}/%{name}
Stanislav Ochotnicky b1568b7
%{_bindir}/*
Stanislav Ochotnicky b1568b7
%config(noreplace) %{_mavendepmapfragdir}/*
Matt Wringe 9c5033f
Matt Wringe 9c5033f
%files javadoc
Matt Wringe 9c5033f
%defattr(-,root,root,-)
Stanislav Ochotnicky b1568b7
%{_javadocdir}/%{name}-%{version}
Stanislav Ochotnicky b1568b7
%{_javadocdir}/%{name}
Matt Wringe 9c5033f
Matt Wringe 9c5033f
%changelog
Stanislav Ochotnicky 3c1461b
* Thu Aug 26 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 0:1.4-2
Stanislav Ochotnicky 3c1461b
- Remove dtdparser BR/R
Stanislav Ochotnicky 3c1461b
Stanislav Ochotnicky b1568b7
* Tue Jul 20 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 0:1.4-1
Stanislav Ochotnicky b1568b7
- Update to latest upstream version
Stanislav Ochotnicky b1568b7
- Re-enable javadoc generation
Stanislav Ochotnicky b1568b7
- Remove old workarounds/patches
Stanislav Ochotnicky b1568b7
a79df6f
* Mon May 24 2010 Yong Yang <yyang@redhat.com> 1.1-2
a79df6f
- Fix JPP pom name
74d032e
- Disable javadoc:javadoc due to the failure of maven-doxia
a79df6f
0b3d285
* Mon May 24 2010 Yong Yang <yyang@redhat.com> 1.1-1
0b3d285
- Upgrade to 1.1
0b3d285
6039ba0
* Fri May 21 2010 Yong Yang <yyang@redhat.com> 1.0.1-1
6039ba0
- Upgrade to 1.0.1
6039ba0
Andrew Overholt a9bb07f
* Thu Aug 20 2009 Andrew Overholt <overholt@redhat.com> 1.0-0.4.a15.0.1
Andrew Overholt a9bb07f
- Update to alpha 15 courtesy Deepak Bhole
Andrew Overholt a9bb07f
4a53ee1
* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.0-0.3.a8.4.4
4a53ee1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
4a53ee1
9b6761f
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.0-0.2.a8.4.4
9b6761f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
9b6761f
95fe85e
* Wed Jul  9 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 0:1.0-0.1.a8.4.4
95fe85e
- drop repotag
95fe85e
Matt Wringe c85c877
* Tue Mar 20 2007 Matt Wringe <wringe@redhat.com> 0:1.0-0.1.a8.4jpp.3
Matt Wringe c85c877
- disable gcj support
Matt Wringe c85c877
Matt Wringe 9c5033f
* Tue Mar 13 2007 Matt Wringe <mwringe@redhat.com> 0:1.0-0.1.a8.4jpp.2
Matt Wringe 9c5033f
- Change license to MIT to reflex the actual license specified in the
Matt Wringe 9c5033f
  source headers.
Stanislav Ochotnicky b1568b7
- fix various rpmlint issues
Matt Wringe 9c5033f
Matt Wringe 9c5033f
* Mon Feb 26 2007 Tania Bento <tbento@redhat.com> 0:1.0-0.1.a8.4jpp.1
Matt Wringe 9c5033f
- Fixed %%Release.
Matt Wringe 9c5033f
- Fixed %%License.
Matt Wringe 9c5033f
- Fixed %%BuildRoot.
Matt Wringe 9c5033f
- Removed %%Vendor.
Matt Wringe 9c5033f
- Removed %%Distribution.
Matt Wringe 9c5033f
- Defined _with_gcj_support and gcj_support.
Matt Wringe 9c5033f
- Fixed instructions on how to generate the source drop.
Matt Wringe 9c5033f
Matt Wringe 9c5033f
* Fri Dec 01 2006 Deepak Bhole <dbhole@redhat.com> 1.0-0.a8.4jpp
Matt Wringe 9c5033f
- Added an obsoletes for older versions of the plugin
Matt Wringe 9c5033f
Matt Wringe 9c5033f
* Thu Oct 19 2006 Deepak Bhole <dbhole@redhat.com> 1.0-0.a8.3jpp
Matt Wringe 9c5033f
- Update for maven2 9jpp
Matt Wringe 9c5033f
- Merge maven-plugin subpackage into the main one
Matt Wringe 9c5033f
Matt Wringe 9c5033f
* Mon Sep 11 2006 Ralph Apel <r.apel at r-apel.de> - 0:1.0-0.a8.2jpp
Matt Wringe 9c5033f
- Add gcj_support option
Matt Wringe 9c5033f
- Add post/postun Requires for javadoc
Matt Wringe 9c5033f
- Don't omit maven-plugin upload
Matt Wringe 9c5033f
Matt Wringe 9c5033f
* Fri Jun 23 2006 Deepak Bhole <dbhole@redhat.com> - 0:1.0-0.a8.1jpp
Matt Wringe 9c5033f
- Upgrade to 1.0-alpha-8
Matt Wringe 9c5033f
- Remove ant build, add maven2 build
Matt Wringe 9c5033f
Matt Wringe 9c5033f
* Thu Jun 01 2006 Fernando Nasser <fnasser@redhat.com> - 0:1.0-0.a4.2jpp
Matt Wringe 9c5033f
- First JPP 1.7 build
Matt Wringe 9c5033f
Matt Wringe 9c5033f
* Mon Nov 07 2005 Ralph Apel <r.apel at r-apel.de> - 0:1.0-0.a4.1jpp
Matt Wringe 9c5033f
- First JPackage build
Matt Wringe 9c5033f