packages java-jgroups.spec
      Pages: < 1 >  DOWNLOAD      
Name:          java-jgroups
Version:       2.6.10.GA
Release:       2mamba
Summary:       A Framework for Group Communication in Java
Group:         Development/Libraries/Java
Vendor:        openmamba
Distribution:  openmamba
Packager:      gil <puntogil@...>
URL:           http://javagroups.sourceforge.net/
Source:        http://puzzle.dl.sourceforge.net/sourceforge/javagroups/JGroups-%{version}.src.zip
License:       LGPL
BuildRequires: apache-ant
BuildRequires: apache-ant-junit
BuildRequires: apache-geronimo-1.2-specs
BuildRequires: apache-log4j
BuildRequires: jakarta-commons-logging
BuildRequires: java-concurrent
BuildRequires: java-bouncycastle
BuildRequires: java-bsh
BuildRequires: java-junit3
BuildRequires: java-mx4j
BuildRequires: xalan-j2
Requires:      apache-geronimo-1.2-specs
Requires:      apache-log4j
Requires:      jakarta-commons-logging
Requires:      java-bouncycastle
Requires:      java-bsh
Requires:      java-concurrent
Requires:      java-junit3
Requires:      xalan-j2
BuildRoot:     %{_tmppath}/%{name}-%{version}-root

%description
JGroups is a toolkit for reliable multicast communication. (Note that
this doesn't necessarily mean IP Multicast, JGroups can also use
transports such as TCP). It can be used to create groups of processes
whose members can send messages to each other.

The main features include

* Group creation and deletion. Group members can be spread across LANs or WANs
* Joining and leaving of groups
* Membership detection and notification about joined/left/crashed members
* Detection and removal of crashed members
* Sending and receiving of member-to-group messages (point-to-multipoint)
* Sending and receiving of member-to-member messages (point-to-point)

%package        javadoc
Group:          Documentation
Summary:        Javadoc for %{name}

%description    javadoc
Reliable group communication based on IP multicast and
configurable protocol stack

This package contains Javadoc for %{name}.

#%package        source
#Group:          Development/Languages
#Summary:        %{name} sources.

#%description    source
#Reliable group communication based on IP multicast and
#configurable protocol stack

#This package contains %{name} sources.

%package	manual
Group:          Documentation
Summary:	Documents for %{name}

%description	manual
Reliable group communication based on IP multicast and
configurable protocol stack

This package contains documents for %{name}

%prep

%setup -q -n JGroups-%{version}.src

for j in $(find . -name "*.jar"); do
	mv $j $j.no
done

pushd lib
	ln -sf $(build-classpath ant) ant.jar
	ln -sf $(build-classpath ant/ant-junit) ant-junit.jar
	ln -sf $(build-classpath ant-launcher) ant-launcher.jar
	ln -sf $(build-classpath xalan-j2) xalan.jar
	ln -sf $(build-classpath bsh) bsh-1.2b3.jar
	ln -sf $(build-classpath bcprov) bcprov-1.39.jar
	ln -sf $(build-classpath junit-3.8.2) junit.jar
	ln -sf $(build-classpath xalan-j2-serializer) serializer.jar
	ln -sf $(build-classpath geronimo/jms-1.1-api-1.1) jms.jar
	ln -sf $(build-classpath log4j) log4j.jar
	ln -sf $(build-classpath jakarta-commons-logging) commons-logging.jar
	ln -sf $(build-classpath mx4j/mx4j-jmx) .
	ln -sf $(build-classpath concurrent) .
popd

%build

export CLASSPATH=$CLASSPATH:$(build-classpath xalan-j2 xalan-j2-serializer bcprov junit-3.8.2 ant-launcher ant/ant-junit)

ant \
	jar javadoc gossip-service jgroups-service

#export ANT_OPTS="-Djava.net.preferIPv4Stack=true"
#ant \
#	jar javadoc gossip-service jgroups-service unittests-xml testreport

%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"

mkdir -p %{buildroot}%{_javadir}
mkdir -p %{buildroot}%{_datadir}/maven2/poms

install -p -m 644 dist/jgroups-all.jar \
	%{buildroot}%{_javadir}/jgroups-all-%{version}.jar

install -p -m 644 dist/jgroups-all.jar \
	%{buildroot}%{_javadir}/jgroups-%{version}.jar

install -p -m 644 dist/jgroups-core.jar \
	%{buildroot}%{_javadir}/jgroups-core-%{version}.jar

%add_to_maven_depmap jgroups jgroups %{version} JPP jgroups
%add_to_maven_depmap jgroups jgroups-all %{version} JPP jgroups-all
%add_to_maven_depmap jgroups jgroups-core %{version} JPP jgroups-core
install -m 644 jgroups-pom.xml %{buildroot}%{_datadir}/maven2/poms/JPP-jgroups.pom

(
	cd %{buildroot}%{_javadir}
	for jar in *-%{version}*; do
		ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`
	done
)

mkdir -p %{buildroot}%{_javadocdir}/jgroups-%{version}
cp -pr dist/javadoc/* %{buildroot}%{_javadocdir}/jgroups-%{version}
ln -sf jgroups-%{version} %{buildroot}%{_javadocdir}/jgroups

#mkdir -p %{buildroot}%{_sourcedir}/jgroups-%{version}
#install -p -m 644 dist/jgroups-sources.jar \
#	%{buildroot}%{_sourcedir}/jgroups-%{version}/

mkdir -p %{buildroot}%{_datadir}/jgroups-%{version}
install -m 644 dist/*.sar %{buildroot}%{_datadir}/jgroups-%{version}

%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"

%files
%defattr(-,root,root)
%{_javadir}/jgroups-%{version}.jar
%{_javadir}/jgroups.jar
%{_javadir}/jgroups-all-%{version}.jar
%{_javadir}/jgroups-all.jar
%{_javadir}/jgroups-core-%{version}.jar
%{_javadir}/jgroups-core.jar
%{_datadir}/jgroups-%{version}
%{_mavendepmapfragdir}
%{_datadir}/maven2/poms/*
%doc CREDITS LICENSE README

%files javadoc
%defattr(-,root,root)
%{_javadocdir}/jgroups-%{version}
%{_javadocdir}/jgroups

#%files source
#%defattr(-,root,root)
#%{_sourcedir}/jgroups-%{version}

%files manual
%defattr(-,root,root)
%doc doc/*

%changelog
* Thu Nov 25 2010 gil <puntogil@...> 2.6.10.GA-2mamba
- rebuilt devel

* Sun Jun 14 2009 gil <puntogil@...> 2.6.10.GA-1mamba
- package created by autospec