Blame SPECS/jcommon.spec

69d4b3
%{?scl:%scl_package jcommon}
69d4b3
%{!?scl:%global pkg_name %{name}}
69d4b3
69d4b3
# Use java common's requires/provides generator
69d4b3
%{?java_common_find_provides_and_requires}
69d4b3
69d4b3
%if 0%{?rhel}
69d4b3
69d4b3
%if 0%{?rhel} <= 6
69d4b3
  # EL 6
69d4b3
  %global custom_release 60
69d4b3
%else
69d4b3
  # EL 7
69d4b3
  %global custom_release 70
69d4b3
%endif
69d4b3
69d4b3
%else
69d4b3
69d4b3
%global custom_release 1
69d4b3
69d4b3
%endif
69d4b3
69d4b3
Name: %{?scl_prefix}jcommon
69d4b3
Version: 1.0.18
69d4b3
Release: %{custom_release}.2%{?dist}
69d4b3
Summary: JFree Java utility classes
69d4b3
License: LGPLv2+
69d4b3
Group: System Environment/Libraries
69d4b3
Source: http://downloads.sourceforge.net/jfreechart/%{pkg_name}-%{version}.tar.gz
69d4b3
Source2: bnd.properties
69d4b3
URL: http://www.jfree.org/jcommon
69d4b3
BuildRequires:  %{?scl_prefix_maven}javapackages-local
69d4b3
BuildRequires:  %{?scl_prefix_java-common}ant
69d4b3
# Required for converting jars to OSGi bundles
69d4b3
BuildRequires:  %{?scl_prefix_maven}aqute-bnd
69d4b3
BuildArch: noarch
69d4b3
69d4b3
%description
69d4b3
JCommon is a collection of useful classes used by 
69d4b3
JFreeChart, JFreeReport and other projects.
69d4b3
69d4b3
%package javadoc
69d4b3
Summary: Javadoc for %{name}
69d4b3
Group: Development/Documentation
69d4b3
%{?scl:Requires: %scl_runtime}
69d4b3
69d4b3
%description javadoc
69d4b3
Javadoc for %{name}.
69d4b3
69d4b3
%package xml
69d4b3
Summary: JFree XML utility classes
69d4b3
Group: System Environment/Libraries
69d4b3
Requires: %{name} = %{version}-%{release}
69d4b3
69d4b3
%description xml
69d4b3
Optional XML utility classes.
69d4b3
69d4b3
%prep
69d4b3
%{?scl:scl enable %{scl_maven} %{scl} - << "EOF"}
69d4b3
%setup -q -n %{pkg_name}-%{version}
69d4b3
find . -name "*.jar" -exec rm -f {} \;
69d4b3
%mvn_file org.jfree:%{pkg_name} %{pkg_name}
69d4b3
%{?scl:EOF}
69d4b3
69d4b3
%build
69d4b3
%{?scl:scl enable %{scl_maven} %{scl} - << "EOF"}
69d4b3
pushd ant
69d4b3
ant compile compile-xml javadoc
69d4b3
popd
69d4b3
# Convert to OSGi bundle
69d4b3
java -Djcommon.bundle.version="%{version}" \
69d4b3
     -jar $(build-classpath aqute-bnd) wrap -output %{pkg_name}-%{version}.bar -properties %{SOURCE2} %{pkg_name}-%{version}.jar
69d4b3
mv %{pkg_name}-%{version}.bar %{pkg_name}-%{version}.jar
69d4b3
%mvn_artifact pom.xml %{pkg_name}-%{version}.jar
69d4b3
%{?scl:EOF}
69d4b3
69d4b3
%install
69d4b3
%{?scl:scl enable %{scl_maven} %{scl} - << "EOF"}
69d4b3
%mvn_install -J javadoc
69d4b3
cp -p %{pkg_name}-xml-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{pkg_name}-xml.jar
69d4b3
%{?scl:EOF}
69d4b3
69d4b3
%files -f .mfiles
69d4b3
%doc licence-LGPL.txt README.txt
69d4b3
69d4b3
%files xml
69d4b3
%{_javadir}/%{pkg_name}-xml.jar
69d4b3
69d4b3
%files javadoc -f .mfiles-javadoc
69d4b3
69d4b3
%changelog
69d4b3
* Fri Jun 24 2016 Severin Gehwolf <sgehwolf@redhat.com> 1.0.18-2
69d4b3
- Change BR to rh-maven33-javapackages-local.
69d4b3
69d4b3
* Wed Jun 22 2016 Severin Gehwolf <sgehwolf@redhat.com> 1.0.18-1
69d4b3
- Rebuild for rh-thermostat16.