diff --git a/SPECS/jfreechart.spec b/SPECS/jfreechart.spec index 456cd26..d266b96 100644 --- a/SPECS/jfreechart.spec +++ b/SPECS/jfreechart.spec @@ -1,6 +1,9 @@ %{?scl:%scl_package jfreechart} %{!?scl:%global pkg_name %{name}} +# Use java common's requires/provides generator +%{?java_common_find_provides_and_requires} + # Exclude generation of osgi() style provides, since they are not # SCL-namespaced and may conflict with base RHEL packages. # See: https://bugzilla.redhat.com/show_bug.cgi?id=1045437 @@ -12,7 +15,7 @@ Version: 1.0.14 # 60.X where X is an increasing int. 60 for rhel-6. We use # 70.X for rhel-7. For some reason we cannot rely on the # dist tag. -Release: 70.1%{?dist} +Release: 70.4%{?dist} Summary: Java chart library Group: Development/Libraries @@ -21,14 +24,18 @@ URL: http://www.jfree.org/jfreechart/ Source0: http://download.sourceforge.net/sourceforge/jfreechart/%{pkg_name}-%{version}.tar.gz Source1: bnd.properties -Requires: servlet java +Requires: java +Requires: servlet Requires: %{?scl_prefix}jcommon >= 1.0.17 -BuildRequires: %{requires} ant servlet +BuildRequires: %{?scl_prefix_java_common}ant +BuildRequires: %{?scl_prefix_java_common}mvn(javax.servlet:servlet-api) +BuildRequires: %{?scl_prefix}jcommon >= 1.0.17 +BuildRequires: %{?scl_prefix_java_common}javapackages-local %if 0%{?fedora} BuildRequires: eclipse-swt %endif # Required for converting jars to OSGi bundles -BuildRequires: aqute-bnd +BuildRequires: %{?scl_prefix_maven}aqute-bnd %{?scl:Requires: %scl_runtime} @@ -60,16 +67,20 @@ This package contains the API documentation for %{name}. %prep +%{?scl:scl enable %{scl_maven} %{scl} - << "EOF"} %setup -q -n %{pkg_name}-%{version} # Erase prebuilt files find \( -name '*.jar' -o -name '*.class' \) -exec rm -f '{}' \; %patch0 +%mvn_file org.jfree:%{pkg_name} %{pkg_name} +%pom_remove_dep xml-apis:xml-apis pom.xml +%{?scl:EOF} %build # jcommon comes from the SCL-ized package. That's why we need to source # the enable scriptlet. -%{?scl:scl enable %{scl} - << "EOF"} -CLASSPATH=$(build-classpath jcommon servlet) \ +%{?scl:scl enable %{scl_maven} %{scl} - << "EOF"} +CLASSPATH=$(build-classpath jcommon tomcat-servlet-api) \ ant -f ant/build.xml compile javadoc %if 0%{?fedora} @@ -83,33 +94,16 @@ ant -f ant/build-swt.xml \ # Convert to OSGi bundle java -Djfreechart.bundle.version="%{version}" -jar $(build-classpath aqute-bnd) \ wrap -output lib/%{pkg_name}-%{version}.bar -properties %{SOURCE1} lib/%{pkg_name}-%{version}.jar +mv lib/%{pkg_name}-%{version}.bar %{pkg_name}-%{version}.jar +%mvn_artifact pom.xml %{pkg_name}-%{version}.jar %{?scl:EOF} %install -# Directory structure -install -d $RPM_BUILD_ROOT%{_javadir}/%{pkg_name} -install -d $RPM_BUILD_ROOT%{_javadocdir}/%{pkg_name} -install -d $RPM_BUILD_ROOT%{_mavenpomdir} - -# JARs and JavaDoc -install -m 644 lib/jfreechart-%{version}.bar $RPM_BUILD_ROOT%{_javadir}/%{pkg_name}/%{pkg_name}.jar -%if 0%{?fedora} -install -m 644 lib/swtgraphics2d.jar $RPM_BUILD_ROOT%{_javadir}/%{pkg_name}/swtgraphics2d.jar -install -m 644 lib/jfreechart-%{version}-swt.jar $RPM_BUILD_ROOT%{_javadir}/%{pkg_name}/%{pkg_name}-swt.jar -%endif -cp -rp javadoc/. $RPM_BUILD_ROOT%{_javadocdir}/%{pkg_name} - -# POM -install -pm 644 pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{pkg_name}-%{pkg_name}.pom - -# DEPMAP -%add_maven_depmap JPP.%{pkg_name}-%{pkg_name}.pom %{pkg_name}/%{pkg_name}.jar +%{?scl:scl enable %{scl_maven} %{scl} - << "EOF"} +%mvn_install -J javadoc +%{?scl:EOF} -%files -%{_mavenpomdir}/* -%{_mavendepmapfragdir}/* -%dir %{_javadir}/%{pkg_name} -%{_javadir}/%{pkg_name}/%{pkg_name}.jar +%files -f .mfiles %doc ChangeLog licence-LGPL.txt NEWS README.txt %if 0%{?fedora} @@ -118,10 +112,19 @@ install -pm 644 pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{pkg_name}-%{pkg_nam %{_javadir}/%{name}/%{name}-swt*.jar %endif -%files javadoc -%{_javadocdir}/%{pkg_name} +%files javadoc -f .mfiles-javadoc %changelog +* Mon Jan 19 2015 Severin Gehwolf 1.0.14-70.4 +- Use java common's libs as BR. + +* Mon Jan 12 2015 Severin Gehwolf 1.0.14-70.3 +- Make package buildable with latest xmvn (2.2.x). + +* Fri Dec 19 2014 Severin Gehwolf 1.0.14-70.2 +- Use maven30 collection for building. +- Use java common's requires/provides generators. + * Mon Jun 23 2014 Severin Gehwolf 1.0.14-70.1 - Fix dependency on scl-runtime. - Bump release number to allow for in-place upgrade.