481c4e2
Name:          disruptor
481c4e2
Version:       3.2.1
481c4e2
Release:       1%{?dist}
481c4e2
Summary:       Concurrent Programming Framework
481c4e2
License:       ASL 2.0
481c4e2
URL:           http://lmax-exchange.github.io/disruptor/
481c4e2
Source0:       https://github.com/LMAX-Exchange/disruptor/archive/%{version}.tar.gz
481c4e2
Source1:       http://repo1.maven.org/maven2/com/lmax/%{name}/%{version}/%{name}-%{version}.pom
481c4e2
481c4e2
BuildRequires: java-devel
481c4e2
481c4e2
# test deps
481c4e2
BuildRequires: mvn(junit:junit)
481c4e2
BuildRequires: mvn(org.jmock:jmock-junit4)
481c4e2
BuildRequires: mvn(org.jmock:jmock-legacy)
481c4e2
481c4e2
%if 0
481c4e2
# Unavailable performance test deps
481c4e2
# lib/test/hdrhistogram-1.0-SNAPSHOT.jar
481c4e2
BuildRequires: mvn(com.google.caliper:caliper:0.5-rc1)
481c4e2
%endif
481c4e2
481c4e2
# NOTE: the project is buildable with gradle by default
481c4e2
BuildRequires: maven-local
481c4e2
BuildRequires: maven-plugin-bundle
481c4e2
BuildRequires: maven-surefire-provider-junit4
481c4e2
481c4e2
BuildArch:     noarch
481c4e2
481c4e2
%description
481c4e2
A High Performance Inter-Thread Messaging Library.
481c4e2
481c4e2
%package javadoc
481c4e2
Summary:       Javadoc for %{name}
481c4e2
481c4e2
%description javadoc
481c4e2
This package contains javadoc for %{name}.
481c4e2
481c4e2
%prep
481c4e2
%setup -q
481c4e2
481c4e2
find . -name "*.class" -print -delete
481c4e2
find . -name "*.jar" -type f -print -delete
481c4e2
481c4e2
cp -p %{SOURCE1} pom.xml
481c4e2
%pom_xpath_inject "pom:project" "
481c4e2
<build>
481c4e2
481c4e2
</build>"
481c4e2
481c4e2
%pom_xpath_inject "pom:project/pom:build" '
481c4e2
<plugins>
481c4e2
  <plugin>
481c4e2
    <groupId>org.apache.felix</groupId>
481c4e2
    <artifactId>maven-bundle-plugin</artifactId>
481c4e2
    <version>any</version>
481c4e2
    <extensions>true</extensions>
481c4e2
    <configuration>
481c4e2
      <instructions>
481c4e2
        <Bundle-DocURL>%{url}</Bundle-DocURL>
481c4e2
        <Bundle-Name>${project.name}</Bundle-Name>
481c4e2
        <Bundle-Vendor>LMAX Disruptor Development Team</Bundle-Vendor>
481c4e2
      </instructions>
481c4e2
    </configuration>
481c4e2
    <executions>
481c4e2
      <execution>
481c4e2
        <id>bundle-manifest</id>
481c4e2
        <phase>process-classes</phase>
481c4e2
        <goals>
481c4e2
          <goal>manifest</goal>
481c4e2
        </goals>
481c4e2
      </execution>
481c4e2
    </executions>
481c4e2
  </plugin>
481c4e2
</plugins>'
481c4e2
%pom_add_plugin org.apache.maven.plugins:maven-jar-plugin . '
481c4e2
<configuration>
481c4e2
  <archive>
481c4e2
    <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
481c4e2
  </archive>
481c4e2
</configuration>'
481c4e2
481c4e2
# fail to compile cause: incompatible hamcrest apis
481c4e2
rm -r src/test/java/com/lmax/disruptor/RingBufferTest.java \
481c4e2
 src/test/java/com/lmax/disruptor/RingBufferEventMatcher.java
481c4e2
481c4e2
%build
481c4e2
481c4e2
%mvn_file :%{name} %{name}
481c4e2
%mvn_build -- -Dproject.build.sourceEncoding=UTF-8
481c4e2
481c4e2
%install
481c4e2
%mvn_install
481c4e2
481c4e2
%files -f .mfiles
481c4e2
%doc LICENCE.txt README.md
481c4e2
481c4e2
%files javadoc -f .mfiles-javadoc
481c4e2
%doc LICENCE.txt
481c4e2
481c4e2
%changelog
481c4e2
* Mon Apr 21 2014 gil cattaneo <puntogil@libero.it> 3.2.1-1
481c4e2
- update to 3.2.1
481c4e2
481c4e2
* Wed Aug 14 2013 gil cattaneo <puntogil@libero.it> 3.2.0-1
481c4e2
- initial rpm