byte-buddy/byte-buddy.spec
2020-08-18 19:27:56 +08:00

120 lines
4.3 KiB
RPMSpec

%bcond_with bootstrap
Name: byte-buddy
Version: 1.9.5
Release: 1
Summary: Runtime code generation for the Java virtual machine
License: ASL 2.0
URL: http://bytebuddy.net/
Source0: https://github.com/raphw/byte-buddy/archive/byte-buddy-%{version}.tar.gz
Patch0: no-unixsocket.patch
Patch1: avoid-bundling-asm.patch
BuildRequires: maven-local
%if %{without bootstrap}
BuildRequires: mvn(junit:junit) mvn(net.bytebuddy:byte-buddy)
BuildRequires: mvn(net.bytebuddy:byte-buddy-dep) mvn(net.bytebuddy:byte-buddy-maven-plugin)
BuildRequires: mvn(org.apache.maven:maven-compat)
BuildRequires: mvn(org.apache.maven.plugin-testing:maven-plugin-testing-harness)
BuildRequires: mvn(org.mockito:mockito-core) mvn(org.ow2.asm:asm-analysis)
BuildRequires: mvn(org.ow2.asm:asm-util)
%endif
BuildRequires: mvn(org.apache.felix:maven-bundle-plugin) mvn(org.apache.maven:maven-core)
BuildRequires: mvn(org.apache.maven:maven-plugin-api)
BuildRequires: mvn(org.apache.maven.plugins:maven-plugin-plugin)
BuildRequires: mvn(org.apache.maven.plugins:maven-shade-plugin)
BuildRequires: mvn(org.apache.maven.plugin-tools:maven-plugin-annotations)
BuildRequires: mvn(org.codehaus.mojo:build-helper-maven-plugin)
BuildRequires: mvn(org.eclipse.aether:aether-api) mvn(org.eclipse.aether:aether-util)
BuildRequires: mvn(org.ow2.asm:asm) mvn(org.ow2.asm:asm-commons)
BuildArch: noarch
%description
Byte Buddy is a code generation library for creating Java classes during the
runtime of a Java application and without the help of a compiler. Other than
the code generation utilities that ship with the Java Class Library, Byte Buddy
allows the creation of arbitrary classes and is not limited to implementing
interfaces for the creation of runtime proxies.
%package agent
Summary: Byte Buddy Java agent
%description agent
The Byte Buddy Java agent allows to access the JVM's HotSwap feature.
%package maven-plugin
Summary: Byte Buddy Maven plugin
%description maven-plugin
A plugin for post-processing class files via Byte Buddy in a Maven build.
%package parent
Summary: Byte Buddy parent POM
%description parent
The parent artifact contains configuration information that
concern all modules.
%package javadoc
Summary: Javadoc for %{name}
%description javadoc
This package contains API documentation for %{name}.
%prep
%setup -q -n %{name}-%{name}-%{version}
%patch0
%patch1
find -name *.jar -delete
find -name *.class -delete
mv byte-buddy-dep/src/precompiled/java/net/bytebuddy/build/*.java \
byte-buddy-dep/src/main/java/net/bytebuddy/build
mkdir -p byte-buddy-dep/src/test/java/net/bytebuddy/test/precompiled/
mv byte-buddy-dep/src/precompiled/java/net/bytebuddy/test/precompiled/*.java \
byte-buddy-dep/src/test/java/net/bytebuddy/test/precompiled/
%pom_disable_module byte-buddy-android
%pom_disable_module byte-buddy-benchmark
%pom_disable_module byte-buddy-gradle-plugin
%pom_remove_plugin :jacoco-maven-plugin
%pom_remove_plugin :license-maven-plugin
%pom_remove_plugin :pitest-maven
%pom_remove_plugin :coveralls-maven-plugin
%pom_remove_plugin :spotbugs-maven-plugin
%pom_remove_plugin :jitwatch-jarscan-maven-plugin
%pom_remove_plugin :clirr-maven-plugin
%pom_remove_plugin :maven-release-plugin
%pom_xpath_set "pom:createSourcesJar" "false" byte-buddy
%pom_remove_dep :findbugs-annotations
sed -i -e '/SuppressFBWarnings/d' $(grep -lr SuppressFBWarnings)
%pom_remove_plugin -r :modulemaker-maven-plugin
%if %{with bootstrap}
%pom_remove_plugin :byte-buddy-maven-plugin byte-buddy-dep
%endif
%build
%if %{with bootstrap}
%mvn_build -s -f -- -P'java8,!checks'
%else
%mvn_build -s -- -P'java8,!checks' -Dsourcecode.test.version=1.8 -Dmaven.test.failure.ignore=true
%endif
%install
%mvn_install
%files -f .mfiles-%{name} -f .mfiles-%{name}-dep
%doc README.md release-notes.md
%license LICENSE NOTICE
%files agent -f .mfiles-%{name}-agent
%license LICENSE NOTICE
%files maven-plugin -f .mfiles-%{name}-maven-plugin
%files parent -f .mfiles-%{name}-parent
%license LICENSE NOTICE
%files javadoc -f .mfiles-javadoc
%license LICENSE NOTICE
%changelog
* Fri Aug 14 2020 leiju <leiju4@huawei.com> - 1.9.5-1
- Package init