commit 31662a5f75f3b514cdd0f06185c30d9b7c220e61696b2dd8505e5f8b59a1be55 Author: Fridrich Strba <fstrba@suse.com> Date: Tue Oct 1 15:23:52 2019 +0000 OBS-URL: https://build.opensuse.org/package/show/Java:packages/disruptor?expand=0&rev=1 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/disruptor-3.3.2-jmock.patch b/disruptor-3.3.2-jmock.patch new file mode 100644 index 0000000..2a3a1eb --- /dev/null +++ b/disruptor-3.3.2-jmock.patch @@ -0,0 +1,21 @@ +--- disruptor-3.3.2/src/test/java/com/lmax/disruptor/BatchEventProcessorTest.java 2015-02-25 10:09:57.000000000 +0100 ++++ disruptor-3.3.2/src/test/java/com/lmax/disruptor/BatchEventProcessorTest.java.jmock 2015-06-03 15:52:43.997446568 +0200 +@@ -23,6 +23,7 @@ + import org.jmock.api.Action; + import org.jmock.api.Invocation; + import org.jmock.integration.junit4.JMock; ++import org.jmock.lib.concurrent.Synchroniser; + import org.junit.Test; + import org.junit.runner.RunWith; + +@@ -35,7 +36,9 @@ + @RunWith(JMock.class) + public final class BatchEventProcessorTest + { +- private final Mockery context = new Mockery(); ++ private final Mockery context = new Mockery() {{ ++ setThreadingPolicy(new Synchroniser()); ++ }}; + private final Sequence lifecycleSequence = context.sequence("lifecycleSequence"); + private final CountDownLatch latch = new CountDownLatch(1); + diff --git a/disruptor-3.3.6.pom b/disruptor-3.3.6.pom new file mode 100644 index 0000000..ad3e887 --- /dev/null +++ b/disruptor-3.3.6.pom @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <modelVersion>4.0.0</modelVersion> + <groupId>com.lmax</groupId> + <artifactId>disruptor</artifactId> + <version>3.3.6</version> + <name>Disruptor Framework</name> + <description>Disruptor - Concurrent Programming Framework</description> + <url>http://lmax-exchange.github.com/disruptor</url> + <licenses> + <license> + <name>The Apache Software License, Version 2.0</name> + <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url> + <distribution>repo</distribution> + </license> + </licenses> + <developers> + <developer> + <id>team</id> + <name>LMAX Disruptor Development Team</name> + <email>lmax-disruptor@googlegroups.com</email> + </developer> + </developers> + <scm> + <connection>scm:git@github.com:LMAX-Exchange/disruptor.git</connection> + <url>scm:git@github.com:LMAX-Exchange/disruptor.git</url> + </scm> + <dependencies> + <dependency> + <groupId>org.jmock</groupId> + <artifactId>jmock-junit4</artifactId> + <version>2.5.1</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.5</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.jmock</groupId> + <artifactId>jmock-legacy</artifactId> + <version>2.5.1</version> + <scope>test</scope> + </dependency> + </dependencies> +</project> diff --git a/disruptor-3.3.6.tar.gz b/disruptor-3.3.6.tar.gz new file mode 100644 index 0000000..26fac03 --- /dev/null +++ b/disruptor-3.3.6.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c7b46371ab115ca1b0663e376d55d8aa6240826d808a6c850ff38420265f16a7 +size 260170 diff --git a/disruptor.spec b/disruptor.spec new file mode 100644 index 0000000..c24b18f --- /dev/null +++ b/disruptor.spec @@ -0,0 +1,92 @@ +# +# spec file for package disruptor +# +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +Name: disruptor +Version: 3.3.6 +Release: 0 +Summary: Concurrent Programming Framework +License: Apache-2.0 +URL: https://lmax-exchange.github.io/disruptor/ +Source0: https://github.com/LMAX-Exchange/disruptor/archive/%{version}/%{name}-%{version}.tar.gz +Source1: http://repo1.maven.org/maven2/com/lmax/%{name}/%{version}/%{name}-%{version}.pom +# see http://www.jmock.org/threading-synchroniser.html +Patch0: disruptor-3.3.2-jmock.patch +BuildRequires: maven-local fdupes +BuildRequires: mvn(junit:junit) +BuildRequires: mvn(org.apache.felix:maven-bundle-plugin) +BuildRequires: mvn(org.hamcrest:hamcrest-library) +BuildArch: noarch + +%description +A High Performance Inter-Thread Messaging Library. + +%package javadoc +Summary: Javadoc for %{name} + +%description javadoc +This package contains javadoc for %{name}. + +%prep +%setup -q +# Cleanup +find . -name "*.class" -print -delete +find . -name "*.jar" -type f -print -delete + +%patch0 -p1 + +cp -p %{SOURCE1} pom.xml + +# Add OSGi support +%pom_xpath_inject "pom:project" "<packaging>bundle</packaging>" +%pom_add_plugin org.apache.felix:maven-bundle-plugin:2.3.7 . ' +<extensions>true</extensions> +<configuration> + <instructions> + <Bundle-DocURL>%{url}</Bundle-DocURL> + <Bundle-Name>${project.name}</Bundle-Name> + <Bundle-Vendor>LMAX Disruptor Development Team</Bundle-Vendor> + </instructions> +</configuration> +<executions> + <execution> + <id>bundle-manifest</id> + <phase>process-classes</phase> + <goals> + <goal>manifest</goal> + </goals> + </execution> +</executions>' + +%{mvn_file} :%{name} %{name} + +%build + +%{mvn_build} -f -- -Dproject.build.sourceEncoding=UTF-8 + +%install +%mvn_install +%fdupes -s %{buildroot}%{_javadocdir} + +%files -f .mfiles +%doc README.md +%license LICENCE.txt + +%files javadoc -f .mfiles-javadoc +%license LICENCE.txt + +%changelog