mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-08 22:45:43 +00:00
365 lines
15 KiB
Bash
365 lines
15 KiB
Bash
# $Id: PKGBUILD 179933 2013-03-12 17:11:40Z andyrtr $
|
|
# Maintainer: Andreas Radke <andyrtr@archlinux.org>
|
|
# Maintainer: Guillaume ALAUX <guillaume@archlinux.org>
|
|
# Contributor: Jan de Groot <jgc@archlinux.org>
|
|
|
|
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
|
|
# - removed doc package, --disable-docs in configure, this is measured in lifetimes to build on ARM
|
|
# - --enable-zero, hotspot changeset, url changed to use Zero hotspot source.
|
|
# original changeset left commented to be able to spot changes on package upgrades
|
|
# - added our architectures to set _JARCH
|
|
# - strip -D_FORTIFY_SOURCE=2 from C/CXXFLAGS
|
|
|
|
#noautobuild=1
|
|
|
|
pkgname=('jre7-openjdk-headless' 'jre7-openjdk' 'jdk7-openjdk' 'openjdk7-src')
|
|
pkgbase=java7-openjdk
|
|
_java_ver=7
|
|
_icedtea_ver=2.4.5
|
|
|
|
# check "${srcdir}/icedtea-${_icedtea_ver}"/Makefile.am
|
|
_JDK_UPDATE_VERSION=51
|
|
_CORBA_CHANGESET=3594dbde270d
|
|
_JAXP_CHANGESET=8fe156ad49e2
|
|
_JAXWS_CHANGESET=32ea8b1ed91a
|
|
_JDK_CHANGESET=9db88c18e114
|
|
_LANGTOOLS_CHANGESET=dabd37b7e295
|
|
_OPENJDK_CHANGESET=410eb7fef869
|
|
|
|
_HOTSPOT_CHANGESET=2cb58882dac3 # see "${srcdir}/icedtea-${_icedtea_ver}"/hotspot.map
|
|
|
|
_bootstrap=0 # 0/1 for quick build or full bootstrap
|
|
|
|
pkgver=${_java_ver}.u${_JDK_UPDATE_VERSION}_${_icedtea_ver}
|
|
pkgrel=1
|
|
arch=('i686' 'x86_64')
|
|
url="http://icedtea.classpath.org"
|
|
license=('custom')
|
|
options=('!emptydirs')
|
|
makedepends=('jdk7-openjdk' 'libxp' 'libxslt'
|
|
'alsa-lib' 'apache-ant>=1.8.1' 'giflib' 'libpng>=1.5.7' 'gtk2'
|
|
'java-rhino' 'libpulse>=0.9.11' 'zip' 'unzip' 'cpio' 'fastjar' 'wget' 'procps-ng' 'inetutils')
|
|
[ "$_bootstrap" = "1" ] && makedepends=(${makedepends[@]} 'eclipse-ecj')
|
|
|
|
_url=http://icedtea.classpath.org/hg/release/icedtea7-forest-${_icedtea_ver:0:3}
|
|
#_zurl=http://icedtea.classpath.org/hg/release/icedtea7-forest-2.1
|
|
source=(http://icedtea.classpath.org/download/source/icedtea-${_icedtea_ver}.tar.gz
|
|
${_url}/archive/${_OPENJDK_CHANGESET}.tar.gz # openjdk.tar.gz
|
|
${_url}/corba/archive/${_CORBA_CHANGESET}.tar.gz # corba.tar.gz
|
|
${_url}/jaxp/archive/${_JAXP_CHANGESET}.tar.gz # jaxp.tar.gz
|
|
${_url}/jaxws/archive/${_JAXWS_CHANGESET}.tar.gz # jaxws.tar.gz
|
|
${_url}/jdk/archive/${_JDK_CHANGESET}.tar.gz # jdk.tar.gz
|
|
${_url}/langtools/archive/${_LANGTOOLS_CHANGESET}.tar.gz # langtools.tar.gz
|
|
${_url}/hotspot/archive/${_HOTSPOT_CHANGESET}.tar.gz # hotspot.tar.gz
|
|
fontconfig-paths.diff
|
|
openjdk7_nonreparenting-wm.diff
|
|
jdk7-openjdk.profile
|
|
jdk7-openjdk.profile.csh
|
|
jre7-openjdk.profile
|
|
jre7-openjdk.profile.csh)
|
|
sha256sums=('10c08eeffaa0602b23cb957a2595a2ad3ab474cbe47b12743bbdd79037d5883d'
|
|
'2de151c7275d91ef082e63fcc0957c5f9290404ec6e20ecfa1e752e16bfab707'
|
|
'd1f97e143fe94ae3a56b45bb5a90f8ab10ec2be4ff770a788f0a1ac677e27a7d'
|
|
'0a2a40186cedfbeb8f87b0bc86bea2830943943081d4289fc74f7a783b2e1af3'
|
|
'08a169b6b02883759ec7a412aa91aa3e37480761cb50b95d092dbcdb2fc9a3d0'
|
|
'285e5b8ccbb29f3f9f9ea9ea7856d1ed97465c57d091fbcd9b2e55a1ffbb543e'
|
|
'86cb370ce2084c4b699d8c002ebe6c026e86206ffa82a2f3d7906aadb94ed79f'
|
|
'd8c1681ae76e660c1888065933cedbbc1309869c7a2fb98f07c424716d5ebaf9'
|
|
'9ad943ceb3dbcdf45d72974fc3667886a7ed65c69ab9abc17be5412827551a7f'
|
|
'56b919ababb13bd6afdcdaceb112b529b6e82539255f2dae9a7e5eb91645164b'
|
|
'bd55299e08e6f8e61ba5baad0990170891801a29a1e8137e502b5e8a10fc37ea'
|
|
'3f28f8bfc6dd105a07f747d7135c77a77de433e2b8647dd7520a900135203fbd'
|
|
'b7c045b08ad55a9f79390c104fa846d0e7dbb49fccffb2fab2a3824b6b19c9c8'
|
|
'89d99d8ac269ca66e2e279aff652d5aac938a35faec93cd8cff8f048052bd3ce')
|
|
|
|
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")
|
|
|
|
_jvmdir=/usr/lib/jvm/java-7-openjdk
|
|
|
|
[ "$CARCH" = "x86_64" ] && _JARCH=amd64
|
|
[ "$CARCH" = "i686" ] && _JARCH=i386
|
|
[ "$CARCH" = "arm" -o "$CARCH" = "armv6h" -o "$CARCH" = "armv7h" ] && _JARCH=arm
|
|
|
|
build() {
|
|
cd "${srcdir}/icedtea-${_icedtea_ver}"
|
|
|
|
CFLAGS=`echo $CFLAGS | sed -e 's/-D_FORTIFY_SOURCE=2//'` && CXXFLAGS="$CFLAGS"
|
|
|
|
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/openjdk7_nonreparenting-wm.diff"
|
|
|
|
if [ "$_bootstrap" = "1" ]; then
|
|
BOOTSTRAPOPT="--enable-bootstrap --with-ecj-jar=/usr/share/java/ecj.jar"
|
|
else
|
|
BOOTSTRAPOPT="--disable-bootstrap"
|
|
fi
|
|
|
|
./configure \
|
|
$BOOTSTRAPOPT \
|
|
--with-parallel-jobs="${MAKEFLAGS/-j}" \
|
|
--disable-tests \
|
|
--disable-downloading --disable-Werror \
|
|
--with-pkgversion="ArchLinux build ${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 \
|
|
--enable-nss \
|
|
--with-rhino \
|
|
--with-abs-install-dir=${_jvmdir} \
|
|
--disable-docs \
|
|
--enable-zero
|
|
make
|
|
}
|
|
|
|
check() {
|
|
cd "${srcdir}/icedtea-${_icedtea_ver}"
|
|
# make -k check
|
|
}
|
|
|
|
package_jre7-openjdk-headless() {
|
|
pkgdesc="Free Java environment based on OpenJDK 7.0 with IcedTea7 replacing binary plugs - Minimal Java runtime - needed for executing non GUI Java programs"
|
|
depends=('libjpeg-turbo' 'lcms2' 'nss' 'ca-certificates-java')
|
|
optdepends=('libcups: needed for Java Mauve support - libmawt.so'
|
|
'fontconfig: needed for Java Mauve support - libmawt.so')
|
|
provides=('java-runtime-headless=7')
|
|
conflicts=('openjdk6')
|
|
backup=(etc/profile.d/jre.sh
|
|
etc/profile.d/jre.csh
|
|
etc/java-7-openjdk/calendars.properties
|
|
etc/java-7-openjdk/content-types.properties
|
|
etc/java-7-openjdk/cursors/cursors.properties
|
|
etc/java-7-openjdk/flavormap.properties
|
|
etc/java-7-openjdk/fontconfig.bfc
|
|
etc/java-7-openjdk/fontconfig.properties
|
|
etc/java-7-openjdk/jvm.cfg
|
|
etc/java-7-openjdk/logging.properties
|
|
etc/java-7-openjdk/management/jmxremote.access
|
|
etc/java-7-openjdk/management/jmxremote.password
|
|
etc/java-7-openjdk/management/management.properties
|
|
etc/java-7-openjdk/management/snmp.acl
|
|
etc/java-7-openjdk/net.properties
|
|
etc/java-7-openjdk/psfont.properties.ja
|
|
etc/java-7-openjdk/psfontj2d.properties
|
|
etc/java-7-openjdk/security/java.policy
|
|
etc/java-7-openjdk/security/java.security
|
|
etc/java-7-openjdk/security/nss.cfg
|
|
etc/java-7-openjdk/sound.properties
|
|
etc/java-7-openjdk/tz.properties)
|
|
install=jre7-openjdk-headless.install
|
|
|
|
cd "${srcdir}/icedtea-${_icedtea_ver}/openjdk.build/j2sdk-image/jre"
|
|
|
|
mv lib/fontconfig.Ubuntu.properties.src lib/fontconfig.properties
|
|
mv lib/fontconfig.Ubuntu.bfc lib/fontconfig.bfc
|
|
rm -f lib/fontconfig.*.bfc
|
|
rm -f lib/fontconfig.*.properties.src
|
|
rm -f lib/fontconfig.properties.src
|
|
|
|
install -d -m755 ${pkgdir}${_jvmdir}/jre
|
|
cp -a bin lib ${pkgdir}${_jvmdir}/jre
|
|
|
|
# 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
|
|
|
|
# more files that belong to the desktop package
|
|
mkdir ${srcdir}/tmp-desktop-jre
|
|
for file in \
|
|
"${_jvmdir}/jre/bin/policytool" \
|
|
"${_jvmdir}/jre/lib/${_JARCH}/libjsoundalsa.so" \
|
|
"${_jvmdir}/jre/lib/${_JARCH}/libpulse-java.so" \
|
|
"${_jvmdir}/jre/lib/${_JARCH}/libsplashscreen.so" \
|
|
"${_jvmdir}/jre/lib/${_JARCH}/xawt/libmawt.so" \
|
|
"/usr/share/man/ja/man1/policytool.1" \
|
|
"/usr/share/man/man1/policytool.1"; do
|
|
dirname=`dirname $file`
|
|
install -dm755 ${srcdir}/tmp-desktop-jre/$dirname || /bin/true
|
|
# mv file from fakeinstall to pkgdir
|
|
mv ${pkgdir}/$file ${srcdir}/tmp-desktop-jre$file
|
|
done
|
|
rmdir ${pkgdir}${_jvmdir}/jre/lib/${_JARCH}/xawt
|
|
|
|
# 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}/jre7-openjdk.profile ${pkgdir}/etc/profile.d/jre.sh
|
|
install -m755 ${srcdir}/jre7-openjdk.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}
|
|
|
|
# link license
|
|
ln -sf /usr/share/licenses/${pkgbase} "${pkgdir}/usr/share/licenses/${pkgname}"
|
|
|
|
# Put some more files under backup control
|
|
install -m755 -d ${pkgdir}/etc/java-7-openjdk/
|
|
install -m644 ${pkgdir}${_jvmdir}/jre/lib/*.properties* ${pkgdir}/etc/java-7-openjdk/
|
|
# install dummy links to make them found by JAVA
|
|
cd ${pkgdir}${_jvmdir}/jre/lib/
|
|
for file in `ls ${pkgdir}/etc/java-7-openjdk/*.properties*`; do
|
|
ln -vsf /etc/java-7-openjdk/`basename $file` .
|
|
done
|
|
# some more
|
|
install -m755 -d ${pkgdir}/etc/java-7-openjdk/{cursors,management,security}
|
|
install -m644 ${pkgdir}${_jvmdir}/jre/lib/images/cursors/cursors.properties \
|
|
${pkgdir}/etc/java-7-openjdk/cursors/
|
|
pushd ${pkgdir}${_jvmdir}/jre/lib/images/cursors/
|
|
ln -vsf /etc/java-7-openjdk/cursors/cursors.properties .
|
|
popd
|
|
mv ${pkgdir}${_jvmdir}/jre/lib/management/jmxremote.password.template \
|
|
${pkgdir}${_jvmdir}/jre/lib/management/jmxremote.password
|
|
mv ${pkgdir}${_jvmdir}/jre/lib/management/snmp.acl.template \
|
|
${pkgdir}${_jvmdir}/jre/lib/management/snmp.acl
|
|
install -m644 ${pkgdir}${_jvmdir}/jre/lib/management/{management.properties,jmxremote.access,jmxremote.password,snmp.acl} \
|
|
${pkgdir}/etc/java-7-openjdk/management/
|
|
pushd ${pkgdir}${_jvmdir}/jre/lib/management
|
|
ln -vsf /etc/java-7-openjdk/management/{management.properties,jmxremote.access,jmxremote.password,snmp.acl} .
|
|
popd
|
|
install -m644 ${pkgdir}${_jvmdir}/jre/lib/security/{java.policy,java.security,nss.cfg} \
|
|
${pkgdir}/etc/java-7-openjdk/security/
|
|
pushd ${pkgdir}${_jvmdir}/jre/lib/security
|
|
ln -vsf /etc/java-7-openjdk/security/{java.policy,java.security,nss.cfg} .
|
|
popd
|
|
install -m644 ${pkgdir}${_jvmdir}/jre/lib/fontconfig.bfc ${pkgdir}/etc/java-7-openjdk/
|
|
install -m644 ${pkgdir}${_jvmdir}/jre/lib/${_JARCH}/jvm.cfg ${pkgdir}/etc/java-7-openjdk/
|
|
pushd ${pkgdir}${_jvmdir}/jre/lib/${_JARCH}/
|
|
ln -vsf /etc/java-7-openjdk/jvm.cfg .
|
|
popd
|
|
}
|
|
|
|
package_jre7-openjdk() {
|
|
pkgdesc="Free Java environment based on OpenJDK 7.0 with IcedTea7 replacing binary plugs - Full Java runtime environment - needed for executing Java GUI and Webstart programs"
|
|
depends=('jre7-openjdk-headless' 'xdg-utils' 'hicolor-icon-theme')
|
|
optdepends=('icedtea-web-java7: web browser plugin + Java Web Start'
|
|
'alsa-lib: for basic sound support'
|
|
'giflib: for gif format support'
|
|
'libpulse: for advanced sound support'
|
|
'gtk2: for the Gtk+ look and feel - desktop usage'
|
|
'libxtst: linked in xawt/libmawt.so - desktop usage')
|
|
install=jre7-openjdk.install
|
|
provides=('java-runtime=7')
|
|
conflicts=('openjdk6')
|
|
|
|
mv ${srcdir}/tmp-desktop-jre/* ${pkgdir}
|
|
# 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
|
|
|
|
cd "${srcdir}/icedtea-${_icedtea_ver}/openjdk.build/j2sdk-image/jre"
|
|
|
|
# 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
|
|
|
|
# Install desktop files.
|
|
install -m755 -d ${pkgdir}/usr/share/applications
|
|
install -m644 ${srcdir}/icedtea-${_icedtea_ver}/policytool.desktop ${pkgdir}/usr/share/applications
|
|
|
|
# link license
|
|
install -m755 -d ${pkgdir}/usr/share/licenses
|
|
ln -sf /usr/share/licenses/${pkgbase} "${pkgdir}/usr/share/licenses/${pkgname}"
|
|
}
|
|
|
|
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/jdk.sh etc/profile.d/jdk.csh)
|
|
|
|
cd "${srcdir}/icedtea-${_icedtea_ver}/openjdk.build/j2sdk-image"
|
|
|
|
# Main files
|
|
install -m755 -d ${pkgdir}${_jvmdir}
|
|
|
|
cp -a include lib ${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
|
|
|
|
# Install desktop files.
|
|
install -m755 -d ${pkgdir}/usr/share/applications
|
|
install -m644 ${srcdir}/icedtea-${_icedtea_ver}/jconsole.desktop ${pkgdir}/usr/share/applications
|
|
|
|
# Handling 'java-rmi.cgi' separately
|
|
install -m755 -D bin/java-rmi.cgi ${pkgdir}${_jvmdir}/bin/java-rmi.cgi
|
|
|
|
# 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
|
|
|
|
# link license
|
|
install -m755 -d ${pkgdir}/usr/share/licenses
|
|
ln -sf /usr/share/licenses/${pkgbase} "${pkgdir}/usr/share/licenses/${pkgname}"
|
|
}
|
|
|
|
package_openjdk7-src() {
|
|
pkgdesc="Free Java environment based on OpenJDK 7.0 with IcedTea7 replacing binary plugs - sources"
|
|
replaces=('openjdk6-src')
|
|
|
|
install -D ${srcdir}/icedtea-${_icedtea_ver}/openjdk.build/j2sdk-image/src.zip \
|
|
${pkgdir}${_jvmdir}/src.zip
|
|
}
|