[packages/oracle-java7] add get-source.sh to assist downloading

glen glen at pld-linux.org
Sat May 16 00:01:55 CEST 2015


commit 09519819c9d0f13984866397cffdf0f04c1976f2
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Sat May 16 01:00:16 2015 +0300

    add get-source.sh to assist downloading

 get-source.sh     | 39 +++++++++++++++++++++++++++++++++++++++
 oracle-java7.spec |  6 +++---
 2 files changed, 42 insertions(+), 3 deletions(-)
---
diff --git a/oracle-java7.spec b/oracle-java7.spec
index 0ecebea..3c8ec3a 100644
--- a/oracle-java7.spec
+++ b/oracle-java7.spec
@@ -32,14 +32,14 @@ License:	restricted, distributable
 Group:		Development/Languages/Java
 # Download URL (requires JavaScript and interactive license agreement):
 # http://www.oracle.com/technetwork/java/javase/downloads/index.html
-Source0:	jdk-%{src_ver}-linux-i586.tar.gz
+Source0:	http://download.oracle.com/otn-pub/java/jdk/%{src_ver}-%{sub_ver}/jdk-%{src_ver}-linux-i586.tar.gz
 # Source0-md5:	0811a4045714bd8f1e1577e318528597
-Source1:	jdk-%{src_ver}-linux-x64.tar.gz
+Source1:	http://download.oracle.com/otn-pub/java/jdk/%{src_ver}-%{sub_ver}/jdk-%{src_ver}-linux-x64.tar.gz
 # Source1-md5:	6152f8a7561acf795ca4701daa10a965
 Source2:	Test.java
 Source3:	Test.class
 # http://www.oracle.com/technetwork/java/javase/downloads/jce-7-download-432124.html
-Source4:	UnlimitedJCEPolicyJDK7.zip
+Source4:	http://download.oracle.com/otn-pub/java/jce/7/UnlimitedJCEPolicyJDK7.zip
 # Source4-md5:	c47e997b90ddfd0d813a37ccc97fb933
 Patch0:		%{name}-desktop.patch
 URL:		http://www.oracle.com/technetwork/java/javase/overview/index.html
diff --git a/get-source.sh b/get-source.sh
new file mode 100755
index 0000000..e84d8d0
--- /dev/null
+++ b/get-source.sh
@@ -0,0 +1,39 @@
+#!/bin/sh
+# Usage:
+# ./get-source.sh
+# Author: Elan Ruusamäe <glen at pld-linux.org>
+#
+# Idea based on omnibus-software jre package
+# https://github.com/opscode/omnibus-software/blob/master/config/software/jre.rb
+
+package=java7
+specfile=oracle-$package.spec
+
+# abort on errors
+set -e
+# work in package dir
+dir=$(dirname "$0")
+cd "$dir"
+
+refurl=http://www.oracle.com/technetwork/java/javase/downloads/
+licname="Oracle Binary Code License Agreement for Java SE"
+licurl=http://www.oracle.com/technetwork/java/javase/terms/license/
+cookie=accept-securebackup-cookie
+
+cat <<EOF
+
+You must accept the $licname
+to download this software.
+
+$licurl
+
+Press "ENTER" to Accept License Agreement
+Press Ctrl-C to Decline License Agreement
+
+EOF
+read license
+
+urls=$(builder -su *.spec | grep http://)
+for url in $urls; do
+	wget -c --header "Cookie: oraclelicense=$cookie; gpw_e24=$refurl" "$url"
+done
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/oracle-java7.git/commitdiff/09519819c9d0f13984866397cffdf0f04c1976f2



More information about the pld-cvs-commit mailing list