%global install_loc %{_datadir}/eclipse/droplets/checkstyle
%global cs_ver 7.6
Summary: Checkstyle plugin for Eclipse
Name: eclipse-checkstyle
Version: 7.6.0
Release: 5%{?dist}
License: LGPLv2+
URL: http://eclipse-cs.sourceforge.net
BuildArch: noarch
# Redirected from https://sourceforge.net/p/eclipse-cs/git/ci/7.6.0/tarball
Source0: https://sourceforge.net/code-snapshots/git/e/ec/eclipse-cs/git.git/eclipse-cs-git-38600a3c2b01faba76ede3976da733fab453a535.zip
# Sent upstream: https://sourceforge.net/p/eclipse-cs/bugs/421/
Patch0: oxygen-compatibility.patch
Requires: checkstyle >= %{cs_ver}
Requires: antlr-tool
Requires: antlr4-runtime
Requires: guava
Requires: apache-commons-beanutils
Requires: apache-commons-collections
Requires: apache-commons-logging
Requires: dom4j
Requires: jfreechart
Requires: jfreechart-swt
BuildRequires: tycho
BuildRequires: tycho-extras
BuildRequires: eclipse-jdt
BuildRequires: checkstyle >= %{cs_ver}
BuildRequires: antlr-tool
BuildRequires: antlr4-runtime
BuildRequires: guava
BuildRequires: apache-commons-beanutils
BuildRequires: apache-commons-collections
BuildRequires: apache-commons-logging
BuildRequires: dom4j
BuildRequires: jfreechart
BuildRequires: jfreechart-swt
%description
The Eclipse Checkstyle plugin integrates the Checkstyle Java code
auditor into the Eclipse IDE. The plugin provides real-time feedback
to the user about violations of rules that check for coding style and
possible error prone code constructs.
%prep
%setup -q -n eclipse-cs-git-38600a3c2b01faba76ede3976da733fab453a535
%patch0 -p1
# Ensure correct JDT bundle is wired
sed -i -e '/org.eclipse.jdt.core/d' -e '/Require-Bundle/s/\(.*\)/\1,org.eclipse.jdt.core/' \
net.sf.eclipsecs.{core,ui}/META-INF/MANIFEST.MF
# Delete pre-built binaries
find -name '*.class' -exec rm -f '{}' \;
find -name '*.jar' -exec rm -f '{}' \;
find -name '*.zip' -exec rm -f '{}' \;
# Fix checkstyle libs manifest
sed -i -e "s|checkstyle-%{cs_ver}-all.jar|checkstyle.jar,antlr.jar,antlr4-runtime.jar,guava.jar,commons-beanutils.jar,commons-collections.jar,commons-logging.jar|g" \
net.sf.eclipsecs.checkstyle/META-INF/MANIFEST.MF net.sf.eclipsecs.checkstyle/build.properties
# Dir shaped bundles for those with embedded libs
sed -i -e "/ActivationPolicy/aEclipse-BundleShape: dir" net.sf.eclipsecs.{checkstyle,core,ui}/META-INF/MANIFEST.MF
pushd net.sf.eclipsecs.checkstyle
ln -s $(build-classpath checkstyle) checkstyle.jar
ln -s $(build-classpath guava) guava.jar
ln -s $(build-classpath antlr) antlr.jar
ln -s $(build-classpath antlr4-runtime) antlr4-runtime.jar
ln -s $(build-classpath commons-beanutils) commons-beanutils.jar
ln -s $(build-classpath commons-collections) commons-collections.jar
ln -s $(build-classpath commons-logging) commons-logging.jar
popd
pushd net.sf.eclipsecs.core
ln -s $(build-classpath dom4j/dom4j) lib/dom4j-1.6.1.jar
popd
pushd net.sf.eclipsecs.ui
ln -s $(build-classpath jcommon/jcommon) lib/jcommon-1.0.16.jar
ln -s $(build-classpath jfreechart/jfreechart) lib/jfreechart-1.0.14.jar
ln -s $(build-classpath jfreechart/jfreechart-swt) lib/jfreechart-1.0.14-swt.jar
popd
%pom_remove_plugin org.eclipse.tycho:tycho-packaging-plugin net.sf.eclipsecs.parent
%pom_disable_module ../net.sf.eclipsecs-updatesite net.sf.eclipsecs.parent
%pom_disable_module ../net.sf.eclipsecs.sample net.sf.eclipsecs.parent
# Unable to bundle checkstyle source into source plugin
%pom_remove_plugin :maven-antrun-plugin net.sf.eclipsecs.checkstyle
# Don't install poms
%mvn_package "::pom::" __noinstall
%build
%mvn_build -j -- -f net.sf.eclipsecs.parent/pom.xml
%install
%mvn_install
pushd $RPM_BUILD_ROOT%{install_loc}/plugins/net.sf.eclipsecs.checkstyle_*
rm *.jar
ln -s $(build-classpath checkstyle) checkstyle.jar
ln -s $(build-classpath guava) guava.jar
ln -s $(build-classpath antlr) antlr.jar
ln -s $(build-classpath antlr4-runtime) antlr4-runtime.jar
ln -s $(build-classpath commons-beanutils) commons-beanutils.jar
ln -s $(build-classpath commons-collections) commons-collections.jar
ln -s $(build-classpath commons-logging) commons-logging.jar
popd
pushd $RPM_BUILD_ROOT%{install_loc}/plugins/net.sf.eclipsecs.core_*
rm lib/*.jar
ln -s $(build-classpath dom4j/dom4j) lib/dom4j-1.6.1.jar
popd
pushd $RPM_BUILD_ROOT%{install_loc}/plugins/net.sf.eclipsecs.ui_*
rm lib/*.jar
ln -s $(build-classpath jcommon/jcommon) lib/jcommon-1.0.16.jar
ln -s $(build-classpath jfreechart/jfreechart) lib/jfreechart-1.0.14.jar
ln -s $(build-classpath jfreechart/jfreechart-swt) lib/jfreechart-1.0.14-swt.jar
popd
%files -f .mfiles
%license net.sf.eclipsecs-feature/license.html
%changelog
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 7.6.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Wed May 9 2018 Alexander Kurtakov <akurtako@redhat.com> 7.6.0-4
- Adjust for the removed extra eclipse dir in droplets.
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 7.6.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 7.6.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Fri May 05 2017 Mat Booth <mat.booth@redhat.com> - 7.6.0-1
- Update to latest upstream release and modernise spec file
- Add patch for compatibility with Eclipse Oxygen
- Resolves: rhbz#1448554, rhbz#1366888
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 6.11.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 6.11.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Mon Nov 30 2015 Mikolaj Izdebski <mizdebsk@redhat.com> - 6.11.1-1
- Update to upstream version 6.11.1
* Fri Sep 04 2015 Roland Grunberg <rgrunber@redhat.com> - 6.5.0-3
- Minor changes to build as a droplet.
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 6.5.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Thu May 14 2015 Alexander Kurtakov <akurtako@redhat.com> 6.5.0-1
- Update to upstream 6.5.0.
* Fri Feb 6 2015 Mikolaj Izdebski <mizdebsk@redhat.com> - 5.6.1-5
- Rebuild to generate missing OSGi auto-requires
* Fri Dec 5 2014 Alexander Kurtakov <akurtako@redhat.com> 5.6.1-4
- Build with xmvn.
* Wed Sep 17 2014 Alexander Kurtakov <akurtako@redhat.com> 5.6.1-3
- Fix build for new jcommon path.
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.6.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Fri Aug 16 2013 Mat Booth <fedora@matbooth.co.uk> 5.6.1-1
- Update to 5.6.1
- Build with maven/tycho
- Drop upstreamed patches
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.1.0-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Mon Apr 22 2013 Mat Booth <fedora@matbooth.co.uk> 5.1.0-8
- Fix broken symlink to beanutils, remove unused patches.
- Add missing runtime requirements.
- Patch out checks that have been removed in later versions of checkstyle.
- Minor changes to conform better to guidelines.
* Thu Feb 21 2013 Alexander Kurtakov <akurtako@redhat.com> 5.1.0-7
- Switch to eclipse-pdebuild command.
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.1.0-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.1.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.1.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.1.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Mon Oct 25 2010 Alexander Kurtakov <akurtako@redhat.com> 5.1.0-2
- Don't have strict requires on checkstyle.
* Wed Jul 7 2010 Alexander Kurtakov <akurtako@redhat.com> 5.1.0-1
- Update to 5.1.
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.0.1-14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
* Tue Jul 21 2009 Alexander Kurtakov <akurtako@redhat.com> 4.0.1-13
- Fix build with Eclipse 3.5.
- Remove gcj_support.
* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.0.1-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
* Wed Jul 30 2008 Andrew Overholt <overholt@redhat.com> 4.0.1-11
- Update for Eclipse SDK 3.4
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 4.0.1-10
- Autorebuild for GCC 4.3
* Wed Aug 15 2007 Rob Myers <rob.myers@gtri.gatech.edu> 4.0.1-9
- Require eclipse-jdt because checkstyle isn't useful without it
* Fri Aug 03 2007 Rob Myers <rob.myers@gtri.gatech.edu> 4.0.1-8
- update for eclipse 3.3
* Thu Aug 02 2007 Rob Myers <rob.myers@gtri.gatech.edu> 4.0.1-7
- update license from LGPL to LGPLv2+
* Wed May 16 2007 Rob Myers <rob.myers@gtri.gatech.edu> 4.0.1-6
- remove epoch from changelog
* Tue May 15 2007 Rob Myers <rob.myers@gtri.gatech.edu> 4.0.1-5
- add eclipse_ver
- include licenses
- spec cleanup
* Sat May 12 2007 Rob Myers <rob.myers@gtri.gatech.edu> 4.0.1-4
- add gcj_support
- use wildcard to match eclipse library jar for all build architectures
- fine tune Requires
* Fri May 11 2007 Rob Myers <rob.myers@gtri.gatech.edu> 4.0.1-1
- first build for fc7