# # spec file for package cglib # # Copyright (c) 2018 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/ # %global tarball_name RELEASE_3_1 Name: cglib Version: 3.1 Release: 0 Summary: Code Generation Library License: Apache-2.0 Group: Development/Libraries/Java URL: http://cglib.sourceforge.net/ Source0: https://github.com/cglib/cglib/archive/%{tarball_name}.tar.gz Source1: http://central.maven.org/maven2/%{name}/%{name}/%{version}/%{name}-%{version}.pom # Remove the repackaging step that includes other jars into the final thing Patch0: %{name}-build_xml.patch Patch1: fix-javadoc.patch BuildRequires: ant >= 1.6 BuildRequires: fdupes BuildRequires: java-devel >= 1.8 # Needed for maven conversions BuildRequires: javapackages-local BuildRequires: objectweb-asm >= 5 Provides: %{name}-nohook = %{version}-%{release} Obsoletes: %{name}-nohook < %{version}-%{release} BuildArch: noarch %description cglib is a powerful, high performance and quality Code Generation Library, It is used to extend JAVA classes and implements interfaces at runtime. %package javadoc Summary: Code Generation Library Group: Development/Libraries/Java %description javadoc cglib is a powerful, high performance and quality Code Generation Library, It is used to extend JAVA classes and implements interfaces at runtime. %prep %setup -q -n %{name}-%{tarball_name} rm lib/*.jar build-jar-repository -s -p lib objectweb-asm ant %patch0 -p1 %patch1 -p1 %build ant \ -Dcompile.target=8 -Dcompile.source=8 \ jar javadoc %install # jars mkdir -p %{buildroot}%{_javadir} cp -p dist/%{name}-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar # javadoc mkdir -p %{buildroot}%{_javadocdir}/ cp -r docs %{buildroot}%{_javadocdir}/%{name} %fdupes -s %{buildroot}%{_javadocdir}/%{name} #maven pom install -dm 755 %{buildroot}%{_mavenpomdir} install -pm 0644 %{SOURCE1} %{buildroot}%{_mavenpomdir}/%{name}.pom %add_maven_depmap %{name}.pom %{name}.jar -a "net.sf.cglib:cglib,cglib:cglib-full,cglib:cglib-nodep,org.sonatype.sisu.inject:cglib" %files %license LICENSE %doc NOTICE %{_javadir}/*.jar %{_mavenpomdir}/* %config(noreplace) %{_datadir}/maven-metadata/%{name}.xml %files javadoc %{_javadocdir}/%{name} %changelog