Packager: Igor Vlasenko <viy@altlinux.ru>
BuildRequires: /proc
BuildRequires: jpackage-compat
%define version 0.4.0
%define name apache-abdera
# Copyright (c) 2000-2005, 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 want repolib package to be built,
# issue the following: 'rpmbuild --with repolib'
%define with_repolib %{?_with_repolib:1}%{!?_with_repolib:0}
%define without_repolib %{!?_with_repolib:1}%{?_with_repolib:0}
%define repodir %{_javadir}/repository.jboss.com/apache/abdera/0.4.0-brew
%define repodirlib %{repodir}/lib
%define repodirsrc %{repodir}/src
%define gcj_support 0
%define maven_settings_file %{_builddir}/%{name}/settings.xml
%define simple_name abdera
%define version_incubating 0.4.0-incubating
Name: apache-abdera
Version: 0.4.0
Release: alt1_3jpp6
Epoch: 0
Summary: An Open Source Atom Implementation
License: Apache Software License
Group: Development/Java
URL: http://abdera.apache.org/
Source0: %{name}-%{version}-src.tar.gz
# svn export http://svn.apache.org/repos/asf/abdera/java/tags/abdera-0.4.0-incubating/ apache-abdera-0.4.0
# tar zcf apache-abdera-0.4.0-src.tar.gz apache-abdera-0.4.0/
Source1: %{name}-settings.xml
Source2: %{name}-jpp-depmap.xml
Patch0: apache-abdera-pom_xml.patch
Patch1: apache-abdera-spring-pom_xml.patch
Patch2: apache-abdera-adapters-pom_xml.patch
# no htmlparser, no json
Patch3: apache-abdera-extensions-pom_xml.patch
Patch4: apache-abdera-bundle-pom_xml.patch
Patch5: apache-abdera-examples-pom_xml.patch
%if ! %{gcj_support}
BuildArch: noarch
%endif
BuildRequires: jpackage-utils >= 0:1.7.2
BuildRequires: concurrent
BuildRequires: dtdparser
BuildRequires: maven2 >= 2.0.4-10
BuildRequires: maven2-plugin-compiler
BuildRequires: maven2-plugin-install
BuildRequires: maven2-plugin-jar
BuildRequires: maven2-plugin-javadoc
BuildRequires: maven2-plugin-release
BuildRequires: maven2-plugin-resources
BuildRequires: maven2-plugin-remote-resources
BuildRequires: maven2-plugin-source
BuildRequires: maven-surefire-plugin
BuildRequires: maven2-plugin-surefire-report
BuildRequires: maven2-plugin-plugin
BuildRequires: maven-surefire
BuildRequires: maven-surefire-provider-junit4
BuildRequires: maven2-plugin-shade
BuildRequires: maven2-common-poms >= 1.0
BuildRequires: jakarta-commons-logging
BuildRequires: jakarta-commons-httpclient
BuildRequires: jakarta-commons-codec
#BuildRequires: plexus-velocity
#BuildRequires: plexus-resources
#BuildRequires: plexus-maven-plugin
BuildRequires: ws-commons-axiom
BuildRequires: wstx
BuildRequires: geronimo-specs
#BuildRequires: geronimo-stax-1.0-api
BuildRequires: stax_1_0_api
BuildRequires: xml-commons-apis
BuildRequires: jaxen
BuildRequires: xml-security
BuildRequires: xerces-j2
BuildRequires: junit4
BuildRequires: log4j
BuildRequires: ws-commons-axiom >= 0:1.2.4
BuildRequires: xerces-j2
BuildRequires: xml-commons-apis
BuildRequires: jaxen
BuildRequires: jaf_1_1_api
BuildRequires: servlet_2_4_api
BuildRequires: spring2-web
BuildRequires: aopalliance
#BuildRequires: gnu-crypto
BuildRequires: apache-ibatis-sqlmap
#BuildRequires: htmlparser
BuildRequires: objectweb-asm
Requires(post): jpackage-utils >= 0:1.7.2
Requires(postun): jpackage-utils >= 0:1.7.2
%if %{gcj_support}
BuildRequires: java-gcj-compat-devel
Requires(post): java-gcj-compat
Requires(postun): java-gcj-compat
%endif
%description
The goal of the Apache Abdera project is to build a functionally-complete,
high-performance implementation of the IETF Atom Syndication Format (RFC 4287)
and Atom Publishing Protocol (RFC 5023) specifications.
Abdera is an effort undergoing incubation at the Apache Software Foundation (ASF),
sponsored by the Apache Incubator PMC. Incubation is required of all newly accepted projects
until a further review indicates that the infrastructure, communications, and decision making process
have stabilized in a manner consistent with other successful ASF projects.
While incubation status is not necessarily a reflection of the completeness or stability of the code,
it does indicate that the project has yet to be fully endorsed by the ASF.
%if %{with_repolib}
%package repolib
Summary: Artifacts to be uploaded to a repository library
Group: Development/Java
%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 poms
Summary: Poms and depmap frags for %{name}
Group: Development/Java
%description poms
%{summary}.
%package adapters
Summary: Adapters module from %{name}
Group: Development/Java
Requires: %{name}-poms = %{epoch}:%{version}-%{release}
%description adapters
%{summary}.
%package bundle
Summary: Bundle module from %{name}
Group: Development/Java
Requires: %{name}-poms = %{epoch}:%{version}-%{release}
%description bundle
%{summary}.
%package client
Summary: Client module from %{name}
Group: Development/Java
Requires: %{name}-poms = %{epoch}:%{version}-%{release}
%description client
%{summary}.
#no pom for this module, not compiled by maven, weird
#%package contrib
#Summary: Contrib module from %{name}
#Group: Development/Libraries/Java
#Requires: %{name}-poms = %{epoch}:%{version}-%{release}
#%description contrib
#%{summary}.
%package core
Summary: Core module from %{name}
Group: Development/Java
Requires: %{name}-poms = %{epoch}:%{version}-%{release}
%description core
%{summary}.
%package dependencies
Summary: Dependencies module from %{name}
Group: Development/Java
Requires: %{name}-poms = %{epoch}:%{version}-%{release}
%description dependencies
%{summary}.
# doesn't contain distribution module in parent pom.xml
#%package distribution
#Summary: Distribution module from %{name}
#Group: Development/Libraries/Java
#Requires: %{name}-poms = %{epoch}:%{version}-%{release}
#%description distribution
#%{summary}.
%package examples
Summary: Examples module from %{name}
Group: Development/Java
Requires: %{name}-poms = %{epoch}:%{version}-%{release}
%description examples
%{summary}.
%package extensions
Summary: Extensions module from %{name}
Group: Development/Java
Requires: %{name}-poms = %{epoch}:%{version}-%{release}
%description extensions
%{summary}.
%package parser
Summary: Parser module from %{name}
Group: Development/Java
Requires: %{name}-poms = %{epoch}:%{version}-%{release}
%description parser
%{summary}.
%package security
Summary: Security module from %{name}
Group: Development/Java
Requires: %{name}-poms = %{epoch}:%{version}-%{release}
%description security
%{summary}.
%package server
Summary: Server module from %{name}
Group: Development/Java
Requires: %{name}-poms = %{epoch}:%{version}-%{release}
%description server
%{summary}.
%package spring
Summary: Spring module from %{name}
Group: Development/Java
Requires: %{name}-poms = %{epoch}:%{version}-%{release}
%description spring
%{summary}.
%prep
%setup -q
%patch0 -b .sav0
%patch1 -b .sav1
%patch2 -b .sav2
%patch3 -b .sav3
%patch4 -b .sav4
%patch5 -b .sav5
# replace org.junit.internal.runners.TextListener with org.junit.internal.TextListener in all TestSuite.java
find . -name TestSuite.java -exec sed -i "s|org.junit.internal.runners.TextListener|org.junit.internal.TextListener|g" {} \;
# no jetty
rm -rf examples/src/main/java/org/apache/abdera/examples/appserver
# rm couchdb4j.jar
rm -rf adapters/couchdb/repository
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
%build
export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository
mkdir -p $MAVEN_REPO_LOCAL
mkdir -p $MAVEN_REPO_LOCAL/bouncycastle/bcprov-jdk15/124/
ln -s %{_jvmdir}/java/jre/lib/rt.jar $MAVEN_REPO_LOCA$MAVEN_REPO_LOCAL/bouncycastle/bcprov-jdk15/124/bcprov-jdk15-124.jar
mvn-jpp \
-e \
-s $(pwd)/settings.xml \
-Dmaven2.jpp.mode=true \
-Dmaven.test.skip=true \
-Dmaven2.jpp.depmap.file=%{SOURCE2} \
-Dmaven.repo.local=$MAVEN_REPO_LOCAL \
install
%install
install -d -m 755 $RPM_BUILD_ROOT%{_javadir}/%{name}
install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/maven2/poms
install -m 644 pom.xml $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.apache-abdera-abdera.pom
%add_to_maven_depmap org.apache.%{simple_name} %{simple_name} %{version_incubating} JPP.%{name} %{simple_name}
# contrib \
# dependencies \
for module in adapters \
bundle \
client \
core \
distribution \
examples \
parser \
security \
server \
spring ; do
#jar
for j in $(find ./$module -name "*.jar"); do
install -pm 644 $j $RPM_BUILD_ROOT%{_javadir}/%{name}
done
%add_to_maven_depmap org.apache.%{simple_name} %{simple_name}-$module %{version_incubating} JPP.%{name} %{simple_name}-$module
#pom
install -m 644 $module/pom.xml \
$RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.%{name}-$module.pom
done
#dependencies module
pushd dependencies
%add_to_maven_depmap org.apache.%{simple_name} %{simple_name}-i18n %{version_incubating} JPP.%{name} %{simple_name}-i18n
for j in $(find . -name "*.jar"); do
install -pm 644 $j $RPM_BUILD_ROOT%{_javadir}/%{name}
done
install -m 644 i18n/pom.xml \
$RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.%{name}-i18n.pom
popd
# extensions module
pushd extensions
install -m 644 pom.xml $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.apache-abdera-extensions.pom
%add_to_maven_depmap org.apache.%{simple_name} %{simple_name}-extensions-parent %{version_incubating} JPP.%{name} %{simple_name}-extensions-parent
# html \
# json \
# media \
for module in gdata \
geo \
main \
oauth \
opensearch \
serializer \
sharing \
wsse ; do
#jar
for j in $(find ./$module -name "*.jar"); do
install -pm 644 $j $RPM_BUILD_ROOT%{_javadir}/%{name}
done
%add_to_maven_depmap org.apache.%{simple_name} %{simple_name}-extensions-$module %{version_incubating} JPP.%{name} %{simple_name}-extensions-$module
#pom
install -m 644 $module/pom.xml \
$RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.%{name}-extensions-$module.pom
done
popd
(cd $RPM_BUILD_ROOT%{_javadir}/%{name} && for jar in *-%{version}*; do ln -sf $jar `echo $jar| sed "s|-%{version}-incubating||g"`; done)
%if %{gcj_support}
%{_bindir}/aot-compile-rpm
%endif
%if %{with_repolib}
install -d -m 755 $RPM_BUILD_ROOT%{repodir}
install -d -m 755 $RPM_BUILD_ROOT%{repodirlib}
install -m 755 %{SOURCE2} $RPM_BUILD_ROOT%{repodir}/component-info.xml
install -d -m 755 $RPM_BUILD_ROOT%{repodirsrc}
install -m 755 %{SOURCE0} $RPM_BUILD_ROOT%{repodirsrc}
cp -p $RPM_BUILD_ROOT%{_javadir}/%{name}/*.jar $RPM_BUILD_ROOT%{repodirlib}
%endif
%files
%doc LICENSE README
#%dir %{_datadir}/%{name}-%{version}
%dir %{_javadir}/%{name}
#%{_javadir}/%{name}.jar
#%{_javadir}/%{name}-%{version}.jar
#%if %{gcj_support}
#%attr(-,root,root) %dir %{_libdir}/gcj/%{name}
#%attr(-,root,root) %{_libdir}/gcj/%{name}/*.jar.*
#%attr(-,root,root) %{_libdir}/gcj/%{name}/*.mar.*
#%endif
%files poms
%{_datadir}/maven2/poms/*
%{_mavendepmapfragdir}
%files adapters
%{_javadir}/%{name}/abdera-filesystem*.jar
%{_javadir}/%{name}/abdera-jdbc*.jar
%files bundle
%{_javadir}/%{name}/*abdera-bundle*.jar
%files client
%{_javadir}/%{name}/abdera-client*.jar
#%files contrib
#%defattr(0644,root,root,0755)
#%{_javadir}/%{name}/abdera-contrib*.jar
%files core
%{_javadir}/%{name}/abdera-core*.jar
%files dependencies
%{_javadir}/%{name}/abdera-i18n*.jar
#%files distribution
#%defattr(0644,root,root,0755)
#%{_javadir}/%{name}/abdera-distribution*.jar
%files examples
%{_javadir}/%{name}/abdera-examples*.jar
%files extensions
%{_javadir}/%{name}/abdera-extensions*.jar
%files parser
%{_javadir}/%{name}/abdera-parser*.jar
%files security
%{_javadir}/%{name}/abdera-security*.jar
%files server
%{_javadir}/%{name}/abdera-server*.jar
%files spring
%{_javadir}/%{name}/abdera-spring*.jar
%if %{with_repolib}
%files repolib
%{repodir}
%endif
%changelog
* Fri Sep 03 2010 Igor Vlasenko <viy@altlinux.ru> 0:0.4.0-alt1_3jpp6
- new version