JavaPackageBuildNewVersions

参与到Ubuntu的翻译中来
回复
头像
oneleaf
论坛管理员
帖子: 10208
注册时间: 2005-03-27 0:06
系统: Ubuntu 12.04
送出感谢: 7 次
接收感谢: 99 次

JavaPackageBuildNewVersions

#1

帖子 oneleaf » 2005-08-26 23:52

HowTo build the Java package version 1.5.0 Update 4

by Markus Kolb <ubuntu-ml -at- tower-net.de>, Dec 26th 2004

edited by Seth Kinast, July 16 2005

The Ubuntu package java-package does not support the latest Java versions from Sun. You have to change a few files in your editor. Here it is what you need and what you have to edit.
Needed packages for Java packagebuild and support

First install Ubuntu's packages fakeroot, java-package and java-common.

sudo aptitude install fakeroot java-package java-common

Note that java-package resides in the multiverse repository, see [WWW] http://www.ubuntulinux.org/support/docu ... 414506543/ for help on adding the multiverse repository to your apt sources.

Go to [WWW] http://java.sun.com/j2se/1.5.0/download.jsp and download the self-extracting Linux files (that end in .bin).
Changes to java-package files

Skip this step if you're running Ubuntu Hoary.

Change to the directory /usr/share/java-package/.

Look in the file sun-j2sdk.sh for the part with:

"jdk-1_5_0-beta2-linux-i586.bin")
j2se_version=1.5.0+beta2
j2se_expected_min_size=122 # 125899 kB
found=true
;;

Now add between this part and the "esac" following new lines:

"jdk-1_5_0_"[0-9][0-9]"-linux-i586.bin")
j2se_version="1.5.0+r${archive_name:10:2}"
j2se_expected_min_size=131 #
found=true
;;

For the Java Runtime Environment you have to edit sun-j2re.sh.

Go now below the part

"j2re-1_5_0-beta2-linux-i586.bin")
j2se_version=1.5.0+beta2
j2se_expected_min_size=81 # 83267 kB
found=true
;;

and add in front of the "esac":

"jre-1_5_0_"[0-9][0-9]"-linux-i586.bin")
j2se_version="1.5.0+r${archive_name:10:2}"
j2se_expected_min_size=84 #
found=true
;;

Package build

Please do not run the package build with real root rights because the Sun installer would install some not necessary files with absolute file paths in your system without package builder control!

fakeroot make-jpkg --full-name "<Your name>" --email "<Your email>" jdk-1_5_0_04-linux-i586.bin

or

fakeroot make-jpkg --full-name "<Your name>" --email "<Your email>" jre-1_5_0_04-linux-i586.bin

and follow the instructions on screen.

Note: the build may fail with this error:

Loading plugins: blackdown-j2re.sh blackdown-j2sdk.sh common.sh ibm-j2re.sh ibm-j2sdk.sh j2re.sh j2sdk.sh j2se.sh sun-j2re.sh sun-j2sdk.sh

No matching plugin was found.
Removing temporary directory: done

This is due to a bug in dpkg-architecture on newer systems. Run dpkg-architecture and find the line similar to:

DEB_BUILD_GNU_TYPE=i486-linux-gnu

Next, run sudoedit /usr/share/java-package/sun-j2sdk.sh (or sun-j2re.sh) and change line 6 from i386-linux to your architecture (most commonly i486-linux-gnu).
Package installation

The Debian/Ubuntu package has been created in the current directory. You can install the package as root (e.g. sudo dpkg -i sun-j2sdk1.5_1.5.0+update04_i386.deb).

https://wiki.ubuntu.com/JavaPackageBuildNewVersions
当净其意如虚空,远离妄想及诸取,令心所向皆无碍
头像
max0000
帖子: 310
注册时间: 2005-04-08 14:54
送出感谢: 0
接收感谢: 0

#2

帖子 max0000 » 2005-08-27 15:41

认领了。
头像
max0000
帖子: 310
注册时间: 2005-04-08 14:54
送出感谢: 0
接收感谢: 0

