diff --git a/.gitignore b/.gitignore index 7ab3ca4..9f46977 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1 @@ /activemq-5.6.0.tar.xz -/apache-activemq-5.5.0-bin.tar.gz -/wlcg-patch.tgz -/apache-activemq-5.6.0-bin.tar.gz diff --git a/activemq.spec b/activemq.spec index f992512..846d39e 100644 --- a/activemq.spec +++ b/activemq.spec @@ -1,154 +1,210 @@ -Summary: Apache ActiveMQ -Name: activemq -Version: 5.6.0 -Release: 6%{?dist} -License: Apache -Group: Network/Daemons -Source0: http://mirrors.sonic.net/apache/activemq/apache-activemq/%{version}/apache-activemq-%{version}-bin.tar.gz -Source1: wlcg-patch.tgz -Source2: activemq.xml -Source3: jetty-realm.properties -Source4: jetty.xml -BuildRoot: %{_tmppath}/%{name}-%{version}-root -BuildArch: noarch -Requires: tanukiwrapper >= 3.2.0 +Name: activemq +Version: 5.6.0 +Release: 6%{?dist} +Summary: Open source messaging and Integration Patterns server +Group: Development/Libraries +License: ASL 2.0 +URL: http://activemq.apache.org +# git clone -b activemq-5.6.0 https://github.com/apache/activemq.git activemq-core-5.6.0 +# rm -rf activemq-core-5.6.0/.git +# tar cJf activemq-core-5.6.0.tar.xz activemq-core-5.6.0 +Source0: activemq-5.6.0.tar.xz + +BuildRequires: activeio +BuildRequires: activemq-protobuf +BuildRequires: derby +BuildRequires: geronimo-jta +BuildRequires: jasypt +BuildRequires: javacc-maven-plugin +BuildRequires: java-devel +BuildRequires: jettison +BuildRequires: jpackage-utils +BuildRequires: maven-clean-plugin +BuildRequires: maven-compiler-plugin +BuildRequires: maven-enforcer-plugin +BuildRequires: maven-gpg-plugin +BuildRequires: maven-idea-plugin +BuildRequires: maven-javadoc-plugin +BuildRequires: maven-plugin-cobertura +BuildRequires: maven-pmd-plugin +BuildRequires: maven-release-plugin +BuildRequires: maven-source-plugin +BuildRequires: maven-surefire-plugin +BuildRequires: maven-surefire-provider-junit4 +BuildRequires: maven-xbean-plugin +BuildRequires: springframework-jms + +# Required for /usr/share/java/activemq directory +Requires: activemq-protobuf + +Requires: java +Requires: jpackage-utils -#%define buildver 5.1.0 +BuildArch: noarch -%define homedir /usr/share/%{name} -%define libdir /var/lib/%{name} -%define libexecdir /usr/libexec/%{name} -%define cachedir /var/cache/%{name} -%define docsdir /usr/share/doc/%{name}-%{version} %description -ApacheMQ is a JMS Compliant Messaging System +The most popular and powerful open source messaging and Integration Patterns +server. + +%package javadoc +Group: Documentation +Summary: Javadoc for %{name} +Requires: jpackage-utils + +%description javadoc +This package contains javadoc for %{name} + +%package core +Group: Development/Libraries +Summary: ActiveMQ Core +Requires: %{name} = %{version}-%{release} +Requires: %{name}-jaas = %{version}-%{release} +Requires: %{name}-kahadb = %{version}-%{release} +Requires: jpackage-utils +Requires: java +Requires: activemq-protobuf +Requires: activeio +Requires: jettison +Requires: springframework-jms +Requires: geronimo-jta +Requires: derby +Requires: jasypt + +%description core +ActiveMQ Core Library + +%package jaas +Group: Development/Libraries +Summary: ActiveMQ Jaas +Requires: %{name} = %{version}-%{release} +Requires: jpackage-utils +Requires: java + +%description jaas +ActiveMQ Jaas Library + +%package kahadb +Group: Development/Libraries +Summary: ActiveMQ KahaDB +Requires: %{name} = %{version}-%{release} +Requires: jpackage-utils +Requires: java +Requires: activemq-protobuf +Requires: activeio + +%description kahadb +A file based persistence database that is local to the message broker that +is using it. It has been optimized for fast persistence and is the the default +storage mechanism from ActiveMQ 5.4 onwards. KahaDB uses less file descriptors +and provides faster recovery than its predecessor, the AMQ Message Store. -%package info-provider -Summary: An LDAP information provider for activemq -Group:grid/lcg -%description info-provider -An LDAP infomation provider for activemq +%prep -%package meta -Summary: A metapackage -Group:grid/lcg -Requires: activemq = %{version}-%{release}, activemq-info-provider = %{version}-%{release} -%description meta -A metapackage +%setup -q -n %{name}-%{version} -%prep -%setup -q -a1 -n apache-activemq-%{version} +# Disable modules +for m in all camel console fileserver blueprint karaf \ + openwire-generator optional pool ra rar run spring \ + tooling web web-demo web-console xmpp jmdns_1.0 +do + %pom_disable_module %{name}-${m} +done + +%pom_disable_module assembly + +# Remove missing plugin for activemq-core +%pom_remove_dep xsddoc:maven-xsddoc-plugin %{name}-core/pom.xml + +# Remove missing plugin +%pom_remove_plugin org.codehaus.mojo:ianal-maven-plugin + +# Remove missing test dependencies +%pom_remove_dep org.springframework:spring-test + +# Remove missing optional dependencies +%pom_remove_dep org.apache.geronimo.specs:geronimo-j2ee-management_1.1_spec + +# Remove xstream support (fedora version is out of date) +rm -rf %{name}-core/src/main/java/org/apache/activemq/transport/stomp +rm -rf %{name}-core/src/main/java/org/apache/activemq/util/XStreamFactoryBean.java +%pom_remove_dep com.thoughtworks.xstream:xstream %{name}-core/pom.xml + +# Remove jmdns support +rm -rf %{name}-core/src/main/java/org/apache/activemq/transport/discovery/zeroconf +%pom_remove_dep org.apache.activemq:activemq-jmdns_1.0 %{name}-core/pom.xml + +# Remove leveldb support +rm -rf %{name}-core/src/main/java/org/apache/activemq/store/leveldb +%pom_remove_dep org.fusesource.fuse-extra:fusemq-leveldb %{name}-core/pom.xml + +# Remove mqtt support +rm -rf %{name}-core/src/main/java/org/apache/activemq/transport/mqtt +%pom_remove_dep org.fusesource.mqtt-client:mqtt-client %{name}-core/pom.xml + +# Remove other optional dependencies +%pom_remove_dep org.apache.activemq:activemq-openwire-generator %{name}-core/pom.xml +%pom_remove_dep org.apache.geronimo.specs:geronimo-j2ee-management_1.1_spec %{name}-core/pom.xml +%pom_remove_dep org.apache.geronimo.specs:geronimo-jta_1.0.1B_spec %{name}-core/pom.xml +%pom_remove_dep org.apache.geronimo.specs:geronimo-jacc_1.1_spec %{name}-core/pom.xml +%pom_remove_dep org.apache.geronimo.specs:geronimo-annotation_1.0_spec %{name}-core/pom.xml + +chmod 644 LICENSE README.txt + +# Fix license file encoding +mv LICENSE LICENSE.orig +iconv -f iso-8859-1 -t utf-8 LICENSE.orig > LICENSE %build -install --directory ${RPM_BUILD_ROOT} +mvn-rpmbuild -Dmaven.test.skip=true \ + -Dproject.build.sourceEncoding=UTF-8 \ + install javadoc:aggregate %install -rm -rf $RPM_BUILD_ROOT -install --directory ${RPM_BUILD_ROOT}%{homedir} -install --directory ${RPM_BUILD_ROOT}%{homedir}/bin -install --directory ${RPM_BUILD_ROOT}%{docsdir} -install --directory ${RPM_BUILD_ROOT}%{libdir}/lib -install --directory ${RPM_BUILD_ROOT}%{libexecdir} -install --directory ${RPM_BUILD_ROOT}%{libdir}/webapps -install --directory ${RPM_BUILD_ROOT}%{cachedir} -install --directory ${RPM_BUILD_ROOT}%{cachedir}/data -install --directory ${RPM_BUILD_ROOT}/var/log/%{name} -install --directory ${RPM_BUILD_ROOT}/var/run/%{name} -install --directory ${RPM_BUILD_ROOT}/etc/%{name} -install --directory ${RPM_BUILD_ROOT}/etc/init.d -install --directory ${RPM_BUILD_ROOT}/etc/httpd/conf.d - -# Config files -install %{SOURCE2} ${RPM_BUILD_ROOT}/etc/%{name} -install conf/credentials.properties ${RPM_BUILD_ROOT}/etc/%{name} -install conf/jetty.xml ${RPM_BUILD_ROOT}/etc/%{name} -install %{SOURCE3} ${RPM_BUILD_ROOT}/etc/%{name} -install %{SOURCE4} ${RPM_BUILD_ROOT}/etc/%{name} -install conf/log4j.properties ${RPM_BUILD_ROOT}/etc/%{name} -install conf/activemq-wrapper.conf ${RPM_BUILD_ROOT}/etc/%{name} -install conf/activemq-httpd.conf ${RPM_BUILD_ROOT}/etc/httpd/conf.d - -# startup script -install bin/activemq ${RPM_BUILD_ROOT}/etc/init.d - -# Bin and doc dirs -install *.txt *.html ${RPM_BUILD_ROOT}%{docsdir} -cp -r docs ${RPM_BUILD_ROOT}%{docsdir} - -install bin/run.jar bin/activemq-admin ${RPM_BUILD_ROOT}%{homedir}/bin -install --directory ${RPM_BUILD_ROOT}/usr/bin -%{__ln_s} -f %{homedir}/bin/activemq-admin ${RPM_BUILD_ROOT}/usr/bin - -# Runtime directory -cp -r lib ${RPM_BUILD_ROOT}%{libdir} -cp -r webapps/admin ${RPM_BUILD_ROOT}%{libdir}/webapps - -# Info provider -install info-provider-activemq ${RPM_BUILD_ROOT}/%{libexecdir} - -pushd ${RPM_BUILD_ROOT}%{homedir} - [ -d conf ] || %{__ln_s} -f /etc/%{name} conf - [ -d data ] || %{__ln_s} -f %{cachedir}/data data - [ -d docs ] || %{__ln_s} -f %{docsdir} docs - [ -d lib ] || %{__ln_s} -f %{libdir}/lib lib - [ -d lib ] || %{__ln_s} -f %{libdir}/libexec libexec - [ -d log ] || %{__ln_s} -f /var/log/%{name} log - [ -d webapps ] || %{__ln_s} -f %{libdir}/webapps webapps -popd - -#pushd $RPM_BUILD_ROOT/%{_sysconfdir}/%{name} -# for file in $(ls -1) -# do -# sed -i 's,${activemq.base},/usr/share/activemq/,g' $file -# done -#popd - - -%pre -# Add the "activemq" user and group -# we need a shell to be able to use su - later -/usr/sbin/groupadd -g 92 -r activemq 2> /dev/null || : -/usr/sbin/useradd -c "Apache Activemq" -u 92 -g activemq \ - -s /bin/bash -r -d /usr/share/activemq activemq 2> /dev/null || : - -%post -# install activemq (but don't activate) -/sbin/chkconfig --add activemq - -%preun -if [ $1 = 0 ]; then - [ -f /var/lock/subsys/activemq ] && /etc/init.d/activemq stop - [ -f /etc/init.d/activemq ] && /sbin/chkconfig --del activemq -fi - -%postun - -%clean -rm -rf $RPM_BUILD_ROOT +install -d -m 755 %{buildroot}%{_javadir}/%{name} +install -d -m 755 %{buildroot}%{_mavenpomdir} + +for m in %{name}-core %{name}-jaas kahadb; do + install -pm 644 ${m}/target/${m}-%{version}.jar %{buildroot}%{_javadir}/%{name}/${m}.jar + install -pm 644 ${m}/pom.xml %{buildroot}%{_mavenpomdir}/JPP.%{name}-${m}.pom + %add_maven_depmap JPP.%{name}-${m}.pom %{name}/${m}.jar +done + +# Parent POM +install -pm 644 pom.xml %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom +%add_maven_depmap JPP-%{name}.pom +mkdir -p %{buildroot}%{_javadocdir}/%{name} +cp -rp target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name} %files -%defattr(-,root,root) -%attr(755,root,root) /usr/bin/activemq-admin -%{homedir} -%docdir %{docsdir} -%{docsdir} -%{libdir} -%attr(775,activemq,activemq) %dir /var/log/%{name} -%attr(775,activemq,activemq) %dir /var/run/%{name} -%attr(775,root,activemq) %dir %{cachedir}/data -%attr(755,root,root) /etc/init.d/activemq -%config(noreplace) /etc/httpd/conf.d/activemq-httpd.conf -%config(noreplace) /etc/%{name}/* - -%files info-provider -%defattr(-,root,root) -%attr(755,root,root) %{libexecdir}/info-provider-activemq +%doc LICENSE NOTICE README.txt +# Not owning /usr/share/java/activemq since it is owned by activemq-protobuf +%{_mavenpomdir}/JPP-%{name}.pom +%{_mavendepmapfragdir}/%{name} + +%files javadoc +%doc LICENSE NOTICE +%{_javadocdir}/%{name} + +%files core +%doc LICENSE NOTICE +%{_javadir}/%{name}/%{name}-core.jar +%{_mavenpomdir}/JPP.%{name}-%{name}-core.pom + +%files jaas +%doc LICENSE NOTICE +%{_javadir}/%{name}/%{name}-jaas.jar +%{_mavenpomdir}/JPP.%{name}-%{name}-jaas.pom + +%files kahadb +%doc LICENSE NOTICE +%{_javadir}/%{name}/kahadb.jar +%{_mavenpomdir}/JPP.%{name}-kahadb.pom %changelog -* Thu Oct 10 2013 Sam Kottler - 5.6.0-6 -- Fix the spec so that the service works +* Sat Aug 03 2013 Fedora Release Engineering - 5.6.0-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild * Sun Mar 03 2013 Matt Spaulding - 5.6.0-5 - Removed optional geronimo-annotation dependency from activemq-core diff --git a/activemq.xml b/activemq.xml deleted file mode 100644 index 39562ae..0000000 --- a/activemq.xml +++ /dev/null @@ -1,169 +0,0 @@ - - - - - - - file:${activemq.base}/conf/credentials.properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jetty-realm.properties b/jetty-realm.properties deleted file mode 100644 index 2cef758..0000000 --- a/jetty-realm.properties +++ /dev/null @@ -1,20 +0,0 @@ -## --------------------------------------------------------------------------- -## Licensed to the Apache Software Foundation (ASF) under one or more -## contributor license agreements. See the NOTICE file distributed with -## this work for additional information regarding copyright ownership. -## The ASF licenses this file to You under the Apache License, Version 2.0 -## (the "License"); you may not use this file except in compliance with -## the License. You may obtain a copy of the License at -## -## http://www.apache.org/licenses/LICENSE-2.0 -## -## Unless required by applicable law or agreed to in writing, software -## distributed under the License is distributed on an "AS IS" BASIS, -## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -## See the License for the specific language governing permissions and -## limitations under the License. -## --------------------------------------------------------------------------- - -# Defines users that can access the web (console, demo, etc.) -# username: password [,rolename ...] -admin: admin, admin diff --git a/jetty.xml b/jetty.xml deleted file mode 100644 index 752dcbd..0000000 --- a/jetty.xml +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - index.html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -