[eclipse-checkstyle: 1/2] Update to 5.6.1

mbooth mbooth at fedoraproject.org
Fri Aug 16 12:52:49 UTC 2013


commit 3264723e789bd8f42dbfe2c2b21aeb09cc3dbc93
Author: Mat Booth <fedora at matbooth.co.uk>
Date:   Fri Aug 16 13:48:55 2013 +0100

    Update to 5.6.1
    
    - Build with maven/tycho
    - Drop upstreamed patch

 .gitignore                        |    1 +
 eclipse-checkstyle.spec           |  136 ++++++++++++++++++++++---------------
 eclipse-eclipsecs-fetch-src.sh    |   19 ++---
 itext-rtf-remove.patch            |   20 ------
 remove-double-locking-check.patch |   20 ------
 sources                           |    2 +-
 unpack-plugins.patch              |   18 ++---
 7 files changed, 98 insertions(+), 118 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 625ff64..3566a61 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
 CheckstylePlugin-v4_0_1.tar.bz2
 eclipse-checkstyle-5.1.0.tar.xz
+/eclipse-checkstyle-5.6.1.tar.xz
diff --git a/eclipse-checkstyle.spec b/eclipse-checkstyle.spec
index 719ee35..44802e1 100644
--- a/eclipse-checkstyle.spec
+++ b/eclipse-checkstyle.spec
@@ -1,25 +1,24 @@
-%global eclipse_base %{_libdir}/eclipse
 %global install_loc %{_datadir}/eclipse/dropins/checkstyle
-%global cs_ver 5.1
-%global eclipse_ver 3.5
+%global cs_ver 5.6
 
 Summary:   Checkstyle plugin for Eclipse
 Name:      eclipse-checkstyle
-Version:   5.1.0
-Release:   8%{?dist}
+Version:   5.6.1
+Release:   1%{?dist}
 License:   LGPLv2+
 Group:     Development/Tools
 URL:       http://eclipse-cs.sourceforge.net
-BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
 BuildArch: noarch
 
-Source0: %{name}-%{version}.tar.xz 
+# Source tarball generated from the below shell script
+Source0: %{name}-%{version}.tar.xz
+# Script to generate above tarball
 Source10: eclipse-eclipsecs-fetch-src.sh
-Patch0:  itext-rtf-remove.patch
+
+# Unpack plugins so we can symlink to system jars
 Patch1:  unpack-plugins.patch
-Patch2:  remove-double-locking-check.patch
 
-Requires: eclipse-platform >= 1:%{eclipse_ver}
+Requires: eclipse-platform
 Requires: eclipse-jdt
 Requires: checkstyle >= 0:%{cs_ver}
 Requires: antlr-tool
@@ -30,10 +29,17 @@ Requires: apache-commons-io
 Requires: apache-commons-lang
 Requires: apache-commons-logging
 Requires: dom4j
+Requires: jfreechart
+Requires: jfreechart-swt
 
 BuildRequires: java-devel
-BuildRequires: jpackage-utils >= 0:1.5
-BuildRequires: eclipse-pde >= 1:%{eclipse_ver}
+BuildRequires: jpackage-utils
+BuildRequires: maven-local
+BuildRequires: tycho
+BuildRequires: xml-maven-plugin
+BuildRequires: feclipse-maven-plugin
+BuildRequires: eclipse-pde
+
 BuildRequires: checkstyle >= 0:%{cs_ver}
 BuildRequires: antlr-tool
 BuildRequires: guava
@@ -42,8 +48,9 @@ BuildRequires: apache-commons-collections
 BuildRequires: apache-commons-io
 BuildRequires: apache-commons-lang
 BuildRequires: apache-commons-logging
-BuildRequires: jfreechart
 BuildRequires: dom4j
+BuildRequires: jfreechart
+BuildRequires: jfreechart-swt
 
 %description
 The Eclipse Checkstyle plugin integrates the Checkstyle Java code
@@ -53,60 +60,72 @@ possible error prone code constructs.
 
 %prep
 %setup -q
-%patch0 -R
 %patch1
-%patch2
 
+# 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,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
+
+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 commons-beanutils)   commons-beanutils.jar
+ln -s $(build-classpath commons-collections) commons-collections.jar
+ln -s $(build-classpath commons-logging)     commons-logging.jar
+popd
 
-sed -i -e "s|checkstyle-all-5.1.jar|checkstyle.jar,antlr.jar,guava.jar,commons-beanutils.jar,commons-collections.jar,commons-logging.jar|g" \
-  net.sf.eclipsecs.checkstyle/META-INF/MANIFEST.MF
+pushd net.sf.eclipsecs.core
+ln -s %{_javadir}/commons-io.jar   lib/commons-io-1.2.jar
+ln -s %{_javadir}/commons-lang.jar lib/commons-lang-2.3.jar
+ln -s %{_javadir}/dom4j.jar        lib/dom4j-1.6.1.jar
+popd
 