#3

帖子 max0000 » 2005-08-27 16:22

如何制作Java 5.0 Update 4包

作者 Markus Kolb <ubuntu-ml -at- tower-net.de>, 2004.12.26

编辑 Seth Kinast, 2005.7.16

Ubuntu 的 java-package工具包不支持SUN的最新版Java。所以必需用编辑器在几个文件中作点改动。下面是要改的地方。

建立Java包所要用到的包

首先安装Ubuntu的fakeroot、 java-package 和 java-common包。

sudo aptitude install fakeroot java-package java-common

注意 java-package 在multiverse库中,具体添加方法参见:
http://www.ubuntu.org.cn/support/documentation/guide/extrarepositories


http://java.sun.com/j2se/1.5.0/download.jsp 下载自解压包( .bin文件)。改写java-package文件

如果用Ubuntu Hoary则请跳过本节。

到 /usr/share/java-package/目录下。

在 sun-j2sdk.sh 中寻找:

"jdk-1_5_0-beta2-linux-i586.bin")
j2se_version=1.5.0+beta2
j2se_expected_min_size=122 # 125899 kB
found=true
;;

在这部分和"esac"间加上下面几行:

"jdk-1_5_0_"[0-9][0-9]"-linux-i586.bin") j2se_version="1.5.0+r${archive_name:10:2}" j2se_expected_min_size=131 #
found=true
;;

对于Java Runtime Environment版本则要编辑sun-j2re.sh。

找到下面的部分:

"j2re-1_5_0-beta2-linux-i586.bin")
j2se_version=1.5.0+beta2
j2se_expected_min_size=81 # 83267 kB
found=true
;;

在 "esac"前加上:

"jre-1_5_0_"[0-9][0-9]"-linux-i586.bin") j2se_version="1.5.0+r${archive_name:10:2}" j2se_expected_min_size=84 #
found=true
;;

打包

不要在真正的root权限下打包!Sun的安装程序会把一些不必要的文件和它们的绝对路径放到你的系统里去。

fakeroot make-jpkg --full-name "<Your name>" --email "<Your email>" jdk-1_5_0_04-linux-i586.bin



fakeroot make-jpkg --full-name "<Your name>" --email "<Your email>" jre-1_5_0_04-linux-i586.bin

然后按屏幕提示操作。

注:有时打包过程会报错:

Loading plugins:blackdown-j2re.sh blackdown-j2sdk.sh common.sh ibm-j2re.sh ibm-j2sdk.sh j2re.sh j2sdk.sh j2se.sh sun-j2re.sh sun-j2sdk.sh

No matching plugin was found.
Removing temporary directory:done

这可能是dpkg-architecture在新一点的系统上的bug。运行dpkg-architecture找找看有没有类似下面的输出:

DEB_BUILD_GNU_TYPE=i486-linux-gnu

然后运行 sudoedit /usr/share/java-package/sun-j2sdk.sh (或 sun-j2re.sh) 把第6行从i386-linux改成你的机器的架构(最常见的是 i486-linux-gnu)。安装包

现在Debian/Ubuntu包已经打好,就在你当前目录下。现在可以用root身份来安装了。
(如: sudo dpkg -i sun-j2sdk1.5_1.5.0+update04_i386.deb).

https://wiki.ubuntu.com/JavaPackageBuildNewVersions
头像
oneleaf
论坛管理员
帖子: 10208
注册时间: 2005-03-27 0:06
系统: Ubuntu 12.04
送出感谢: 7 次
接收感谢: 99 次

#4

帖子 oneleaf » 2005-09-07 21:49

当净其意如虚空,远离妄想及诸取,令心所向皆无碍
头像
millenniumdark
论坛版主
帖子: 4160
注册时间: 2005-07-02 14:41
系统: Ubuntu 14.04 (Kylin)
送出感谢: 43 次
接收感谢: 9 次
联系:

#5

帖子 millenniumdark » 2006-07-30 16:23

这个应该过时了,先放着
回复

回到 “软件和文档翻译”