98 lines
3.2 KiB
RPMSpec
98 lines
3.2 KiB
RPMSpec
%bcond_without buildtex
|
|
%global jarname rabbitmq-client
|
|
%global failjava true
|
|
%global failjunit no
|
|
Name: rabbitmq-java-client
|
|
Version: 3.6.5
|
|
Release: 3
|
|
Summary: Java Advanced Message Queue Protocol client library
|
|
License: Apache-2.0 and GPL-2.0-or-later and MPL-1.1
|
|
URL: http://www.rabbitmq.com/java-client.html
|
|
Source0: https://github.com/rabbitmq/rabbitmq-java-client/archive/refs/tags/rabbitmq_v3_6_5.tar.gz
|
|
Source1: https://github.com/rabbitmq/rabbitmq-codegen/archive/refs/tags/rabbitmq_v3_6_5.zip
|
|
BuildArch: noarch
|
|
BuildRequires: maven-local mvn(commons-cli:commons-cli) mvn(commons-io:commons-io) mvn(junit:junit)
|
|
BuildRequires: ant ant-junit java-headless python3-devel >= 2.6 python3-simplejson
|
|
%if 0%{?with buildtex}
|
|
BuildRequires: texi2html texlive-base
|
|
%endif
|
|
BuildRequires: rabbitmq-server hostname procps-ng
|
|
Suggests: rabbitmq-server
|
|
Suggests: activemq
|
|
%description
|
|
The library allows Java code to interface to AMQP servers.
|
|
Please see the specification page for more information on AMQP
|
|
inter-operation and standards-conformance
|
|
You will need an AMQP server, such as our very own RabbitMQ server,
|
|
to use with the client library.
|
|
|
|
%package doc
|
|
Summary: Documentation for %{name}
|
|
Requires: %{name} = %{version}-%{release}
|
|
%description doc
|
|
This package contains additional documentation for %{name}.
|
|
|
|
%package javadoc
|
|
Summary: Javadoc for %{name}
|
|
%description javadoc
|
|
This package contains javadoc for %{name}.
|
|
|
|
%prep
|
|
%setup -q -n %{name}-rabbitmq_v3_6_5
|
|
cp %{SOURCE1} .
|
|
unzip rabbitmq_v3_6_5.zip
|
|
mv rabbitmq-codegen-rabbitmq_v3_6_5 codegen
|
|
find . -name "*.bat" -delete
|
|
find . -name "*.class" -delete
|
|
find . -name "*.jar" -print -delete
|
|
rm Makefile
|
|
ln -sf $(build-classpath commons-cli) lib/
|
|
ln -sf $(build-classpath commons-io) lib/
|
|
ln -sf $(build-classpath junit) lib/
|
|
sed -i "s|, bundlor.do||" build.xml
|
|
sed -i "s|, test-bundlor.do||" build.xml
|
|
sed -i 's,\(\"haltOnFailureJunit\" value=\"\).*\",\1%{failjunit}\",' build.xml
|
|
sed -i 's,\(\"haltOnFailureJava\" value=\"\).*\",\1%{failjava}\",' build.xml
|
|
%mvn_file com.rabbitmq:amqp-client %{name} %{jarname} amqp-client
|
|
|
|
%build
|
|
%ant -Dimpl.version=%{version} -Dpython.bin=%{__python3} maven-bundle
|
|
cd doc/channels
|
|
%if 0%{?with buildtex}
|
|
find . -name \*.tex -print -exec 'texi2html {} ; pdflatex {}' \; -delete
|
|
%endif
|
|
find . -not -name channels.\* -delete
|
|
|
|
%install
|
|
%mvn_artifact build/bundle/amqp-client-%{version}.pom build/bundle/amqp-client-%{version}.jar
|
|
%mvn_install -J build/doc/api
|
|
|
|
%check
|
|
ant test-jar
|
|
ant test-server
|
|
export RABBITMQ_LOG_BASE=.
|
|
export RABBITMQ_MNESIA_BASE=.
|
|
%{_prefix}/lib/rabbitmq/bin/rabbitmq-server start -detached
|
|
pgrep -cf rabbitmq_server && ant test-client
|
|
pkill -f rabbitmq_server ||:
|
|
|
|
%files -f .mfiles
|
|
%license LICENSE*
|
|
%doc README*
|
|
|
|
%files doc
|
|
%doc doc/*
|
|
|
|
%files javadoc -f .mfiles-javadoc
|
|
%license LICENSE*
|
|
|
|
%changelog
|
|
* Mon Nov 14 2022 Ge Wang <wangge20@h-partners.com> - 3.6.5-3
|
|
- bring source file into correspondence with described in spec file
|
|
|
|
* Tue Oct 27 2020 Anan Fu <fuanan3@huawei.com> - 3.6.5-2
|
|
- disable python2 module
|
|
|
|
* Wed Aug 26 2020 shaoqiang kang <kangshaoqiang1@huawei.com> - 3.6.5-1
|
|
- Package init
|