PKGBUILDs/extra/openjdk6/PKGBUILD

171 lines
6.2 KiB
Bash
Raw Normal View History

2011-03-05 00:24:56 +00:00
# $Id: PKGBUILD 111999 2011-03-02 23:26:46Z andyrtr $
2011-02-21 21:10:11 +00:00
# Maintainer: Andreas Radke <andyrtr@archlinux.org>
# Contributor: Jan de Groot <jgc@archlinux.org>
2012-01-13 19:33:55 +00:00
# PlugApps: Kevin Mihelich <kevin@plugapps.com>
2011-03-05 00:24:56 +00:00
# - Run autogen.sh, then configure with --enable-zero, make -j1
# - Either remove -Werror from makefiles, or #ifndef ARM in ffi.h
# - Fake reporting of total ram if <512MB
# - facedesk a few times
# - Added libffi to package depends
# - Define arm as _arch in package
# - Removed openjdk6-src package, there's no point
2011-02-21 21:10:11 +00:00
#
2011-03-05 00:24:56 +00:00
# Please, don't try this at home.
2011-02-21 21:10:11 +00:00
plugrel=1
noautobuild=1
2011-03-05 00:24:56 +00:00
pkgname=('openjdk6')
2011-02-21 21:10:11 +00:00
pkgbase="openjdk6"
_javaver=6
2012-01-13 19:33:55 +00:00
_icedteaver=1.10.5
2011-03-05 00:24:56 +00:00
_openjdk_version=b22
_openjdk_date=28_feb_2011
2011-02-21 21:10:11 +00:00
pkgver=${_javaver}.${_openjdk_version}_${_icedteaver}
pkgrel=1
url='http://icedtea.classpath.org'
2011-03-05 00:24:56 +00:00
arch=('arm')
2011-02-21 21:10:11 +00:00
license=('custom')
makedepends=('gcc-libs' 'xdg-utils' 'hicolor-icon-theme' 'ca-certificates-java' 'libxtst' 'alsa-lib' 'giflib' 'libxp' 'gtk2'
2011-03-05 00:24:56 +00:00
'nspr' 'zlib' 'freetype2' 'libjpeg>=8' 'libx11' 'libcups' 'patch' 'xalan-java' 'libxt' 'nss'
2012-01-13 19:33:55 +00:00
'apache-ant' 'autoconf' 'unzip' 'rhino' 'mercurial' 'zip' 'cpio' 'openjdk6')
2011-02-21 21:10:11 +00:00
options=('!emptydirs') # 'force') # force needed for hg shots
source=(http://icedtea.classpath.org/download/source/icedtea6-${_icedteaver}.tar.gz
http://download.java.net/openjdk/jdk6/promoted/${_openjdk_version}/openjdk-6-src-${_openjdk_version}-${_openjdk_date}.tar.gz
2011-03-05 00:24:56 +00:00
http://icedtea.classpath.org/download/drops/jaxp144_01.zip
2012-01-13 19:33:55 +00:00
http://icedtea.classpath.org/download/drops/jdk6-jaxws-b20.zip
http://icedtea.classpath.org/download/drops/jdk6-jaf-b20.zip
2011-02-21 21:10:11 +00:00
fix_jdk_cmds_path.diff
fix_corba_cmds_path.diff
aatext_by_default.diff
fontconfig-paths.diff
nonreparenting-wm.diff
openjdk6.profile
2012-01-13 19:33:55 +00:00
openjdk6.profile.csh
glibc2_15.diff)
2011-02-21 21:10:11 +00:00
noextract=(openjdk-6-src-${_openjdk_version}-${_openjdk_date}.tar.gz)
2012-01-13 19:33:55 +00:00
md5sums=('e2316f463b5d9f53f8c5c9020f2a7e5a'
2011-03-05 00:24:56 +00:00
'2d2bbbb0f9b81f1fec41ec730da8a933'
'ef7a8b3624ea904bf584bc46d79b5e75'
2011-02-21 21:10:11 +00:00
'91adfd41e6f001add4f92ae31216b1e3'
'bc95c133620bd68c161cac9891592901'
'5da3e39fa60985576c4f37d1491efbe2'
'f7e7a212e50abb56a6ef1a2b1bd27405'
'ee1afda124d5927345014ab382ef581e'
2012-01-13 19:33:55 +00:00
'9b4d368f5ee08de248eaf029303a446c'
2011-02-21 21:10:11 +00:00
'74c4a7adc782edd087802bf92ae3d6d0'
2012-01-13 19:33:55 +00:00
'fdf295e2f186dfa4d308691a3d7ac8c5'
'0c8f0a398c88f85e0db44b4417562cf3')
2011-02-21 21:10:11 +00:00
build() {
unset JAVA_HOME
unset CLASSPATH
[ -z "${ANT_HOME}" ] && . /etc/profile.d/apache-ant.sh
2011-03-05 00:24:56 +00:00
_javaver=6
2011-02-21 21:10:11 +00:00
_jvmdir=/usr/lib/jvm/java-${_javaver}-openjdk
cd ${srcdir}/icedtea6-${_icedteaver}
ln -s ${srcdir}/openjdk-6-src-${_openjdk_version}-${_openjdk_date}.tar.gz .
cp ${srcdir}/*.diff ${srcdir}/icedtea6-${_icedteaver}/patches/
autoreconf -i
2012-01-13 19:33:55 +00:00
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 patches/glibc2_15.diff"
2011-02-21 21:10:11 +00:00
export ALT_PARALLEL_COMPILE_JOBS="${MAKEFLAGS/-j}"
export HOTSPOT_BUILD_JOBS="${ALT_PARALLEL_COMPILE_JOBS}"
unset MAKEFLAGS
2011-03-05 00:24:56 +00:00
./autogen.sh
./configure --with-parallel-jobs=${HOTSPOT_BUILD_JOBS} \
2011-02-21 21:10:11 +00:00
--with-xalan2-jar=/usr/share/java/xalan.jar \
--with-ant-home=/usr/share/java/apache-ant \
2011-03-05 00:24:56 +00:00
--with-pkgversion=ArchLinux-${pkgver}-${pkgrel}-$CARCH \
--with-jaxp-drop-zip=${srcdir}/jaxp144_01.zip \
2011-02-21 21:10:11 +00:00
--with-jaxws-drop-zip=${srcdir}/jdk6-jaxws-b20.zip \
--with-jaf-drop-zip=${srcdir}/jdk6-jaf-b20.zip \
2011-03-05 00:24:56 +00:00
--disable-bootstrap --enable-zero
LD_PRELOAD="" make -j1
2011-02-21 21:10:11 +00:00
}
package_openjdk6() {
pkgdesc='Free Java environment based on OpenJDK 6.0 with IcedTea6 replacing binary plugs.'
backup=(etc/profile.d/openjdk6.sh)
2011-03-05 00:24:56 +00:00
depends=('gcc-libs' 'xdg-utils' 'hicolor-icon-theme' 'ca-certificates-java' 'libxtst' 'libxt' 'nss' 'libjpeg' 'freetype2' 'libxrender' 'libpng' 'libffi')
optdepends=('icedtea-web: web browser plugin + Java Web Start'
2011-02-21 21:10:11 +00:00
'alsa-lib: for sound'
'giflib: for gif format support')
conflicts=('java-environment' 'java-runtime')
provides=('java-environment=6' 'java-runtime=6')
install=openjdk6.install
2011-03-05 00:24:56 +00:00
_arch=arm
2011-02-21 21:10:11 +00:00
_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/j2sdk-image
# Install main files.
2011-03-05 00:24:56 +00:00
cp -a bin include lib ${pkgdir}/${_jvmdir}/
cp -a jre/bin jre/lib ${pkgdir}/${_jvmdir}/jre/
2011-02-21 21:10:11 +00:00
mv ${pkgdir}/${_jvmdir}/jre/lib/fontconfig.Ubuntu.properties.src \
2011-03-05 00:24:56 +00:00
${pkgdir}/${_jvmdir}/jre/lib/fontconfig.properties.src
2011-02-21 21:10:11 +00:00
mv ${pkgdir}/${_jvmdir}/jre/lib/fontconfig.Ubuntu.bfc \
2011-03-05 00:24:56 +00:00
${pkgdir}/${_jvmdir}/jre/lib/fontconfig.bfc
2011-02-21 21:10:11 +00:00
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
2011-03-05 00:24:56 +00:00
install -m644 man/man1/*.1 ${pkgdir}/usr/share/man/man1/
2011-02-21 21:10:11 +00:00
# Install demos and samples.
2011-03-05 00:24:56 +00:00
cp -a demo ${pkgdir}/${_jvmdir}/
2011-02-21 21:10:11 +00:00
install -m755 -d sample/rmi
2011-03-05 00:24:56 +00:00
mv bin/java-rmi.cgi sample/rmi
cp -a sample ${pkgdir}/${_jvmdir}/
2011-02-21 21:10:11 +00:00
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 \
2011-03-05 00:24:56 +00:00
${pkgdir}/usr/share/icons/hicolor/${s}x${s}/apps/java.png
2011-02-21 21:10:11 +00:00
done
# Install desktop files.
2011-03-05 00:24:56 +00:00
install -m755 -d ${pkgdir}/usr/share/applications
install -m644 {jconsole,policytool}.desktop ${pkgdir}/usr/share/applications
2011-02-21 21:10:11 +00:00
# link binaries into /usr/bin
install -m755 -d ${pkgdir}/usr/bin
pushd ${pkgdir}/${_jvmdir}/bin
for file in *; do
ln -sf ${_jvmdir}/bin/${file} \
2011-03-05 00:24:56 +00:00
${pkgdir}/usr/bin
2011-02-21 21:10:11 +00:00
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
2011-03-05 00:24:56 +00:00
install -m755 ${srcdir}/openjdk6.profile ${pkgdir}/etc/profile.d/openjdk6.sh
install -m755 ${srcdir}/openjdk6.profile.csh ${pkgdir}/etc/profile.d/openjdk6.csh
2011-02-21 21:10:11 +00:00
# install license
install -Dm644 ${srcdir}/LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
}