summaryrefslogtreecommitdiff
path: root/extra/java7-openjdk/PKGBUILD
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2011-10-21 23:14:54 +0000
committerroot <root@rshg054.dnsready.net>2011-10-21 23:14:54 +0000
commitd3d0811e23787b5c66edf94b3351a1555eb5010f (patch)
tree5fb14b5a2d0bd5b526a58d27e6fb81f04977855a /extra/java7-openjdk/PKGBUILD
parent1b21445a8e9097b0bb0542ed847fbb1eb832848f (diff)
Fri Oct 21 23:14:53 UTC 2011
Diffstat (limited to 'extra/java7-openjdk/PKGBUILD')
-rw-r--r--extra/java7-openjdk/PKGBUILD263
1 files changed, 263 insertions, 0 deletions
diff --git a/extra/java7-openjdk/PKGBUILD b/extra/java7-openjdk/PKGBUILD
new file mode 100644
index 000000000..84488e042
--- /dev/null
+++ b/extra/java7-openjdk/PKGBUILD
@@ -0,0 +1,263 @@
+# Maintainer: Andreas Radke <andyrtr@archlinux.org>
+# Contributor: Jan de Groot <jgc@archlinux.org>
+# Contributor: Guillaume ALAUX <guillaume@archlinux.org>
+
+pkgname=('jre7-openjdk' 'jdk7-openjdk' 'openjdk7-src')
+pkgbase=java7-openjdk
+_java_ver=7
+_openjdk_build=b147
+_openjdk_date=27_jun_2011
+_icedtea_ver=2.0
+_date=20110922
+
+# check "${srcdir}/icedtea7"/Makefile.am
+_CORBA_CHANGESET=4d9e4fb8af09
+_HOTSPOT_CHANGESET=b28ae681bae0
+_JAXP_CHANGESET=948e734135ea
+_JAXWS_CHANGESET=a2ebfdc9db7e
+_JDK_CHANGESET=2054526dd141
+_LANGTOOLS_CHANGESET=9b85f1265346
+_OPENJDK_CHANGESET=0a76e5390e68
+
+pkgver=${_java_ver}.${_openjdk_build}_${_icedtea_ver}
+pkgrel=2
+arch=('i686' 'x86_64')
+url="http://icedtea.classpath.org"
+license=('custom')
+makedepends=('libcups' 'libxp' 'libxtst' 'libxi' 'libxt' 'libxslt' 'freetype2' #'eclipse-ecj' only for bootstrapping
+ 'alsa-lib' 'xalan-java' 'glib2' 'gtk2' 'apache-ant>=1.6.5' 'giflib'
+ 'libjpeg>=6b' 'zlib' 'rhino' 'libpulse>=0.9.11' 'zip' 'unzip' 'cpio' 'lcms2')
+source=( #ftp://ftp.archlinux.org/other/$pkgname/icedtea7-${_date}-hg.tar.xz
+ http://icedtea.classpath.org/download/source/icedtea-${_icedtea_ver}.tar.gz
+ http://icedtea.classpath.org/hg/icedtea7-forest/archive/${_OPENJDK_CHANGESET}.tar.gz # openjdk.tar.gz
+ http://icedtea.classpath.org/hg/icedtea7-forest/corba/archive/${_CORBA_CHANGESET}.tar.gz # corba.tar.gz
+ http://icedtea.classpath.org/hg/icedtea7-forest/jaxp/archive/${_JAXP_CHANGESET}.tar.gz # jaxp.tar.gz
+ http://icedtea.classpath.org/hg/icedtea7-forest/jaxws/archive/${_JAXWS_CHANGESET}.tar.gz # jaxws.tar.gz
+ http://icedtea.classpath.org/hg/icedtea7-forest/jdk/archive/${_JDK_CHANGESET}.tar.gz # jdk.tar.gz
+ http://icedtea.classpath.org/hg/icedtea7-forest/langtools/archive/${_LANGTOOLS_CHANGESET}.tar.gz # langtools.tar.gz
+ http://icedtea.classpath.org/hg/icedtea7-forest/hotspot/archive/${_HOTSPOT_CHANGESET}.tar.gz # hotspot.tar.gz
+ fontconfig-paths.diff
+ fix_corba_cmds_path.diff
+ openjdk7_fix_jdk_cmds_path.diff
+ openjdk7_nonreparenting-wm.diff
+ jdk7-openjdk.profile
+ jdk7-openjdk.profile.csh
+ jre7-openjdk.profile
+ jre7-openjdk.profile.csh
+ jconsole.desktop
+ policytool.desktop)
+
+#http://www.java.net/download/openjdk/jdk${_java_ver}/promoted/${_openjdk_build}/openjdk-${_java_ver}-fcs-src-${_openjdk_build}-${_openjdk_date}.zip
+
+noextract=("${_OPENJDK_CHANGESET}.tar.gz"
+ "${_CORBA_CHANGESET}.tar.gz"
+ "${_JAXP_CHANGESET}.tar.gz"
+ "${_JAXWS_CHANGESET}.tar.gz"
+ "${_JDK_CHANGESET}.tar.gz"
+ "${_LANGTOOLS_CHANGESET}.tar.gz"
+ "${_HOTSPOT_CHANGESET}.tar.gz")
+md5sums=('752721a037a625001fad7a5fc2013f60'
+ 'ffb12013564794e9abbffbbbd0c58502'
+ '8f8d222d0a6d363d06b40576da5f1ea2'
+ '4abf34372e34cccd74ad337e487ed790'
+ 'f2f40590a83889b8aa1d4631b705092d'
+ 'd3beed0118bbd93d4651af762eb748c7'
+ 'c8617700b4bd6cd5de1257bc36509bed'
+ 'f10b711b0c784df8707808d9d0f52abd'
+ 'ee1afda124d5927345014ab382ef581e'
+ 'f7e7a212e50abb56a6ef1a2b1bd27405'
+ 'c195c4865b84d9e2e0fd71ac6d88eadb'
+ '203640d6e79e41b0065e016818c17ccd'
+ 'b7b8996448c7b4fa7dd2d744488ed3bd'
+ 'cdabafad0ec413d9a983888bf445a443'
+ '612b0fec7e0943c37a6de77c43622007'
+ '62443459da0cb28181feb260dc0e5ce7'
+ '8e346f19a69b11b8dc4fcd8ea9d9d8f1'
+ 'b6357228d29836504a90abe006d86e56')
+
+# source PKGBUILD && mksource
+#makedepends+=('mercurial')
+mksource() {
+ mkdir /tmp/icedtea7-${_date}
+ pushd /tmp/icedtea7-${_date}
+ hg -v clone http://icedtea.classpath.org/hg/icedtea7
+ rm -rf icedtea7/.hg*
+ tar -cvJf /tmp/icedtea7-${_date}/icedtea7-${_date}-hg.tar.xz *
+ popd
+}
+
+build() {
+ cd "${srcdir}/icedtea-${_icedtea_ver}"
+
+ unset JAVA_HOME
+ unset CLASSPATH
+ # default is to build with first found java-environment found in our repos - is jdk7-openjdk
+ [ -f /etc/profile.d/jdk7.sh ] && . /etc/profile.d/jdk7.sh
+
+ unset MAKEFLAGS
+ export ALT_PARALLEL_COMPILE_JOBS="${MAKEFLAGS/-j}"
+ export HOTSPOT_BUILD_JOBS="${ALT_PARALLEL_COMPILE_JOBS}"
+
+ . /etc/profile.d/apache-ant.sh
+
+ cp ${srcdir}/*.diff ${srcdir}/icedtea-${_icedtea_ver}/patches
+ export DISTRIBUTION_PATCHES="patches/fontconfig-paths.diff patches/fix_corba_cmds_path.diff patches/openjdk7_fix_jdk_cmds_path.diff patches/openjdk7_nonreparenting-wm.diff"
+
+ # Bootstrap IcedTea with ecj and a GNU Classpath-based JDK:
+# autoreconf --force --install
+
+ ./configure \
+ --disable-bootstrap \
+ --with-parallel-jobs="${MAKEFLAGS/-j}" \
+ --disable-tests \
+ --with-pkgversion=ArchLinux-${pkgver}-${pkgrel}-${CARCH} \
+ --with-jdk-home=${JAVA_HOME} \
+ --with-openjdk-src-zip=${srcdir}/${_OPENJDK_CHANGESET}.tar.gz \
+ --with-hotspot-src-zip=${srcdir}/${_HOTSPOT_CHANGESET}.tar.gz \
+ --with-corba-src-zip=${srcdir}/${_CORBA_CHANGESET}.tar.gz \
+ --with-jaxp-src-zip=${srcdir}/${_JAXP_CHANGESET}.tar.gz \
+ --with-jaxws-src-zip=${srcdir}/${_JAXWS_CHANGESET}.tar.gz \
+ --with-jdk-src-zip=${srcdir}/${_JDK_CHANGESET}.tar.gz \
+ --with-langtools-src-zip=${srcdir}/${_LANGTOOLS_CHANGESET}.tar.gz \
+ --enable-pulse-java \
+# --with-rhino #--help
+
+ #--with-jaxp-drop-zip=${srcdir}/jaxp145_01.zip \
+ #--with-jaf-drop-zip=${srcdir}/jdk7-jaf-2010_08_19.zip \
+ #--with-jaxws-drop-zip=${srcdir}/jdk7-jaxws2_2_4-b03-2011_05_27.zip \
+
+# --enable-systemtap Enable inclusion of SystemTap trace support
+# --enable-nss Enable inclusion of NSS security provider
+# --with-abs-install-dir The absolute path where the j2sdk-image dir will be installed
+
+ make
+}
+
+check() {
+ cd "${srcdir}/icedtea-${_icedtea_ver}"
+ make -k check
+}
+
+package_jre7-openjdk() {
+ pkgdesc="Free Java environment based on OpenJDK 7.0 with IcedTea7 replacing binary plugs - runtime environment"
+ depends=('gcc-libs' 'hicolor-icon-theme' 'ca-certificates-java' 'libxtst'
+ 'libxt' 'nss' 'libjpeg' 'freetype2' 'libxrender' 'libpng' 'gsettings-desktop-schemas')
+ optdepends=('icedtea-web-java7: web browser plugin + Java Web Start'
+ 'alsa-lib: for sound'
+ 'giflib: for gif format support')
+ provides=('java-runtime=7')
+ conflicts=('java-runtime')
+# replaces=('openjdk6') # once we remove openjdk6 pkg from the repos
+ backup=(etc/profile.d/jre7.sh)
+ install=jre7-openjdk.install
+
+ _jvmdir=/usr/lib/jvm/java-7-openjdk
+
+ cd "${srcdir}/icedtea-${_icedtea_ver}/openjdk.build/j2sdk-image/jre"
+
+ install -d -m755 ${pkgdir}/${_jvmdir}/jre/
+ cp -a bin lib ${pkgdir}/${_jvmdir}/jre
+
+ mv ${pkgdir}/${_jvmdir}/jre/lib/fontconfig.Ubuntu.properties.src \
+ ${pkgdir}/${_jvmdir}/jre/lib/fontconfig.properties.src
+ mv ${pkgdir}/${_jvmdir}/jre/lib/fontconfig.Ubuntu.bfc \
+ ${pkgdir}/${_jvmdir}/jre/lib/fontconfig.bfc
+ rm -f ${pkgdir}/${_jvmdir}/jre/lib/fontconfig.*.bfc
+ rm -f ${pkgdir}/${_jvmdir}/jre/lib/fontconfig.*.properties.src
+
+ # Install man pages
+ pushd ../../j2re-image/man
+ install -m755 -d ${pkgdir}/usr/share/man/{,ja/}man1/
+ install -m644 man1/*.1 ${pkgdir}/usr/share/man/man1
+ install -m644 ja_JP.UTF-8/man1/*.1 ${pkgdir}/usr/share/man/ja/man1
+ popd
+
+ # Install icons and menu entries
+ for s in 16 24 32 48 ; do
+ install -m755 -d ${pkgdir}/usr/share/icons/hicolor/${s}x${s}/apps/
+ install -m644 ../../../openjdk/jdk/src/solaris/classes/sun/awt/X11/java-icon${s}.png \
+ ${pkgdir}/usr/share/icons/hicolor/${s}x${s}/apps/java.png
+ done
+
+ # Link binaries into /usr/bin
+ pushd ${pkgdir}/${_jvmdir}/jre/bin
+ install -m755 -d ${pkgdir}/usr/bin/
+ for file in *; do
+ ln -sf ${_jvmdir}/jre/bin/${file} ${pkgdir}/usr/bin
+ done
+ popd
+
+ # Link JKS keystore from ca-certificates-java
+ rm -f ${pkgdir}/${_jvmdir}/jre/lib/security/cacerts
+ ln -sf /etc/ssl/certs/java/cacerts "${pkgdir}/${_jvmdir}/jre/lib/security/cacerts"
+
+ # Set some variables
+ install -m755 -d ${pkgdir}/etc/profile.d/
+ install -m755 ${srcdir}/${pkgname}.profile ${pkgdir}/etc/profile.d/jre.sh
+ install -m755 ${srcdir}/${pkgname}.profile.csh ${pkgdir}/etc/profile.d/jre.csh
+
+ # Install license
+ install -m755 -d ${pkgdir}/usr/share/licenses/${pkgbase}/
+ install -m644 ASSEMBLY_EXCEPTION LICENSE THIRD_PARTY_README \
+ ${pkgdir}/usr/share/licenses/${pkgbase}
+}
+
+package_jdk7-openjdk() {
+ pkgdesc="Free Java environment based on OpenJDK 7.0 with IcedTea7 replacing binary plugs - SDK"
+ depends=('jre7-openjdk')
+ provides=('java-environment=7')
+ conflicts=('java-environment')
+ # replaces=('openjdk6')
+ backup=(etc/profile.d/jdk7.sh)
+
+ _jvmdir=/usr/lib/jvm/java-7-openjdk
+
+ cd "${srcdir}/icedtea-${_icedtea_ver}/openjdk.build/j2sdk-image"
+
+ # Main files
+ install -m755 -d ${pkgdir}/${_jvmdir}/
+
+ cp -a demo include lib sample ${pkgdir}/${_jvmdir}
+
+ # 'bin' files
+ pushd bin
+ install -m755 -d ${pkgdir}/${_jvmdir}/bin/ \
+ ${pkgdir}/usr/bin/ \
+ ${pkgdir}/usr/share/man/{,ja/}man1/
+
+ # 'java-rmi.cgi' will be handled separately as it should not be in the PATH and has no man page
+ for b in $(ls | grep -v java-rmi.cgi); do
+ if [ -e ../jre/bin/${b} ]; then
+ # Provide a link of the jre binary in the jdk/bin/ directory
+ ln -s ../jre/bin/${b} ${pkgdir}/${_jvmdir}/bin/${b}
+ else
+ # Copy binary to jdk/bin/
+ install -m755 ${b} ${pkgdir}/${_jvmdir}/bin/${b}
+ # Copy man page
+ install -m644 ../man/man1/${b}.1 ${pkgdir}/usr/share/man/man1/${b}.1
+ install -m644 ../man/ja/man1/${b}.1 ${pkgdir}/usr/share/man/ja/man1/${b}.1
+ # Link from /bin/
+ ln -s ${_jvmdir}/bin/${b} ${pkgdir}/usr/bin/${b}
+ fi
+ done
+ popd
+
+ # Handling 'java-rmi.cgi' separately
+ install -m755 -D bin/java-rmi.cgi ${pkgdir}/${_jvmdir}/bin/java-rmi.cgi
+
+ # Desktop files
+ install -m755 -d ${pkgdir}/usr/share/applications/
+ install -m644 ${srcdir}/{jconsole,policytool}.desktop ${pkgdir}/usr/share/applications/
+
+ # Set some variables
+ install -m755 -d ${pkgdir}/etc/profile.d/
+ install -m755 ${srcdir}/${pkgname}.profile ${pkgdir}/etc/profile.d/jdk.sh
+ install -m755 ${srcdir}/${pkgname}.profile.csh ${pkgdir}/etc/profile.d/jdk.csh
+}
+
+package_openjdk7-src() {
+ pkgdesc="Free Java environment based on OpenJDK 7.0 with IcedTea7 replacing binary plugs - sources"
+
+ install -D ${srcdir}/icedtea-${_icedtea_ver}/openjdk.build/j2sdk-image/src.zip \
+ ${pkgdir}/${_jvmdir}/src.zip
+}