Blame SPECS/jfreechart.spec

35c74b
%{?scl:%scl_package jfreechart}
35c74b
%{!?scl:%global pkg_name %{name}}
35c74b
0b821b
# Use java common's requires/provides generator
0b821b
%{?java_common_find_provides_and_requires}
0b821b
35c74b
# Exclude generation of osgi() style provides, since they are not
35c74b
# SCL-namespaced and may conflict with base RHEL packages.
35c74b
# See: https://bugzilla.redhat.com/show_bug.cgi?id=1045437
35c74b
%global __provides_exclude ^osgi(.*)$
35c74b
35c74b
Name:           %{?scl_prefix}jfreechart
35c74b
Version:        1.0.14
39266e
# Release should be higher than el6 builds. Use convention
39266e
# 60.X where X is an increasing int. 60 for rhel-6. We use
39266e
# 70.X for rhel-7. For some reason we cannot rely on the
39266e
# dist tag.
0b821b
Release:        70.4%{?dist}
35c74b
Summary:        Java chart library
35c74b
35c74b
Group:          Development/Libraries
35c74b
License:        LGPLv2+
35c74b
URL:            http://www.jfree.org/jfreechart/
35c74b
Source0:        http://download.sourceforge.net/sourceforge/jfreechart/%{pkg_name}-%{version}.tar.gz
35c74b
Source1:        bnd.properties
35c74b
0b821b
Requires:       java
0b821b
Requires:       servlet
35c74b
Requires:       %{?scl_prefix}jcommon >= 1.0.17
0b821b
BuildRequires:  %{?scl_prefix_java_common}ant
0b821b
BuildRequires:  %{?scl_prefix_java_common}mvn(javax.servlet:servlet-api)
0b821b
BuildRequires:  %{?scl_prefix}jcommon >= 1.0.17
0b821b
BuildRequires:  %{?scl_prefix_java_common}javapackages-local
35c74b
%if 0%{?fedora}
35c74b
BuildRequires:  eclipse-swt
35c74b
%endif
35c74b
# Required for converting jars to OSGi bundles
0b821b
BuildRequires:  %{?scl_prefix_maven}aqute-bnd
35c74b
35c74b
%{?scl:Requires: %scl_runtime}
35c74b
35c74b
BuildArch:      noarch
35c74b
Patch0:         remove_itext_dep.patch
35c74b
35c74b
%description
35c74b
JFreeChart is a free 100% Java chart library that makes it easy for
35c74b
developers to display professional quality charts in their applications.
35c74b
35c74b
%if 0%{?fedora}
35c74b
%package swt
35c74b
Summary:        Experimental swt extension for jfreechart
35c74b
Group:          Development/Libraries
35c74b
Requires:       %{name} = %{version}-%{release}
35c74b
Requires:       eclipse-swt jpackage-utils
35c74b
35c74b
%description swt
35c74b
Experimental swt extension for jfreechart.
35c74b
%endif
35c74b
35c74b
%package javadoc
35c74b
Summary:        Javadocs for %{name}
35c74b
Group:          Documentation
39266e
%{?scl:Requires: %scl_runtime}
35c74b
35c74b
%description javadoc
35c74b
This package contains the API documentation for %{name}.
35c74b
35c74b
35c74b
%prep
0b821b
%{?scl:scl enable %{scl_maven} %{scl} - << "EOF"}
35c74b
%setup -q -n %{pkg_name}-%{version}
35c74b
# Erase prebuilt files
35c74b
find \( -name '*.jar' -o -name '*.class' \) -exec rm -f '{}' \;
35c74b
%patch0
0b821b
%mvn_file org.jfree:%{pkg_name} %{pkg_name}
0b821b
%pom_remove_dep xml-apis:xml-apis pom.xml
0b821b
%{?scl:EOF}
35c74b
35c74b
%build
35c74b
# jcommon comes from the SCL-ized package. That's why we need to source
35c74b
# the enable scriptlet.
0b821b
%{?scl:scl enable %{scl_maven} %{scl} - << "EOF"}
0b821b
CLASSPATH=$(build-classpath jcommon tomcat-servlet-api) \
35c74b
    ant -f ant/build.xml compile javadoc
35c74b
35c74b
%if 0%{?fedora}
35c74b
# See RHBZ#912664. There seems to be some dispute about build-classpath.
35c74b
# So don't use it for swt.
35c74b
ant -f ant/build-swt.xml \
35c74b
        -Dswt.jar=%{_libdir}/eclipse/swt.jar \
35c74b
        -Djcommon.jar=$(build-classpath jcommon) \
35c74b
        -Djfreechart.jar=lib/jfreechart-%{version}.jar
35c74b
%endif
35c74b
# Convert to OSGi bundle
35c74b
java -Djfreechart.bundle.version="%{version}" -jar $(build-classpath aqute-bnd) \
35c74b
   wrap -output lib/%{pkg_name}-%{version}.bar -properties %{SOURCE1} lib/%{pkg_name}-%{version}.jar
