CWD=`pwd` PKG=/tmp/package-jre rm -rf $PKG mkdir -p $PKG VERSION=6u6 DVER=1.6.0_06 ARCH=i586 BUILD=3 cd $PKG mkdir -p usr/lib cd usr/lib sh $CWD/jre-${VERSION}-linux-${ARCH}.bin || exit 1 mkdir -p $PKG/etc/profile.d cp -a $CWD/profile.d/* $PKG/etc/profile.d chown -R root:root $PKG ( cd $PKG find . -perm 664 -exec chmod 644 {} \; find . -perm 600 -exec chmod 644 {} \; find . -perm 444 -exec chmod 644 {} \; find . -perm 400 -exec chmod 644 {} \; find . -perm 440 -exec chmod 644 {} \; find . -perm 777 -exec chmod 755 {} \; find . -perm 775 -exec chmod 755 {} \; find . -perm 511 -exec chmod 755 {} \; find . -perm 711 -exec chmod 755 {} \; find . -perm 555 -exec chmod 755 {} \; ) chmod 755 $PKG/etc/profile.d/* ( cd $PKG/usr/lib mv jre${DVER} java ln -sf java jre${DVER} ) mkdir -p $PKG/usr/lib/mozilla/plugins ( cd $PKG/usr/lib/mozilla/plugins ln -sf /usr/lib/java/plugin/i386/ns7/libjavaplugin_oji.so libjavaplugin_oji.so ) mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cat << EOF > $PKG/install/doinst.sh # Clean up a potential upgrade mess caused by changing the # installation directory to /usr/lib/java/: if [ -L usr/lib/java ]; then rm -rf usr/lib/java mkdir -p usr/lib/java/man mkdir -p usr/lib/java/lib/i386/server mkdir -p usr/lib/java/lib/i386/client mkdir -p usr/lib/java/javaws mkdir -p usr/lib/java/bin mkdir -p usr/lib/mozilla/plugins fi if [ -L ControlPanel ]; then rm -f ControlPanel fi if [ -L ja ]; then rm -f ja fi if [ -L javaws ]; then rm -f javaws fi if [ -L libjsig.so ]; then rm -f libjsig.so fi # End cleanup. EOF cd $PKG makepkg -l y -c n /tmp/jre-$VERSION-$ARCH-$BUILD.tgz