-ln -s $(build-classpath checkstyle) net.sf.eclipsecs.checkstyle/checkstyle.jar
-ln -s $(build-classpath antlr) net.sf.eclipsecs.checkstyle/antlr.jar
-ln -s $(build-classpath guava) net.sf.eclipsecs.checkstyle/guava.jar
-ln -s $(build-classpath commons-beanutils) net.sf.eclipsecs.checkstyle/commons-beanutils.jar
-ln -s $(build-classpath commons-collections) net.sf.eclipsecs.checkstyle/commons-collections.jar
-ln -s $(build-classpath commons-logging) net.sf.eclipsecs.checkstyle/commons-logging.jar
+pushd net.sf.eclipsecs.ui
+ln -s %{_javadir}/jcommon.jar                   lib/jcommon-1.0.16.jar
+ln -s %{_javadir}/jfreechart/jfreechart.jar     lib/jfreechart-1.0.14.jar
+ln -s %{_javadir}/jfreechart/jfreechart-swt.jar lib/jfreechart-1.0.14-swt.jar
+popd
 
-ln -s %{_javadir}/commons-io.jar net.sf.eclipsecs.core/lib/commons-io-1.2.jar
-ln -s %{_javadir}/commons-lang.jar net.sf.eclipsecs.core/lib/commons-lang-2.3.jar
-ln -s %{_javadir}/dom4j.jar net.sf.eclipsecs.core/lib/dom4j-1.6.1.jar
+%build
+pushd net.sf.eclipsecs.parent
+mvn-rpmbuild clean package -DskipTychoVersionCheck
+popd
 
-ln -s %{_javadir}/jcommon.jar net.sf.eclipsecs.ui/lib/jcommon-1.0.9.jar
-ln -s %{_javadir}/jfreechart/jfreechart.jar net.sf.eclipsecs.ui/lib/jfreechart-1.0.5.jar
-ln -s %{_javadir}/itext.jar net.sf.eclipsecs.ui/lib/itext-2.0.1.jar
+%install
+pushd net.sf.eclipsecs.parent
+mvn-rpmbuild org.fedoraproject:feclipse-maven-plugin:install -DskipTychoVersionCheck \
+  -DsourceRepo=../net.sf.eclipsecs-updatesite/target/site \
+  -DtargetLocation=$RPM_BUILD_ROOT%{install_loc}/eclipse
+popd
 
-rm -fr net.sf.eclipsecs.ui/src/net/sf/eclipsecs/ui/stats/export/internal/RTFStatsExporter.java
+pushd $RPM_BUILD_ROOT%{install_loc}/eclipse/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 commons-beanutils)   commons-beanutils.jar
+ln -s $(build-classpath commons-collections) commons-collections.jar
+ln -s $(build-classpath commons-logging)     commons-logging.jar
+popd
 
