[arch-ports] PKGBUILD and package release thoughts
Andreas Radke
a.radke at arcor.de
Sat Mar 11 15:37:09 EST 2006
Jason Chu schrieb:
> If there is that large of a discrepency (like j2re, from what I
> understand), it will be a whole different package: j2re-amd64.
>
> If there are just patches and things like that it will look something like
> this:
> source=('sources' 'that' 'are' 'common')
> [ "$CARCH" = "amd64" ] && source=(${source[@]} 'other' 'source')
>
> Jason
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> arch-ports mailing list
> arch-ports at archlinux.org
> http://www.archlinux.org/mailman/listinfo/arch-ports
>
Here is my latest pkgbuild for j2re. I don't know how to prevent makepkg
downloading the large 32bit source. But only therefor a different package?
# $Id: PKGBUILD,v 1.15 2006/02/11 23:04:29 jgc Exp $
# Contributed by: Jason Chu <jason at archlinux.org>
# This PKGBUILD was built largely from code in Crux Linux, then modified
a bunch to make it j2re
# Maintainer: Jason Chu <jason at archlinux.org>
# Contributions by Dusty
pkgname=j2re
pkgver=1.5.0_06
pkgrel=3
pkgdesc="Sun's java runtime environment"
url="http://java.sun.com"
depends=('gcc' 'glibc')
install="j2re.install"
#source=(http://public.planetmirror.com/pub/java-sun/J2SE/5.0_04/linux32/jre-1_5_0_04-linux-i586.bin
j2re.profile jre.patch)
#source=(http://mirror.dcc.fc.up.pt/Java/jre-1_5_0_06-linux-i586.bin
j2re.profile jre.patch)
[ "$CARCH" == "x86_64" ] &&
source=(http://mirror.dcc.fc.up.pt/Java/jre-1_5_0_06-linux-amd64.bin
j2re.profile jre.patch)
md5sums=('e0a88dbec9bfe3195794bb652bfc6516'
'87d90b2e075b77c41a7efec7411a4153'\
'3b589fa777fab553d4f7ce57bc90ce48')
[ "$CARCH" == "x86_64" ] && md5sums=('6a771c3c9e93021ab34a30bcf609c74b'
'87d90b2e075b77c41a7efec7411a4153'\
'91544f3d5d5aa054db7ce2144d17138b')
build() {
cd $startdir/src
[ "$CARCH" == "i686" ] && patch -p0 jre-1_5_0_06-linux-i586.bin
<jre.patch
[ "$CARCH" == "x86_64" ] && patch -p0 jre-1_5_0_06-linux-amd64.bin
<jre.patch
mkdir -p $startdir/pkg/opt/java
cd $startdir/pkg/opt/java
[ "$CARCH" == "i686" ] && echo -e "q\nyes" | sh
$startdir/src/jre-1_5_0_06-linux-i586.bin
[ "$CARCH" == "x86_64" ] && echo -e "q\nyes" | sh
$startdir/src/jre-1_5_0_06-linux-amd64.bin
mv jre${pkgver} jre
rm -r jre/man/ja*
for i in jre/*; do
if [ -f $i ]; then rm -f $i; fi
done
install -D -m755 $startdir/src/${pkgname}.profile
$startdir/pkg/etc/profile.d/${pkgname}.sh
# no plugin for x86_64
if [ "$CARCH" == "i686" ]; then
mkdir -p $startdir/pkg/opt/mozilla/lib/plugins
ln -s /opt/java/jre/plugin/i386/ns7/libjavaplugin_oji.so
$startdir/pkg/opt/mozilla/lib/plugins
else echo "no plugin for x86_64"
fi
}
Something to improve?
AndyRTR
More information about the arch-ports
mailing list