%global namedreltag .Final %global namedversion %{version}%{?namedreltag} %global customnamedversion 2_4_1_Final # Use this switch to rebuild without narayana # This is useful to break the hornetq circular dependency %define with_narayana 1 Name: hornetq Version: 2.4.1 Release: %mkrel 2 Group: Development/Java Summary: High performance messaging system License: ASL 2.0 URL: http://www.jboss.org/hornetq Source0: https://github.com/hornetq/hornetq/archive/HornetQ_%{customnamedversion}.tar.gz BuildRequires: automake libtool autoconf BuildRequires: apiviz BuildRequires: aether BuildRequires: apache-commons-logging BuildRequires: javacc BuildRequires: jboss-connector-1.6-api BuildRequires: jboss-ejb-3.1-api BuildRequires: jboss-ejb3-ext-api BuildRequires: jboss-jaspi-1.0-api BuildRequires: jboss-jms-1.1-api BuildRequires: jboss-logging BuildRequires: jboss-servlet-3.0-api BuildRequires: jboss-transaction-1.1-api BuildRequires: jboss-transaction-spi BuildRequires: jboss-logging BuildRequires: jboss-logging-tools BuildRequires: jboss-remoting BuildRequires: jboss-naming BuildRequires: jbossws-parent BuildRequires: jdepend BuildRequires: libaio-devel BuildRequires: netty BuildRequires: maven-local BuildRequires: maven-license-plugin BuildRequires: maven-checkstyle-plugin BuildRequires: javacc-maven-plugin BuildRequires: java-service-wrapper BuildRequires: jgroups BuildRequires: jboss-integration BuildRequires: mvn(org.jboss.resteasy:resteasy-jaxrs) BuildRequires: mvn(org.jboss.spec.javax.annotation:jboss-annotations-api_1.1_spec) %if %{with_narayana} BuildRequires: narayana %endif BuildRequires: xml-maven-plugin BuildRequires: saxon BuildRequires: qpid-proton-java BuildRequires: mvn(org.jboss.spec.javax.resource:jboss-connector-api_1.6_spec) BuildRequires: mvn(org.jboss.spec.javax.jms:jboss-jms-api_2.0_spec) BuildRequires: nar-maven-plugin %description HornetQ is an open source project to build a multi-protocol, embeddable, very high performance, clustered, asynchronous messaging system. %package javadoc Summary: Javadocs for %{name} %description javadoc This package contains the API documentation for %{name}. %prep %setup -q -n hornetq-HornetQ_%{customnamedversion} # Remove bundled .so files find -name "*.so" -delete %pom_remove_dep "org.jboss.jbossts.jts:jbossjts-jacorb" hornetq-jms-server/pom.xml %pom_add_dep "org.jboss.narayana.jta:jta" hornetq-jms-server/pom.xml %pom_disable_module hornetq-service-sar %pom_disable_module hornetq-bootstrap %pom_disable_module tests %pom_disable_module examples %pom_disable_module hornetq-rest %pom_disable_module integration/hornetq-jboss-as-integration %pom_disable_module integration/hornetq-spring-integration %pom_disable_module integration/hornetq-twitter-integration %pom_disable_module integration/hornetq-aerogear-integration %if !%{with_narayana} %pom_disable_module hornetq-jms-server %pom_disable_module hornetq-ra %pom_disable_module hornetq-tools %endif %pom_remove_plugin ":maven-checkstyle-plugin" %pom_remove_dep "org.jboss.microcontainer:jboss-kernel" # Use netty version 4, always sed -i 's|>4.0.13.Final<|>4<|' pom.xml # Replace old jca %pom_remove_dep "org.jboss.javaee:jboss-jca-api" hornetq-ra/pom.xml %pom_add_dep "org.jboss.spec.javax.resource:jboss-connector-api_1.6_spec" hornetq-ra/pom.xml # Make xslt 2.0 avaialble! %pom_xpath_inject "pom:build/pom:plugins/pom:plugin[pom:artifactId = 'xml-maven-plugin']/pom:configuration" "<transformerFactory>net.sf.saxon.TransformerFactoryImpl</transformerFactory>" hornetq-core-client/pom.xml sed -i "s|>com.mycila<|>com.mycila.maven-license-plugin<|g" pom.xml sed -i "s|>license-maven-plugin<|>maven-license-plugin<|g" pom.xml %build # Workaround for building native bits # Currently the build script uses the .so in the hornetq-nativebin/ directory # but we need to rebuild them. The issue is that the mvn build process does not # use the new .so files we've built. Here is a simple workaround. %if %{with_narayana} pushd hornetq-native # Let's build the .so files %mvn_build -i -f -- -Pnative-build # Copy them to hornetq-native/bin/ dir find -name "*.so" -exec cp {} bin/libHornetQAIO.so \; find -name "*.so" -exec cp {} bin/libHornetQAIO%{__isa_bits}.so \; popd %endif # This will rebuild one more time the hornet-native stuff, # but this time will include the correct native libraries # Tests are skipped because required modules are disabled %mvn_build -f -- -Pmaven-release %install %mvn_install # Install native stuff %if %{with_narayana} install -d -m 755 %{buildroot}/%{_libdir} cp -L hornetq-native/bin/libHornetQAIO.so %{buildroot}/%{_libdir}/libHornetQAIO.so %endif %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files -f .mfiles %dir %{_javadir}/%{name} %if %{with_narayana} %{_libdir}/libHornetQAIO.so %endif %doc distribution/hornetq/src/main/resources/licenses/LICENSE.txt %doc NOTICE %doc README.md %files javadoc -f .mfiles-javadoc %doc distribution/hornetq/src/main/resources/licenses/LICENSE.txt %doc NOTICE %changelog * Sat Dec 27 2014 pterjan <pterjan> 2.4.1-2.mga5 + Revision: 806375 - Reuild with narayana * Sat Dec 27 2014 pterjan <pterjan> 2.4.1-1.mga5 + Revision: 806374 - Build without narayana to bootstrap - Fix BuildRequires - Sync with Fedora 21 (update to 2.4.1) * Wed Oct 15 2014 umeabot <umeabot> 2.3.1-5.mga5 + Revision: 750362 - Second Mageia 5 Mass Rebuild - Mageia 5 Mass Rebuild * Tue Oct 22 2013 umeabot <umeabot> 2.3.1-3.mga4 + Revision: 545428 - Mageia 4 Mass Rebuild * Tue Oct 15 2013 dmorgan <dmorgan> 2.3.1-2.mga4 + Revision: 501227 - Rebuild with narayana - Added hornetq-jms-server and hornetq-ra modules * Tue Oct 15 2013 dmorgan <dmorgan> 2.3.1-1.mga4 + Revision: 501042 - downgrade to version 2.3.1 - New version * Sat Jan 12 2013 umeabot <umeabot> 2.2.13-6.mga3 + Revision: 353275 - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild * Mon Jan 07 2013 dmorgan <dmorgan> 2.2.13-5.mga3 + Revision: 341342 - imported package hornetq * Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.13-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild * Thu May 24 2012 Marek Goldmann <mgoldman@redhat.com> 2.2.13-4 - Removed unnecessary Requires * Wed May 23 2012 Marek Goldmann <mgoldman@redhat.com> 2.2.13-3 - Removed unnecessary %%global - Added License file to -devel subpackage - Removed static files * Wed May 16 2012 Marek Goldmann <mgoldman@redhat.com> 2.2.13-2 - Added native part to the build * Tue May 15 2012 Marek Goldmann <mgoldman@redhat.com> 2.2.13-1 - Initial packaging