-%build
-eclipse-pdebuild -f net.sf.eclipsecs
+pushd $RPM_BUILD_ROOT%{install_loc}/eclipse/plugins/net.sf.eclipsecs.core_*
+rm lib/*.jar
+ln -s %{_javadir}/commons-io.jar   lib/commons-io-1.2.jar
+ln -s %{_javadir}/commons-lang.jar lib/commons-lang-2.3.jar
+ln -s %{_javadir}/dom4j.jar        lib/dom4j-1.6.1.jar
+popd
 
-%install
-install -d -m 755 $RPM_BUILD_ROOT%{install_loc}
-
-unzip -q -o -d $RPM_BUILD_ROOT%{install_loc} \
- build/rpmBuild/net.sf.eclipsecs.zip
-
-pushd $RPM_BUILD_ROOT%{install_loc}/eclipse/plugins
-rm -fr net.sf.eclipsecs.checkstyle_0.0.0/*.jar
-ln -s $(build-classpath checkstyle) net.sf.eclipsecs.checkstyle_0.0.0/checkstyle.jar
-ln -s $(build-classpath guava) net.sf.eclipsecs.checkstyle_0.0.0/guava.jar
-ln -s $(build-classpath antlr) net.sf.eclipsecs.checkstyle_0.0.0/antlr.jar
-ln -s $(build-classpath commons-beanutils) net.sf.eclipsecs.checkstyle_0.0.0/commons-beanutils.jar
-ln -s $(build-classpath commons-collections) net.sf.eclipsecs.checkstyle_0.0.0/commons-collections.jar
-ln -s $(build-classpath commons-logging) net.sf.eclipsecs.checkstyle_0.0.0/commons-logging.jar
-
-rm -fr net.sf.eclipsecs.core_0.0.0/lib/*.jar
-ln -s %{_javadir}/commons-io.jar net.sf.eclipsecs.core_0.0.0/lib/commons-io-1.2.jar
-ln -s %{_javadir}/commons-lang.jar net.sf.eclipsecs.core_0.0.0/lib/commons-lang-2.3.jar
-ln -s %{_javadir}/dom4j.jar net.sf.eclipsecs.core_0.0.0/lib/dom4j-1.6.1.jar
-
-rm -fr net.sf.eclipsecs.ui_0.0.0/lib/*.jar
-ln -s %{_javadir}/jcommon.jar net.sf.eclipsecs.ui_0.0.0/lib/jcommon-1.0.9.jar
-ln -s %{_javadir}/jfreechart/jfreechart.jar net.sf.eclipsecs.ui_0.0.0/lib/jfreechart-1.0.5.jar
-ln -s %{_javadir}/itext.jar net.sf.eclipsecs.ui_0.0.0/lib/itext-2.0.1.jar
+pushd $RPM_BUILD_ROOT%{install_loc}/eclipse/plugins/net.sf.eclipsecs.ui_*
+rm lib/*.jar
+ln -s %{_javadir}/jcommon.jar                   lib/jcommon-1.0.16.jar
+ln -s %{_javadir}/jfreechart/jfreechart.jar     lib/jfreechart-1.0.14.jar
+ln -s %{_javadir}/jfreechart/jfreechart-swt.jar lib/jfreechart-1.0.14-swt.jar
 popd
 
 %files
@@ -114,6 +133,11 @@ popd
 %{install_loc}
 
 %changelog
+* Fri Aug 16 2013 Mat Booth <fedora at matbooth.co.uk> 5.6.1-1
+- Update to 5.6.1
+- Build with maven/tycho
+- Drop upstreamed patches
+
 * Mon Apr 22 2013 Mat Booth <fedora at matbooth.co.uk> 5.1.0-8
 - Fix broken symlink to beanutils, remove unused patches.
 - Add missing runtime requirements.
diff --git a/eclipse-eclipsecs-fetch-src.sh b/eclipse-eclipsecs-fetch-src.sh
index 1c069c2..da11b1e 100644
--- a/eclipse-eclipsecs-fetch-src.sh
+++ b/eclipse-eclipsecs-fetch-src.sh
@@ -1,27 +1,24 @@
 #!/bin/sh
-usage='usage: $0 <tag>'
-tag=v5_1_0_final
-tar_name=eclipse-checkstyle-5.1.0
-
-if [ "x$tag"x = 'xx' ]; then
-   echo >&2 "$usage"
-   exit 1
-fi
+date="2013-06-28"
+tar_name=eclipse-checkstyle-5.6.1
 
 rm -fr $tar_name && mkdir $tar_name
 pushd $tar_name
 
 # Fetch plugins
 for f in \
-net.sf.eclipsecs-feature \
 net.sf.eclipsecs.branding \
+net.sf.eclipsecs.checkstyle \
 net.sf.eclipsecs.core \
 net.sf.eclipsecs.doc \
-net.sf.eclipsecs.checkstyle \
+net.sf.eclipsecs.sample \
+net.sf.eclipsecs.parent \
 net.sf.eclipsecs.ui \
+net.sf.eclipsecs-feature \
+net.sf.eclipsecs-updatesite \
 ; do
 cvs -d :pserver:anonymous at eclipse-cs.cvs.sourceforge.net:/cvsroot/eclipse-cs \
-export -r $tag $f;
+  export -D "$date" $f;
 done
 
 popd
diff --git a/sources b/sources
index 8c092c9..55fe4ee 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-177dd23d0913ce4eb97d88588c3bc270  eclipse-checkstyle-5.1.0.tar.xz
+ef1becd55702d52c31c3611a3dbce9e0  eclipse-checkstyle-5.6.1.tar.xz
diff --git a/unpack-plugins.patch b/unpack-plugins.patch
index 4120d3d..5e97e47 100644
--- a/unpack-plugins.patch
+++ b/unpack-plugins.patch
@@ -1,21 +1,19 @@
---- net.sf.eclipsecs-feature/feature.xml.orig	2010-02-22 23:07:17.000000000 +0000
-+++ net.sf.eclipsecs-feature/feature.xml	2013-04-22 14:39:05.796604003 +0100
-@@ -47,8 +47,7 @@
-          id="net.sf.eclipsecs.core"
+--- net.sf.eclipsecs-feature/feature.xml.orig	2013-08-16 09:56:58.590746481 +0100
++++ net.sf.eclipsecs-feature/feature.xml	2013-08-16 09:57:23.848836927 +0100
+@@ -47,7 +47,7 @@
           download-size="0"
           install-size="0"
--         version="0.0.0"
+          version="5.6.1.qualifier"
 -         unpack="false"/>
-+         version="0.0.0"/>
++         unpack="true"/>
  
     <plugin
           id="net.sf.eclipsecs.doc"
-@@ -67,7 +66,6 @@
-          id="net.sf.eclipsecs.ui"
+@@ -67,6 +67,6 @@
           download-size="0"
           install-size="0"
--         version="0.0.0"
+          version="5.6.1.qualifier"
 -         unpack="false"/>
-+         version="0.0.0"/>
++         unpack="true"/>
  
  </feature>


More information about the scm-commits mailing list