cglib/cglib.spec

93 lines
2.7 KiB
RPMSpec

#
# 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 http://bugs.opensuse.org/
#
Name: cglib
Version: 2.2
Release: 0
Summary: Code Generation Library
License: Apache-2.0
Group: Development/Libraries/Java
Url: http://cglib.sourceforge.net/
Source0: %{name}-src-%{version}.jar
Source1: /%{name}-%{version}.pom
# Remove the repackaging step that includes other jars into the final thing
Patch0: %{name}-build_xml.patch
BuildRequires: ant >= 1.6
BuildRequires: fdupes
BuildRequires: java-devel >= 1.8
# Needed for maven conversions
BuildRequires: javapackages-local
BuildRequires: javapackages-tools
BuildRequires: objectweb-asm
BuildRequires: unzip
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 -T -c -n %{name}
unzip -q %{SOURCE0}
rm lib/*.jar
build-jar-repository -s -p lib objectweb-asm ant
%patch0 -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
mkdir -p %{buildroot}%{_mavenpomdir}
cp %{SOURCE1} %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
%add_maven_depmap JPP-%{name}.pom %{name}.jar
%files
%doc LICENSE NOTICE
%{_javadir}/*.jar
%{_mavenpomdir}/*
%config(noreplace) %{_datadir}/maven-metadata/%{name}.xml
%files javadoc
%{_javadocdir}/%{name}
%changelog