CWD=`pwd` PKG=/tmp/package-jre rm -rf $PKG mkdir -p $PKG VERSION=1_5_0 DVER=50 ARCH=s390x BUILD=1 cd $PKG mkdir -p usr/lib cd usr/lib tar -zxvf $CWD/ibm-java2-jre-${DVER}-linux-$ARCH.tgz 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/ibm-java2-${ARCH}-${DVER}/jre mv bin lib .systemPrefs ../ cd .. rmdir -v jre ) ( cd $PKG/usr/lib mv ibm-java2-${ARCH}-${DVER} ibm-java2-${ARCH}-jre-${DVER} ln -sf ibm-java2-${ARCH}-jre-${DVER} java ) mkdir -p $PKG/install cat $CWD/slack-desc.IBM > $PKG/install/slack-desc cd $PKG makepkg -l y -c n /tmp/jre-$VERSION-$ARCH-$BUILD.tgz