SHA256
1
0
forked from pool/disruptor
disruptor/disruptor.spec

92 lines
2.6 KiB
RPMSpec

#
# spec file for package disruptor
#
# Copyright (c) 2023 SUSE LLC
#
# 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.4.4
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: https://repo1.maven.org/maven2/com/lmax/%{name}/%{version}/%{name}-%{version}.pom
BuildRequires: fdupes
BuildRequires: maven-local
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
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.outputTimestamp=$(date -u -d @${SOURCE_DATE_EPOCH:-$(date +%%s)} +%%Y-%%m-%%dT%%H:%%M:%%SZ) \
-Dproject.build.sourceEncoding=UTF-8 -Dmaven.compiler.source=1.8 -Dmaven.compiler.target=1.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