byte-buddy/byte-buddy.spec

154 lines
5.7 KiB
RPMSpec
Raw Normal View History

2020-08-18 19:27:56 +08:00
%bcond_with bootstrap
Name: byte-buddy
2022-06-20 17:07:42 +08:00
Version: 1.12.0
2020-08-18 19:27:56 +08:00
Release: 1
Summary: Runtime code generation for the Java virtual machine
2022-06-20 17:07:42 +08:00
License: Apache-2.0
2020-08-18 19:27:56 +08:00
URL: http://bytebuddy.net/
Source0: https://github.com/raphw/byte-buddy/archive/byte-buddy-%{version}.tar.gz
2022-06-20 17:07:42 +08:00
Source1: xmvn-reactor
Patch0: 0001-Avoid-bundling-asm.patch
Patch1: 0002-Remove-dependencies.patch
Patch2: 0003-Remove-Java-14-tests.patch
Patch3: 0004-Remove-JDK-15-sealed-classes.patch
2020-08-18 19:27:56 +08:00
BuildRequires: maven-local
2022-06-20 17:07:42 +08:00
BuildRequires: java-1.8.0-openjdk-devel maven
Requires: byte-buddy-agent byte-buddy-maven-plugin byte-buddy-parent
2020-08-18 19:27:56 +08:00
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
2022-06-20 17:07:42 +08:00
Requires: byte-buddy
2020-08-18 19:27:56 +08:00
%description agent
The Byte Buddy Java agent allows to access the JVM's HotSwap feature.
%package maven-plugin
Summary: Byte Buddy Maven plugin
2022-06-20 17:07:42 +08:00
Requires: byte-buddy
2020-08-18 19:27:56 +08:00
%description maven-plugin
A plugin for post-processing class files via Byte Buddy in a Maven build.
%package parent
Summary: Byte Buddy parent POM
2022-06-20 17:07:42 +08:00
Requires: byte-buddy
2020-08-18 19:27:56 +08:00
%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}
2022-06-20 17:07:42 +08:00
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
rm byte-buddy-agent/src/test/java/net/bytebuddy/agent/VirtualMachineAttachmentTest.java
rm byte-buddy-agent/src/test/java/net/bytebuddy/agent/VirtualMachineForOpenJ9Test.java
2020-08-18 19:27:56 +08:00
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
2022-06-20 17:07:42 +08:00
%pom_disable_module byte-buddy-android-test
2020-08-18 19:27:56 +08:00
%pom_disable_module byte-buddy-benchmark
%pom_disable_module byte-buddy-gradle-plugin
2022-06-20 17:07:42 +08:00
2020-08-18 19:27:56 +08:00
%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
2022-06-20 17:07:42 +08:00
%pom_remove_plugin :nexus-staging-maven-plugin
%pom_remove_plugin :byte-buddy-maven-plugin byte-buddy-dep
2020-08-18 19:27:56 +08:00
%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
2022-06-20 17:07:42 +08:00
%pom_remove_dep org.ow2.asm:asm-deprecated
%pom_remove_plugin :maven-shade-plugin byte-buddy
%pom_remove_plugin :maven-shade-plugin byte-buddy-benchmark
%pom_remove_dep net.java.dev.jna:jna byte-buddy
%pom_remove_dep net.java.dev.jna:jna byte-buddy-dep
%pom_remove_dep net.java.dev.jna:jna byte-buddy-agent
%pom_remove_dep net.java.dev.jna:jna-platform byte-buddy
%pom_remove_dep net.java.dev.jna:jna-platform byte-buddy-dep
%pom_remove_dep net.java.dev.jna:jna-platform byte-buddy-agent
cp %{SOURCE1} ./.xmvn-reactor
echo `pwd` > absolute_prefix.log
sed -i 's/\//\\\//g' absolute_prefix.log
absolute_prefix=`head -n 1 absolute_prefix.log`
sed -i 's/absolute-prefix/'"$absolute_prefix"'/g' .xmvn-reactor
2020-08-18 19:27:56 +08:00
%build
2022-06-20 17:07:42 +08:00
mvn package -Dsourcecode.test.version=1.8 -Dmaven.test.failure.ignore=true -P'java8,!checks' verify org.apache.maven.plugins:maven-javadoc-plugin:aggregate
2020-08-18 19:27:56 +08:00
%install
%mvn_install
2022-06-20 17:07:42 +08:00
%files
%attr(0644,root,root) /usr/share/maven-metadata/byte-buddy.xml
%attr(0755,root,root) %dir /usr/share/java/byte-buddy
%attr(0644,root,root) /usr/share/java/byte-buddy/byte-buddy.jar
%attr(0755,root,root) %dir /usr/share/maven-poms/byte-buddy
%attr(0644,root,root) /usr/share/maven-poms/byte-buddy/byte-buddy.pom
%attr(0755,root,root) %dir /usr/share/java/byte-buddy
%attr(0644,root,root) /usr/share/java/byte-buddy/byte-buddy-dep.jar
%attr(0755,root,root) %dir /usr/share/maven-poms/byte-buddy
%attr(0644,root,root) /usr/share/maven-poms/byte-buddy/byte-buddy-dep.pom
2020-08-18 19:27:56 +08:00
%doc README.md release-notes.md
%license LICENSE NOTICE
2022-06-20 17:07:42 +08:00
%files agent
%attr(0755,root,root) %dir /usr/share/java/byte-buddy
%attr(0644,root,root) /usr/share/java/byte-buddy/byte-buddy-agent.jar
%attr(0755,root,root) %dir /usr/share/maven-poms/byte-buddy
%attr(0644,root,root) /usr/share/maven-poms/byte-buddy/byte-buddy-agent.pom
2020-08-18 19:27:56 +08:00
%license LICENSE NOTICE
2022-06-20 17:07:42 +08:00
%files maven-plugin
%attr(0755,root,root) %dir /usr/share/java/byte-buddy
%attr(0644,root,root) /usr/share/java/byte-buddy/byte-buddy-maven-plugin.jar
%attr(0755,root,root) %dir /usr/share/maven-poms/byte-buddy
%attr(0644,root,root) /usr/share/maven-poms/byte-buddy/byte-buddy-maven-plugin.pom
2020-08-18 19:27:56 +08:00
2022-06-20 17:07:42 +08:00
%files parent
%attr(0755,root,root) %dir /usr/share/maven-poms/byte-buddy
%attr(0644,root,root) /usr/share/maven-poms/byte-buddy/byte-buddy-parent.pom
2020-08-18 19:27:56 +08:00
%license LICENSE NOTICE
2022-06-20 17:07:42 +08:00
%files javadoc
/usr/share/javadoc/byte-buddy
2020-08-18 19:27:56 +08:00
%license LICENSE NOTICE
%changelog
2022-06-20 17:07:42 +08:00
* Thu Jun 16 2022 Ge Wang <wangge20@h-partners.com> - 1.12.0-1
- Upgrade to version 1.12.0
2020-08-18 19:27:56 +08:00
* Fri Aug 14 2020 leiju <leiju4@huawei.com> - 1.9.5-1
- Package init