mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-28 22:57:37 +00:00
193 lines
7.1 KiB
Bash
193 lines
7.1 KiB
Bash
# $Id: PKGBUILD 52586 2009-09-21 18:52:14Z andyrtr $
|
|
# Maintainer: Andreas Radke <andyrtr@archlinux.org>
|
|
# Contributor: Jan de Groot <jgc@archlinux.org>
|
|
|
|
pkgname=('openjdk6' 'openjdk6-src')
|
|
pkgbase="openjdk6"
|
|
_icedteaver=1.6.1
|
|
_openjdk_version=b16
|
|
_openjdk_date=24_apr_2009
|
|
pkgver=${_icedteaver}
|
|
pkgrel=1
|
|
url='http://icedtea.classpath.org'
|
|
arch=('i686' 'x86_64')
|
|
license=('GPL')
|
|
# Use the new HS Express repository and hs14b15
|
|
# http://icedtea.classpath.org/hg/release/icedtea6-1.5/rev/30d0a78a8748
|
|
_hotspotver=09f7962b8b44 # what it downlopads itself / remove from configure to get it
|
|
makedepends=('gcc-libs' 'xdg-utils' 'hicolor-icon-theme' 'ca-certificates-java' 'libxtst' 'alsa-lib' 'giflib' 'libxp' 'gtk2'
|
|
'nspr' 'zlib' 'freetype2' 'libjpeg>=7' 'libx11' 'libcups' 'patch' 'xalan-java' 'xulrunner>=1.9.1-2'
|
|
'apache-ant>=1.7.0-2' 'autoconf' 'unzip' 'rhino' 'mercurial' 'zip')
|
|
options=('!emptydirs' 'force')
|
|
source=(http://icedtea.classpath.org/download/source/icedtea6-${_icedteaver}.tar.gz
|
|
#ftp://ftp.archlinux.org/other/openjdk6/icedtea6-${_date}.tar.bz2
|
|
#http://icedtea.classpath.org/hg/icedtea6/archive/${_hgver}.tar.gz
|
|
http://download.java.net/openjdk/jdk6/promoted/${_openjdk_version}/openjdk-6-src-${_openjdk_version}-${_openjdk_date}.tar.gz
|
|
http://hg.openjdk.java.net/hsx/hsx14/master/archive/${_hotspotver}.tar.gz
|
|
fix_jdk_cmds_path.diff
|
|
fix_corba_cmds_path.diff
|
|
aatext_by_default.diff
|
|
fontconfig-paths.diff
|
|
nonreparenting-wm.diff
|
|
libjpeg7.patch
|
|
openjdk6.profile)
|
|
noextract=(openjdk-6-src-${_openjdk_version}-${_openjdk_date}.tar.gz ${_hotspotver}.tar.gz)
|
|
md5sums=('f1c98bb31de87a5e15550b9672ea4027'
|
|
'850a29b70206bc7fa083cd26acc781f3'
|
|
'600284e870609a7531163bf2972c573b'
|
|
'5da3e39fa60985576c4f37d1491efbe2'
|
|
'f7e7a212e50abb56a6ef1a2b1bd27405'
|
|
'ef60d567c0d9bad111212851220deafd'
|
|
'ee1afda124d5927345014ab382ef581e'
|
|
'409812b5675f9678b1c9e1a12a945a9a'
|
|
'2f820743e8ed5540b5667fda33c53d26'
|
|
'10d13b19762218ee157273cee874394e')
|
|
|
|
build() {
|
|
|
|
unset JAVA_HOME
|
|
unset CLASSPATH
|
|
|
|
[ -z "${ANT_HOME}" ] && . /etc/profile.d/apache-ant.sh
|
|
|
|
# _javaver=1.6.0
|
|
_javaver=6
|
|
_jvmdir=/usr/lib/jvm/java-${_javaver}-openjdk
|
|
|
|
cd ${srcdir}/icedtea6-${_icedteaver}
|
|
ln -s ${srcdir}/openjdk-6-src-${_openjdk_version}-${_openjdk_date}.tar.gz .
|
|
ln -s ${srcdir}/${_hotspotver}.tar.gz .
|
|
|
|
cp ${srcdir}/*.diff ${srcdir}/icedtea6-${_icedteaver}/patches/
|
|
|
|
# workaround for libjpeg .so bump to avoid a few segfaults. some stuff will remain broken
|
|
patch -Np1 -i ${srcdir}/libjpeg7.patch || return 1
|
|
|
|
export DISTRIBUTION_PATCHES="patches/fix_jdk_cmds_path.diff patches/aatext_by_default.diff patches/fontconfig-paths.diff patches/fix_corba_cmds_path.diff patches/nonreparenting-wm.diff "
|
|
|
|
export ALT_PARALLEL_COMPILE_JOBS="${MAKEFLAGS/-j}"
|
|
export HOTSPOT_BUILD_JOBS="${ALT_PARALLEL_COMPILE_JOBS}"
|
|
unset MAKEFLAGS
|
|
|
|
if [ -x ${_jvmdir}/bin/javac ]; then
|
|
JCONF="--with-openjdk"
|
|
elif [ -x /opt/java/bin/javac ]; then
|
|
JCONF="--with-openjdk"
|
|
else
|
|
echo "No supported java installation found, install either openjdk6 or jdk"
|
|
return 1
|
|
fi
|
|
|
|
./configure --with-parallel-jobs=${HOTSPOT_BUILD_JOBS} \
|
|
--with-xalan2-jar=/usr/share/java/xalan.jar \
|
|
--with-ant-home=/usr/share/java/apache-ant \
|
|
--with-pkgversion=ArchLinux-${pkgver}-${pkgrel}-$CARCH $JCONF \
|
|
--with-hotspot-src-zip=${_hotspotver}.tar.gz
|
|
|
|
# --enable-npplugin \
|
|
# --enable-visualvm \ --with-additional-vms=cacao,zero,shark \
|
|
|
|
LD_PRELOAD="" make || return 1
|
|
}
|
|
|
|
package_openjdk6() {
|
|
pkgdesc='Free Java environment based on OpenJDK 6.0 with IcedTea6 replacing binary plugs.'
|
|
backup=(etc/profile.d/openjdk6.sh)
|
|
depends=('gcc-libs' 'xdg-utils' 'hicolor-icon-theme' 'ca-certificates-java' 'libxtst')
|
|
optdepends=('xulrunner: for the browser plugin'
|
|
'alsa-lib: for sound'
|
|
'giflib: for gif format support')
|
|
conflicts=('java-environment' 'java-runtime')
|
|
provides=('java-environment=6' 'java-runtime=6')
|
|
install=openjdk6.install
|
|
|
|
if [ "${CARCH}" = "x86_64" ]; then
|
|
_arch=amd64
|
|
else
|
|
_arch=i586
|
|
fi
|
|
# _javaver=1.6.0
|
|
_javaver=6
|
|
_jvmdir=/usr/lib/jvm/java-${_javaver}-openjdk
|
|
|
|
cd ${srcdir}/icedtea6-${_icedteaver}
|
|
install -m755 -d ${pkgdir}/${_jvmdir}/jre
|
|
|
|
pushd ${srcdir}/icedtea6-${_icedteaver}/openjdk/build/linux-${_arch}/j2sdk-image
|
|
# Install main files.
|
|
cp -a bin include lib ${pkgdir}/${_jvmdir}/ || return 1
|
|
cp -a jre/bin jre/lib ${pkgdir}/${_jvmdir}/jre/ || return 1
|
|
|
|
mv ${pkgdir}/${_jvmdir}/jre/lib/fontconfig.Ubuntu.properties.src \
|
|
${pkgdir}/${_jvmdir}/jre/lib/fontconfig.properties.src || return 1
|
|
mv ${pkgdir}/${_jvmdir}/jre/lib/fontconfig.Ubuntu.bfc \
|
|
${pkgdir}/${_jvmdir}/jre/lib/fontconfig.bfc || return 1
|
|
rm -f ${pkgdir}/${_jvmdir}/jre/lib/fontconfig.*.bfc
|
|
rm -f ${pkgdir}/${_jvmdir}/jre/lib/fontconfig.*.properties.src
|
|
|
|
# Install man pages.
|
|
install -m755 -d ${pkgdir}/usr/share/man/man1
|
|
install -m644 man/man1/*.1 ${pkgdir}/usr/share/man/man1/ || return 1
|
|
|
|
# Install demos and samples.
|
|
cp -a demo ${pkgdir}/${_jvmdir}/ || return 1
|
|
install -m755 -d sample/rmi
|
|
mv bin/java-rmi.cgi sample/rmi || return 1
|
|
cp -a sample ${pkgdir}/${_jvmdir}/ || return 1
|
|
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 || return 1
|
|
done
|
|
|
|
# Install desktop files.
|
|
install -m755 -d ${pkgdir}/usr/share/{applications,pixmaps}
|
|
install -m644 javaws.png ${pkgdir}/usr/share/pixmaps || return 1
|
|
install -m644 {javaws,jconsole,policytool}.desktop ${pkgdir}/usr/share/applications || return 1
|
|
|
|
# link the mozilla-plugin
|
|
install -m755 -d ${pkgdir}/usr/lib/mozilla/plugins/
|
|
ln -sf ${_jvmdir}/jre/lib/${_arch/i586/i386}/IcedTeaPlugin.so ${pkgdir}/usr/lib/mozilla/plugins/ || return 1
|
|
# ln -sf ${_jvmdir}/jre/lib/${_arch/i586/i386}/IcedTeaNPPlugin.so ${pkgdir}/usr/lib/mozilla/plugins/ || return 1
|
|
|
|
# link binaries into /usr/bin
|
|
install -m755 -d ${pkgdir}/usr/bin
|
|
pushd ${pkgdir}/${_jvmdir}/bin
|
|
for file in *; do
|
|
ln -sf ${_jvmdir}/bin/${file} \
|
|
${pkgdir}/usr/bin || return 1
|
|
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}/openjdk6.profile ${pkgdir}/etc/profile.d/openjdk6.sh || return 1
|
|
}
|
|
|
|
package_openjdk6-src() {
|
|
pkgdesc='Free Java environment based on OpenJDK 6.0 Source Bundle'
|
|
depends=('openjdk6')
|
|
|
|
if [ "${CARCH}" = "x86_64" ]; then
|
|
_arch=amd64
|
|
else
|
|
_arch=i586
|
|
fi
|
|
# _javaver=1.6.0
|
|
_javaver=6
|
|
_jvmdir=/usr/lib/jvm/java-${_javaver}-openjdk
|
|
|
|
cd ${srcdir}/icedtea6-${_icedteaver}
|
|
install -m755 -d ${pkgdir}/${_jvmdir}/jre
|
|
|
|
pushd ${srcdir}/icedtea6-${_icedteaver}/openjdk/build/linux-${_arch}/j2sdk-image
|
|
# Install src.zip file
|
|
cp -a src.zip ${pkgdir}/${_jvmdir}/ || return 1
|
|
}
|