0b821b
mv lib/%{pkg_name}-%{version}.bar %{pkg_name}-%{version}.jar
0b821b
%mvn_artifact pom.xml %{pkg_name}-%{version}.jar
35c74b
%{?scl:EOF}
35c74b
35c74b
%install
0b821b
%{?scl:scl enable %{scl_maven} %{scl} - << "EOF"}
0b821b
%mvn_install -J javadoc
0b821b
%{?scl:EOF}
35c74b
0b821b
%files -f .mfiles
35c74b
%doc ChangeLog licence-LGPL.txt NEWS README.txt
35c74b
35c74b
%if 0%{?fedora}
35c74b
%files swt
35c74b
%{_javadir}/%{name}/swtgraphics2d*.jar
35c74b
%{_javadir}/%{name}/%{name}-swt*.jar
35c74b
%endif
35c74b
0b821b
%files javadoc -f .mfiles-javadoc
35c74b
35c74b
%changelog
0b821b
* Mon Jan 19 2015 Severin Gehwolf <sgehwolf@redhat.com> 1.0.14-70.4
0b821b
- Use java common's libs as BR.
0b821b
0b821b
* Mon Jan 12 2015 Severin Gehwolf <sgehwolf@redhat.com> 1.0.14-70.3
0b821b
- Make package buildable with latest xmvn (2.2.x).
0b821b
0b821b
* Fri Dec 19 2014 Severin Gehwolf <sgehwolf@redhat.com> 1.0.14-70.2
0b821b
- Use maven30 collection for building.
0b821b
- Use java common's requires/provides generators.
0b821b
39266e
* Mon Jun 23 2014 Severin Gehwolf <sgehwolf@redhat.com> 1.0.14-70.1
39266e
- Fix dependency on scl-runtime.
39266e
- Bump release number to allow for in-place upgrade.
39266e
35c74b
* Fri Dec 20 2013 Severin Gehwolf <sgehwolf@redhat.com> 1.0.14-14
35c74b
- Don't generate osgi() style provides.
35c74b
- Resolves: RHBZ#1045437.
35c74b
35c74b
* Wed Nov 27 2013 Severin Gehwolf <sgehwolf@redhat.com> 1.0.14-13
35c74b
- Properly enalbe SCL.
35c74b
35c74b
* Mon Nov 11 2013 Severin Gehwolf <sgehwolf@redhat.com> 1.0.14-12
35c74b
- Use build-classpath which now accounts for SCL-ized deps if
35c74b
  properly enabled.
35c74b
35c74b
* Tue Sep 17 2013 Severin Gehwolf <sgehwolf@redhat.com> 1.0.14-11
35c74b
- BR SCL-ized jcommon package.
35c74b
- SCL-ize ant build command.
35c74b
35c74b
* Wed Aug 28 2013 Severin Gehwolf <sgehwolf@redhat.com> 1.0.14-10
35c74b
- SCL-ize package.
35c74b
35c74b
* Tue Feb 19 2013 Severin Gehwolf <sgehwolf@redhat.com> 1.0.14-9
35c74b
- Fix FTBFS due to build-classpath not finding swt.jar any
35c74b
  longer. See RHBZ#912664.
35c74b
35c74b
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.14-8
35c74b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
35c74b
35c74b
* Wed Nov 21 2012 Severin Gehwolf <sgehwolf@redhat.com> 1.0.14-7
35c74b
- Remove itext dependency in pom.
35c74b
35c74b
* Fri Nov 16 2012 Severin Gehwolf <sgehwolf@redhat.com> 1.0.14-6
35c74b
- Conditionally build jfreechart-swt.
35c74b
35c74b
* Mon Sep 17 2012 Severin Gehwolf <sgehwolf@redhat.com> 1.0.14-4
35c74b
- Set proper Bundle-{Version,SymbolicName,Name} in manifest.
35c74b
35c74b
* Tue Jul 24 2012 Severin Gehwolf <sgehwolf@redhat.com> 1.0.14-3
35c74b
- Add aqute bnd instructions so as to produce OSGi metadata.
35c74b
- Based on kdaniel's suggestion, use build-classpath script to find swt
35c74b
35c74b
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.14-2
35c74b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
35c74b
35c74b
* Mon Apr 23 2012 Alexander Kurtakov <akurtako@redhat.com> 1.0.14-1
35c74b
- Update to new upstream version 1.0.14.
35c74b
- Use pom.xml file from the tarball.
35c74b
35c74b
* Wed Feb 15 2012 Marek Goldmann <mgoldman@redhat.com> 1.0.13-5
35c74b
- Added Maven POM: BZ#789586
35c74b
35c74b
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.13-4
35c74b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
35c74b
35c74b
* Wed Jun 29 2011 Alexander Kurtakov <akurtako@redhat.com> 1.0.13-3
35c74b
- Adapt to current guidelines.
35c74b
35c74b
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.13-2
35c74b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
35c74b
35c74b
* Mon Apr 19 2010 Lubomir Rintel <lkundrak@v3.sk> - 1.0.13-1
35c74b
- Update to a later release
35c74b
- Cosmetic fixes
35c74b
35c74b
* Mon Apr 19 2010 Lubomir Rintel <lkundrak@v3.sk> - 1.0.10-4
35c74b
- Enable SWT support (ELMORABITY Mohamed, #583339)
35c74b
35c74b
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.10-3
35c74b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
35c74b
35c74b
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.10-2
35c74b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
35c74b
35c74b
* Sat Jul 19 2008 Lubomir Rintel (Fedora Astronomy) <lkundrak@fedoraproject.org> - 1.0.10-1
35c74b
- Initial packaging