diff options
Diffstat (limited to 'multimedia/GoogleEarth/GoogleEarth.SlackBuild')
-rw-r--r-- | multimedia/GoogleEarth/GoogleEarth.SlackBuild | 65 |
1 files changed, 35 insertions, 30 deletions
diff --git a/multimedia/GoogleEarth/GoogleEarth.SlackBuild b/multimedia/GoogleEarth/GoogleEarth.SlackBuild index 191ea8fe4c46a..51a10c9c868d0 100644 --- a/multimedia/GoogleEarth/GoogleEarth.SlackBuild +++ b/multimedia/GoogleEarth/GoogleEarth.SlackBuild @@ -25,11 +25,8 @@ # Thanks to rworkman for the additional code and script cleanups # and to Daniel de Kok and Alan_Hicks for their comments. -set -e - -PRGNAM=googleearth -PKGNAME=GoogleEarth -VERSION=4.2.205.5730 +PRGNAM=GoogleEarth +VERSION=4.3.7284.3916 ARCH=${ARCH:-i486} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -41,24 +38,33 @@ OUTPUT=${OUTPUT:-/tmp} # No flags/configure needed as it is just a binary repackaging. +set -e + rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP -sh $CWD/${PKGNAME}Linux.bin --noexec --target $PKG/opt/$PKGNAME - -cd $PKG/opt/$PKGNAME - tar -xvf $PRGNAM-data.tar - tar -xvf $PRGNAM-linux-x86.tar - rm $PRGNAM-data.tar $PRGNAM-linux-x86.tar +sh $CWD/${PRGNAM}Linux.bin --noexec --target $PKG/opt/$PRGNAM ; sync +cd $PKG/opt/$PRGNAM + tar xf googleearth-data.tar + tar xf googleearth-linux-x86.tar + rm googleearth-data.tar googleearth-linux-x86.tar cd - -# Set the ownership and permissions right after all parts are extracted. +# Set the ownership and permissions correctly cd $PKG chown -R root:root . -chmod -R u+w,go+r-w,a-s . - -mv $PKG/opt/$PKGNAME/bin/$PRGNAM $PKG/opt/$PKGNAME/$PRGNAM -rmdir $PKG/opt/$PKGNAME/bin +find . \ + \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \; +# Sadly, Google has some rather inconsisten permissions for normal files. This +# should deal with them rather nicely. +find . \( -name "*.png" -o -name "*.kml" -o -name "*.xml" \) \ + -exec chmod 0644 {} \; + +mv $PKG/opt/$PRGNAM/bin/googleearth $PKG/opt/$PRGNAM +rmdir $PKG/opt/$PRGNAM/bin ( cd $PKG find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true @@ -73,7 +79,6 @@ mkdir -p $PKG/usr/share/{applications,mime,pixmaps} $PKG/usr/bin cat > $DESKTOPFILE << EOF [Desktop Entry] -Encoding=UTF-8 Name=Google Earth GenericName=3D planet viewer Comment=Explore, search and discover the planet @@ -82,8 +87,8 @@ Terminal=false MultipleArgs=false Type=Application Icon=/usr/share/pixmaps/googleearth-icon.png -Categories=Application;Network -MimeType=application/vnd.google-earth.kml+xml;application/vnd.google-earth.kmz;application/earthviewer;application/keyhole +Categories=Network; +MimeType=application/vnd.google-earth.kml+xml;application/vnd.google-earth.kmz;application/earthviewer;application/keyhole; EOF cat > $MIMEFILE << EOF @@ -111,25 +116,25 @@ cat > $MIMEFILE << EOF EOF # Let's take care of documentation -mkdir -p $PKG/usr/doc/$PKGNAME-$VERSION -mv $PKG/opt/$PKGNAME/README.linux $PKG/usr/doc/$PKGNAME-$VERSION -cat $CWD/$PKGNAME.SlackBuild > $PKG/usr/doc/$PKGNAME-$VERSION/$PKGNAME.SlackBuild +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +mv $PKG/opt/$PRGNAM/{README.linux,gpl.txt} $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild # Make some needed symlinks in the package -( cd $PKG/usr/share/pixmaps - ln -s /opt/$PKGNAME/$PRGNAM-icon.png . - ln -s /opt/$PKGNAME/$PRGNAM.xpm . +cd $PKG/usr/share/pixmaps + ln -s /opt/$PRGNAM/googleearth-icon.png . + ln -s /opt/$PRGNAM/googleearth.xpm . cd $PKG/usr/bin - ln -s /opt/$PKGNAME/$PRGNAM . -) + ln -s /opt/$PRGNAM/googleearth . +cd - mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/doinst.sh > $PKG/install/doinst.sh # Clean up files that we no longer need. -rm $PKG/opt/$PKGNAME/{preuninstall,setup,postinstall}.sh -rm -rf $PKG/opt/$PKGNAME/setup.data +rm $PKG/opt/$PRGNAM/{preuninstall,setup,postinstall}.sh +rm -rf $PKG/opt/$PRGNAM/setup.data cd $PKG -/sbin/makepkg -l y -c n $OUTPUT/$PKGNAME-$VERSION-$ARCH-$BUILD$TAG.tgz +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz |