#!/bin/sh # # Slackware build script for Google Chrome # Copyright 2009-2010 Erik Hanson, Minneapolis, MN, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is # permitted provided that the following conditions are met: # # 1. Redistributions of this script must retain the above copyright # notice, this list of conditions and the following disclaimer. # # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO # EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # Adapted by Gwenhael Le Moine for Chromium snapshot CWD=$(pwd) PRGNAM=$(basename $CWD) VERSION=snapshot REVISION=${REVISION:-} ARCH=${ARCH:-$(uname -m)} BUILD=${BUILD:-1} TAG=${TAG:-cyco} TAG=cyco TMP=${TMP:-/tmp/$TAG} PKG=$TMP/pkg-$PRGNAM OUTPUT=${OUTPUT:-/tmp} # Just in case: case "$ARCH" in i?86) REL="chromium-rel-linux" ; LIBDIRSUFFIX="" ; ARCH=i386 ;; x86_64) REL="chromium-rel-linux-64" ; LIBDIRSUFFIX="64" ;; arm*) REL="chromium-rel-arm"; LIBDIRSUFFIX="" ; ARCH=arm ;; esac #set -eu rm -rf $PKG mkdir -p $TMP $PKG/opt $OUTPUT cd $PKG/opt if [ "x$REVISION" == "x" ]; then #get latest revision number [ -e ./LATEST ] && rm ./LATEST wget -c http://build.chromium.org/buildbot/snapshots/$REL/LATEST REVISION=$(cat ./LATEST) rm ./LATEST] fi VERSION=${VERSION}_$REVISION #get chromium [ -e chrome-linux.zip ] && rm chrome-linux.zip wget -c http://build.chromium.org/buildbot/snapshots/$REL/$REVISION/chrome-linux.zip unzip ./chrome-linux.zip && rm ./chrome-linux.zip cd .. # We need bits of Moz, do this as dynamically as possible: MISSING_LIBS=$(ldd opt/chrome-linux/chrome | grep "not found" | cut -d\ -f1 | xargs) for MLIB in $MISSING_LIBS ; do ln -s /usr/lib${LIBDIRSUFFIX}/seamonkey/${MLIB%.?d} opt/chrome-linux/$MLIB done mkdir -p $PKG/usr/man/man1/ mv $PKG/opt/chrome-linux/chrome.1 $PKG/usr/man/man1/ gzip -9 $PKG/usr/man/man?/*.? mkdir -p $PKG/usr/bin cat < $PKG/usr/bin/$PRGNAM #!/bin/sh cd /opt/chrome-linux/ LD_LIBRARY_PATH=/opt/chrome-linux/:\$LD_LIBRARY_PATH ./chrome --proxy-server="socks://localhost:9050" \$* EOF # ( cd $PKG/usr/bin/ # ln -s $PRGNAM chrome # ln -s $PRGNAM google-chrome # ) mkdir -p $PKG/install cat < $PKG/install/slack-desc $PRGNAM: $PRGNAM (Web browser) $PRGNAM: $PRGNAM: Chromium is an open-source browser project that aims to build a safer, $PRGNAM: faster, and more stable way for all users to experience the web. $PRGNAM: $PRGNAM: $PRGNAM: $PRGNAM: $PRGNAM: $PRGNAM: http://chromium.org $PRGNAM: EOF cd $PKG chown -R root:root . find . -type d -exec chmod 755 {} \; find . -type f -exec chmod 644 {} \; chmod 755 $PKG/opt/chrome-linux/{chrome,chrome_sandbox,xdg-settings,chrome-wrapper} $PKG/usr/bin/* chmod +s $PKG/opt/chrome-linux/chrome_sandbox rm -f $PKG/{,usr/}lib$(uname -m | grep -o 64)/*.la /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-txz}