Blame SPECS/jfreechart.spec

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