forked from pool/objectweb-asm
This commit is contained in:
@@ -12,40 +12,31 @@
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
Name: objectweb-asm
|
||||
Version: 3.3.1
|
||||
Version: 6.0
|
||||
Release: 0
|
||||
Summary: A code manipulation tool to implement adaptable systems
|
||||
Summary: Java bytecode manipulation framework
|
||||
License: BSD-3-Clause
|
||||
Group: Development/Libraries/Java
|
||||
Url: http://asm.objectweb.org/
|
||||
Source0: http://download.forge.objectweb.org/asm/asm-3.3.1.tar.gz
|
||||
Source1: http://repo1.maven.org/maven2/asm/asm/3.3.1/asm-3.3.1.pom
|
||||
Source2: http://repo1.maven.org/maven2/asm/asm-analysis/3.3.1/asm-analysis-3.3.1.pom
|
||||
Source3: http://repo1.maven.org/maven2/asm/asm-commons/3.3.1/asm-commons-3.3.1.pom
|
||||
Source4: http://repo1.maven.org/maven2/asm/asm-tree/3.3.1/asm-tree-3.3.1.pom
|
||||
Source5: http://repo1.maven.org/maven2/asm/asm-util/3.3.1/asm-util-3.3.1.pom
|
||||
Source6: http://repo1.maven.org/maven2/asm/asm-xml/3.3.1/asm-xml-3.3.1.pom
|
||||
Source7: http://repo1.maven.org/maven2/asm/asm-all/3.3.1/asm-all-3.3.1.pom
|
||||
Source8: http://repo1.maven.org/maven2/asm/asm-parent/3.3.1/asm-parent-3.3.1.pom
|
||||
Source9: asm-MANIFEST.MF
|
||||
Patch0: objectweb-asm-no-classpath-in-manifest.patch
|
||||
Patch1: asm-3.3.1-sourcetarget.patch
|
||||
Patch2: asm-3.3.1-jdk9.patch
|
||||
BuildRequires: ant >= 1.6.5
|
||||
URL: http://asm.objectweb.org/
|
||||
# ./generate-tarball.sh
|
||||
Source0: %{name}-%{version}.tar.xz
|
||||
# The source contains binary jars that cannot be verified for licensing and could be proprietary
|
||||
Source1: generate-tarball.sh
|
||||
Patch0: %{name}-%{version}-uberjar.patch
|
||||
Patch1: %{name}-%{version}-sourcetarget.patch
|
||||
Patch2: %{name}-%{version}-no_bnd.patch
|
||||
Patch3: %{name}-%{version}-no_retrofit.patch
|
||||
BuildRequires: ant
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: java-devel >= 1.8
|
||||
BuildRequires: javapackages-local
|
||||
BuildRequires: javapackages-tools
|
||||
BuildRequires: objectweb-anttask
|
||||
BuildRequires: xml-commons-apis
|
||||
BuildRequires: zip
|
||||
# Needed by asm-xml.jar
|
||||
Requires: xml-commons-apis
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildRequires: xz
|
||||
BuildArch: noarch
|
||||
|
||||
%description
|
||||
@@ -59,66 +50,106 @@ Machine.
|
||||
ASM offers similar functionalities as BCEL or SERP, but is much
|
||||
smaller.
|
||||
|
||||
%package javadoc
|
||||
Summary: Java bytecode manipulation framework
|
||||
Group: Development/Libraries/Java
|
||||
|
||||
%description javadoc
|
||||
ASM is a Java bytecode manipulation framework.
|
||||
|
||||
It can be used to dynamically generate stub classes or other proxy
|
||||
classes, directly in binary form, or to dynamically modify classes at
|
||||
load time, i.e., just before they are loaded into the Java Virtual
|
||||
Machine.
|
||||
|
||||
ASM offers similar functionalities as BCEL or SERP, but is much
|
||||
smaller.
|
||||
|
||||
%package examples
|
||||
Summary: Java bytecode manipulation framework
|
||||
Group: Development/Libraries/Java
|
||||
|
||||
%description examples
|
||||
ASM is a Java bytecode manipulation framework.
|
||||
|
||||
It can be used to dynamically generate stub classes or other proxy
|
||||
classes, directly in binary form, or to dynamically modify classes at
|
||||
load time, i.e., just before they are loaded into the Java Virtual
|
||||
Machine.
|
||||
|
||||
ASM offers similar functionalities as BCEL or SERP, but is much
|
||||
smaller.
|
||||
|
||||
%prep
|
||||
%setup -q -n asm-%{version}
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
perl -pi -e 's/\r$//g' LICENSE.txt README.txt
|
||||
mkdir META-INF
|
||||
cp -p %{SOURCE9} META-INF/MANIFEST.MF
|
||||
rm -f src/org/objectweb/asm/tools/ModuleInfoBndPlugin.java
|
||||
%patch3 -p1
|
||||
# wrong end of line encoding
|
||||
find examples/ -type 'f' | xargs sed -i -e 's/.$//'
|
||||
sed -i -e 's/.$//' README.txt LICENSE.txt
|
||||
mkdir -p test/lib
|
||||
|
||||
%build
|
||||
export CLASSPATH=
|
||||
export OPT_JAR_LIST=:
|
||||
ant \
|
||||
-Dcompile.source=8 -Dcompile.target=8 \
|
||||
-Dobjectweb.ant.tasks.path=$(build-classpath objectweb-anttask) \
|
||||
-Dant.build.javac.source=8 -Dant.build.javac.target=8 \
|
||||
jar
|
||||
dist.version jar jdoc
|
||||
|
||||
%install
|
||||
install -d -m 755 %{buildroot}/%{_javadir}/%{name}
|
||||
# jars
|
||||
install -d -m 755 %{buildroot}%{_javadir}/%{name}
|
||||
for jar in output/dist/lib/*.jar; do
|
||||
install -m 644 ${jar} \
|
||||
%{buildroot}%{_javadir}/%{name}/`basename ${jar} | sed 's/-%{version}//g'`
|
||||
done
|
||||
touch META-INF/MANIFEST.MF
|
||||
zip -u output/dist/lib/all/asm-all-%{version}.jar META-INF/MANIFEST.MF
|
||||
install -m 644 output/dist/lib/all/asm-all-%{version}.jar %{buildroot}%{_javadir}/%{name}/asm-all.jar
|
||||
install -m 644 output/dist/lib/*jar %{buildroot}/%{_javadir}/%{name}
|
||||
(cd %{buildroot}%{_javadir}/%{name} && for jar in *-%{version}.jar; do ln -sf ${jar} ${jar/-%{version}/}; done)
|
||||
|
||||
install -m 644 output/dist/lib/all/asm-all-%{version}.jar \
|
||||
%{buildroot}%{_javadir}/%{name}-all-%{version}.jar
|
||||
(cd %{buildroot}%{_javadir} && for jar in *-%{version}*; do ln -sf ${jar} ${jar/-%{version}/}; done)
|
||||
|
||||
# pom
|
||||
install -d -m 755 %{buildroot}%{_mavenpomdir}
|
||||
install -m 644 %{SOURCE1} %{buildroot}%{_mavenpomdir}/JPP.objectweb-asm-asm.pom
|
||||
%add_maven_depmap JPP.objectweb-asm-asm.pom %{name}/asm.jar
|
||||
install -d -m 755 %{buildroot}%{_mavenpomdir}/%{name}
|
||||
|
||||
install -m 644 %{SOURCE2} %{buildroot}%{_mavenpomdir}/JPP.objectweb-asm-asm-analysis.pom
|
||||
%add_maven_depmap JPP.objectweb-asm-asm-analysis.pom %{name}/asm-analysis.jar
|
||||
install -pm 644 output/dist/lib/all/asm-all-%{version}.pom %{buildroot}%{_mavenpomdir}/%{name}-all-%{version}.pom
|
||||
%add_maven_depmap %{name}-all-%{version}.pom %{name}-all-%{version}.jar
|
||||
|
||||
install -m 644 %{SOURCE3} %{buildroot}%{_mavenpomdir}/JPP.objectweb-asm-asm-commons.pom
|
||||
%add_maven_depmap JPP.objectweb-asm-asm-commons.pom %{name}/asm-commons.jar
|
||||
install -pm 644 output/dist/lib/asm-%{version}.pom %{buildroot}%{_mavenpomdir}/%{name}/asm-%{version}.pom
|
||||
%add_maven_depmap %{name}/asm-%{version}.pom %{name}/asm-%{version}.jar
|
||||
|
||||
install -m 644 %{SOURCE4} %{buildroot}%{_mavenpomdir}/JPP.objectweb-asm-asm-tree.pom
|
||||
%add_maven_depmap JPP.objectweb-asm-asm-tree.pom %{name}/asm-tree.jar
|
||||
install -pm 644 output/dist/lib/asm-parent-%{version}.pom %{buildroot}%{_mavenpomdir}/%{name}/asm-parent-%{version}.pom
|
||||
%add_maven_depmap %{name}/asm-parent-%{version}.pom
|
||||
|
||||
install -m 644 %{SOURCE5} %{buildroot}%{_mavenpomdir}/JPP.objectweb-asm-asm-util.pom
|
||||
%add_maven_depmap JPP.objectweb-asm-asm-util.pom %{name}/asm-util.jar
|
||||
for i in analysis commons tree util xml; do
|
||||
install -pm 644 output/dist/lib/asm-$i-%{version}.pom %{buildroot}%{_mavenpomdir}/%{name}/asm-$i-%{version}.pom
|
||||
%add_maven_depmap %{name}/asm-$i-%{version}.pom %{name}/asm-$i-%{version}.jar
|
||||
done
|
||||
|
||||
install -m 644 %{SOURCE6} %{buildroot}%{_mavenpomdir}/JPP.objectweb-asm-asm-xml.pom
|
||||
%add_maven_depmap JPP.objectweb-asm-asm-xml.pom %{name}/asm-xml.jar
|
||||
|
||||
install -m 644 %{SOURCE7} %{buildroot}%{_mavenpomdir}/JPP.objectweb-asm-asm-all.pom
|
||||
%add_maven_depmap JPP.objectweb-asm-asm-all.pom %{name}/asm-all.jar
|
||||
|
||||
install -m 644 %{SOURCE8} %{buildroot}%{_mavenpomdir}/JPP.objectweb-asm-asm-parent.pom
|
||||
%add_maven_depmap JPP.objectweb-asm-asm-all.pom %{name}/asm-all.jar
|
||||
# javadoc
|
||||
install -d -m 755 %{buildroot}/%{_javadocdir}/%{name}-%{version}
|
||||
cp -pr output/dist/doc/javadoc/user/* %{buildroot}/%{_javadocdir}/%{name}-%{version}
|
||||
ln -s %{name}-%{version} %{buildroot}/%{_javadocdir}/%{name}
|
||||
%fdupes -s %{buildroot}
|
||||
%fdupes -s examples/
|
||||
|
||||
%files
|
||||
%defattr(0644,root,root,0755)
|
||||
%doc LICENSE.txt README.txt
|
||||
%dir %{_javadir}/%{name}
|
||||
%{_javadir}/%{name}/*.jar
|
||||
%{_mavenpomdir}/*
|
||||
%license LICENSE.txt
|
||||
%doc README.txt
|
||||
%{_javadir}/%{name}-all*.jar
|
||||
%{_javadir}/%{name}
|
||||
%{_mavenpomdir}/%{name}-all-%{version}.pom
|
||||
%{_mavenpomdir}/%{name}
|
||||
%if %{defined _maven_repository}
|
||||
%{_mavendepmapfragdir}/%{name}
|
||||
%else
|
||||
%{_datadir}/maven-metadata/%{name}.xml*
|
||||
%endif
|
||||
|
||||
%files javadoc
|
||||
%{_javadocdir}/%{name}-%{version}
|
||||
%{_javadocdir}/%{name}
|
||||
|
||||
%files examples
|
||||
%doc examples/*
|
||||
|
||||
%changelog
|
||||
|
Reference in New Issue
Block a user