void-packages/srcpkgs/jre/template
2013-07-27 21:14:54 -03:00

81 lines
2.4 KiB
Plaintext

# Template file for 'oracle-jre'
pkgname=jre
_extraversion=1.7.0_25
version=7u25
revision=1
wrksrc="jre${_extraversion}"
if [ "$XBPS_TARGET_MACHINE" = "x86_64" ]; then
distfiles="http://ftp.wsisiz.edu.pl/pub/pc/pozyteczne%20oprogramowanie/java/jre-${version}-linux-x64.tar.gz"
checksum=3c4496316fb413d5ab0590e9971676a521b9a600b3ceaac311f04c18c98a98c0
elif [ "$XBPS_TARGET_MACHINE" = "i686" ]; then
distfiles="http://ftp.wsisiz.edu.pl/pub/pc/pozyteczne%20oprogramowanie/java/jre-${version}-linux-i586.tar.gz"
checksum=4016965536d8607743267812ab04e6d428036dda432893748c1df6cb77b09628
fi
short_desc="Oracle's Java Runtime Environment (JRE) - Version 7"
maintainer="davehome <davehome@redthumb.info.tm>"
homepage="http://www.oracle.com/technetwork/java/javase/downloads/index.html"
license="oracle"
only_for_archs="i686 x86_64"
do_install() {
# Install desktop related items
vmkdir usr/share
vcopy lib/desktop/icons usr/share
vcopy lib/desktop/applications usr/share
vcopy lib/desktop/mime usr/share
vcopy lib/locale usr/share
vcopy man usr/share
rm -rf ${DESTDIR}/usr/share/man/ja
# Install license(s)
vmkdir usr/share/licenses/jre
vcopy COPYRIGHT usr/share/licenses/jre
vcopy LICENSE usr/share/licenses/jre
vcopy THIRDPARTYLICENSEREADME.txt usr/share/licenses/jre
# For system environment vars and desktop extra shortcut
vinstall ${FILESDIR}/jre.sh 644 etc/profile.d
vinstall ${FILESDIR}/java-policy-settings.desktop 644 usr/share/applications
# Install JRE
vmkdir usr/share/java/jre
vcopy bin usr/share/java/jre
vcopy lib usr/share/java/jre
vcopy release usr/share/java/jre
vcopy Welcome.html usr/share/java/jre
rm -rf ${DESTDIR}/usr/share/java/jre/lib/desktop
rm -rf ${DESTDIR}/usr/share/java/jre/lib/locale
# Install mozilla compatible plugin.
vmkdir usr/lib/mozilla/plugins
if [ "${XBPS_MACHINE}" = "x86_64" ]; then
_arch=amd64
else
_arch=i386
fi
# Remove shlib linking to old ffmpeg libraries.
rm -f ${DESTDIR}/usr/share/java/jre/lib/${_arch}/fxavcodecplugin-52.so
cd ${DESTDIR}/usr/lib/mozilla/plugins
ln -sf ../../../share/java/jre/lib/${_arch}/libnpjp2.so .
# linker's config
vmkdir etc/ld.so.conf.d
echo "/usr/share/java/jre/lib/${_arch}" > \
${DESTDIR}/etc/ld.so.conf.d/${pkgname}.conf
}
jre_package() {
nonfree=yes
depends="hicolor-icon-theme desktop-file-utils xdg-utils shared-mime-info"
provides="java-runtime-${version}"
replaces="java-runtime>=0"
pkg_install() {
vmove all
}
}