commit 2c37ebaed464b225b05178c4f4a6f1e2c3c218a4
Author: Michal Srb <msrb(a)redhat.com>
Date: Fri Jun 21 10:16:09 2013 +0200
Build from clean tarball
.gitignore | 1 +
clean-tarball.sh | 22 ++++++++++++++++++++++
junit.spec | 9 ++++++---
sources | 2 +-
4 files changed, 30 insertions(+), 4 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index abe74ba..f59ecd6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
junit3.8.2.zip
/junit-4.10.tar.xz
/r4.11.tar.gz
+/junit-4.11-clean.tar.gz
diff --git a/clean-tarball.sh b/clean-tarball.sh
new file mode 100755
index 0000000..7c90976
--- /dev/null
+++ b/clean-tarball.sh
@@ -0,0 +1,22 @@
+#!/bin/bash
+
+if [ $# -ne 1 ]; then
+ echo "Usage: ./clean-tarball VERSION"
+ exit 1
+fi
+
+VERSION=${1}
+NAME="junit"
+
+wget
https://github.com/${NAME}-team/${NAME}/archive/r${VERSION}.tar.gz
+tar xvf r${VERSION}.tar.gz
+
+(
+ cd ${NAME}-r${VERSION}
+ find . -name "*.jar" -delete
+ find . -name "*.class" -delete
+)
+
+tar czvf ${NAME}-${VERSION}-clean.tar.gz ${NAME}-r${VERSION}
+rm -Rf ${NAME}-${VERSION}.tar.gz
+
diff --git a/junit.spec b/junit.spec
index a32acbe..2858d9b 100644
--- a/junit.spec
+++ b/junit.spec
@@ -30,7 +30,7 @@
Name: junit
Version: 4.11
-Release: 2%{?dist}
+Release: 3%{?dist}
Epoch: 0
Summary: Java regression test package
License: CPL
@@ -38,7 +38,8 @@ URL:
http://www.junit.org/
Group: Development/Tools
BuildArch: noarch
-Source0:
https://github.com/%{name}-team/%{name}/archive/r%{version}.tar.gz
+# ./clean-tarball.sh %{version}
+Source0: %{name}-%{version}-clean.tar.gz
Source2: junit-OSGi-MANIFEST.MF
# Removing hamcrest source jar references (not available and/or necessary)
Patch0: %{name}-no-hamcrest-src.patch
@@ -95,7 +96,6 @@ Demonstrations and samples for %{name}.
%setup -q -n %{name}-r%{version}
%patch0 -p1
cp build/maven/junit-pom-template.xml pom.xml
-find -iname '*.class' -o -iname '*.jar' -delete
ln -s $(build-classpath hamcrest/core) lib/hamcrest-core-1.3.jar
%build
@@ -149,6 +149,9 @@ cp -pr %{name}%{version}-SNAPSHOT/%{name}/*
%{buildroot}%{_datadir}/%{name}/demo
%doc junit%{version}-SNAPSHOT/doc/*
%changelog
+* Fri Jun 21 2013 Michal Srb <msrb(a)redhat.com> - 0:4.11-3
+- Build from clean tarball
+
* Mon May 06 2013 Tomas Radej <tradej(a)redhat.com> - 0:4.11-2
- Removed uneeded dependencies
diff --git a/sources b/sources
index ba47ce6..6be7e5d 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-bf62095e510f50baf0962af329438647 r4.11.tar.gz
+f5f33e6ebaba68f3523c664f5a3860a7 junit-4.11-clean.tar.gz