Repository 32bit  Forum
Repository 64bit  Wiki

Chromium Builder

Da Slacky.eu.

Script che scarica la build giornaliera di Chromium dal sito e la impacchetta, semplice semplice :)

#!/bin/sh

# Slackware build script for chromium

# Copyright 2010 Savino Liguori aka jimmy_page_89
# 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.

NAME=chromium
DOWNAME=chrome-linux
ARCH=`uname -m`
CWD=`pwd`
PKGFORMAT=${PKGFORMAT:-tgz}
BUILD=${BUILD:-1}
TAG=${TAG:-_jim}
PKG=${PKG:-/tmp/package-$NAME}
TMP=${TMP:-/tmp/build-$NAME}

if [ "$ARCH" = "x86_64" ]; then
	LIBSUF="64"
	WEBSUF="-64"
else
	LIBSUF=""
	WEBSUF=""
fi

set -eu

rm -rf $TMP $PKG
mkdir -p $TMP
mkdir -p $PKG
cd $TMP
wget http://build.chromium.org/buildbot/snapshots/chromium-rel-linux$WEBSUF/LATEST
VERSION=`cat LATEST`
wget http://build.chromium.org/buildbot/snapshots/chromium-rel-linux$WEBSUF/$VERSION/$DOWNAME.zip
unzip $TMP/$DOWNAME.zip -d $TMP
chown -R root:root .
chmod -R u+w,go+r-w,a-s .
mkdir -p $PKG/opt
cp -r $TMP/$DOWNAME $PKG/opt/$NAME
mkdir $PKG/install
cat > $PKG/install/doinst.sh << EOF
#!/bin/sh
ln -s /usr/lib${LIBSUF}/libnss3.so /usr/lib${LIBSUF}/libnss3.so.1d
ln -s /usr/lib${LIBSUF}/libnssutil3.so /usr/lib${LIBSUF}/libnssutil3.so.1d
ln -s /usr/lib${LIBSUF}/libsmime3.so /usr/lib${LIBSUF}/libsmime3.so.1d
ln -s /usr/lib${LIBSUF}/libssl3.so /usr/lib${LIBSUF}/libssl3.so.1d
ln -s /usr/lib${LIBSUF}/libplds4.so /usr/lib${LIBSUF}/libplds4.so.0d
ln -s /usr/lib${LIBSUF}/libplc4.so /usr/lib${LIBSUF}/libplc4.so.0d
ln -s /usr/lib${LIBSUF}/libnspr4.so /usr/lib${LIBSUF}/libnspr4.so.0d
if [ -x /usr/bin/update-mime-database ]; then
  /usr/bin/update-mime-database /usr/share/mime &> /dev/null
fi
if [ -x /usr/bin/update-desktop-database ]; then
  /usr/bin/update-desktop-database 1> /dev/null 2> /dev/null
fi
if [ -x /usr/bin/gtk-update-icon-cache ]; then
  /usr/bin/gtk-update-icon-cache  -f -q /usr/share/icons/hicolor 1> /dev/null 2> /dev/null
fi
EOF

mkdir -p $PKG/usr/share/applications
mkdir -p $PKG/usr/share/pixmaps
mkdir -p $PKG/usr/doc/$NAME
cp $PKG/opt/$NAME/product_logo_48.png $PKG/usr/share/pixmaps/chromium.png
cat $CWD/$NAME.SlackBuild > $PKG/usr/doc/$NAME/$NAME.SlackBuild
cat > $PKG/usr/share/applications/chromium.desktop << "EOF"
[Desktop Entry]
Exec=chromium %u
Icon=chromium
Type=Application
Categories=Network;
Name=Chromium
MimeType=text/html;
X-KDE-StartupNotify=true
EOF

cat > $PKG/install/slack-desc << "EOF"
# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description.  Line
# up the first '|' above the ':' following the base package name, and the '|'
# on the right side marks the last column you can put a character in.  You must
# make exactly 11 lines for the formatting to be correct.  It's also
# customary to leave one space after the ':'.

        |-----handy-ruler----------------------------------------------------|
chromium: Chromium
chromium:
chromium: Chromium is a browser that combines a minimal design with
chromium: sophisticated  technology  to  make the web faster, safer, and
chromium: easier. Is the free-brand version of Google Chrome
chromium:
chromium:                     *** W A R N I N G ***
chromium:          Chromium work with some Mozilla-Firefox libraries.
chromium:            Do not remove Mozilla-Firefox package.
chromium:
chromium:
EOF

mkdir -p $PKG/usr/bin
cat > $PKG/usr/bin/chromium << "EOF"
#!/bin/sh
/opt/chromium/chrome $1
EOF
chmod +x $PKG/usr/bin/chromium
chmod -R 0755 $PKG
cd $PKG
/sbin/makepkg -l y -c n $CWD/$NAME-r$VERSION-$ARCH-$BUILD$TAG.$PKGFORMAT || exit 1

rm -rf $TMP
rm -rf $PKG
Strumenti personali
Namespace

Varianti