b0VIM 7.2LN chipsterslack64-gsb228dev~chipster/gsb-build-system/src/ooo/openoffice3/openoffice3.SlackBuild 3210#"! UtpjzkZadjv({?= d  3 M  ~ ] \   ~ E   kH.#  v,P~^GaWLE M?;:}?2,% check_installed "$REQ" || { for REQ in $KDE_REQUIRED_PACKAGES; do done } exit 1 echo "${0##*/}: Required package '$REQ' not installed." check_installed "$REQ" || { for REQ in $REQUIRED_PACKAGES; do } exit 1 echo "${0##*/}: Remove installed '$PKGNAME' package before build." check_installed "$PKGNAME" && { } return $? ls -1 /var/log/packages | grep "^${1}-[^-]*-[^-]*-[^-]*$" >/dev/null 2>&1 function check_installed() {[ "$FORCEBUILD" = "0" ] && {# Package requirements and installation checks.done fi exit 1 echo "${0##*/}: Unknown option: $1" else exit 0 usage elif [ "$1" = "-help" ] || [ "$1" = "--help" ]; then shift NOCLEANUP=1 elif [ "$1" = "-no-cleanup" ] || [ "$1" = "--no-cleanup" ]; then shift FORCEBUILD=1 if [ "$1" = "-force" ] || [ "$1" = "--force" ]; thenwhile [ $# -gt 0 ]; do# Parse command line arguments.}EOF --help Show this help screen. This option prevents those files from being removed. directories will be deleted once the package is built. --no-cleanup By default any temporary source, build and package these checks and attempts a build anyway. required to build are missing. This option over-rides name is already installed, or any of the packagesOptions: --force The package will not be built if a package of the sameUsage: ${0##*/} [options] cat << EOFfunction usage() {# Usage.FORCEBUILD=0NOCLEANUP=0CWD=$(pwd)PKG=$TMP/package-$PKGNAMEPKGNAME=$(basename $0 .SlackBuild)# Script variables.PKGDEST=${PKGDEST:-$TMP}TMP=${TMP:-/tmp}DISTRO=${DISTRO:-slackware}TUNE=${TUNE:-i486}ARCH=${ARCH:-i486}TAG=${TAG:-gsb}# Build variables.KDE_REQUIRED_PACKAGES="kdebase-workspace kdelibs qt"# We will want to build with gtk/kde and native widgets. librsvg libjpeg jre jdk apache-ant rsync git seamonkey"REQUIRED_PACKAGES="gtk+2 neon libsndfile gnome-vfs boost libgnomeui sane zlib \# List any packages here that are required to build this package.LANGUAGES="en-US en-GB de fr it"WITH_LANGUAGES=${WITH_LANGUAGES:-"YES"}VERSION=3.2.0.10BUILD=3# Package variables.# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED## notice, this list of conditions and the following disclaimer.# 1. Redistributions of this script must retain the above copyright## permitted provided that the following conditions are met:# Redistribution and use of this script, with or without modification, is## Licenced under the terms of the GNU General Public Licence version 3.## All rights reserved.# Copyright (c) 2007,2008,2009 Steve Kennedy # Copyright (c) 2007,2008,2009 Darren 'Tadgy' Austin # Version: 1.7 GSB Package SlackBuild.#!/bin/bashaduZpL`, d @ j P :  r 7   v  L K 0 |Ti76l20/f&JIyutfi; rm -rf $PKG $TMP/$PKGNAME-$VERSIONif [ "$NOCLEANUP" = "0" ]; then# Cleanupremovepkg $KDE_REQUIRED_PACKAGES# unwanted dependencies. # Make sure to clean up build machine of any kde packages to prevent makepkg -p -l y -c n $PKGDEST/$PKGNAME-${VERSION//-/_}-$ARCH-${BUILD}${TAG}.txz || exit 1cd $PKG# Create the packageread; echo "Wait to inspect doinst.sh"# pause | sed "s,@LANG@,en,g" > $PKG/install/doinst.sh ;cat $CWD/doinst.sh | sed "s,@LIBDIRSUFFIX@,${LIBDIRSUFFIX},g" \# doinst dictionary installationdone } cat $CWD/$FILE >>$PKG/install/$FILE [ -e $CWD/$FILE ] && {dofor FILE in slack-desc slack-required slack-conflicts slack-suggests# Package meta files} { rm -f '%f'; ln -sf '%l.gz' '%f.gz'; } );\n" | bash "( cd '%h'; [ -e '%l.gz' ] && find $PKG/usr/man -type l -name \*.? -printf \ find $PKG/usr/man -type f -name \*.? -exec gzip -9f {} \;[ -e $PKG/usr/man ] && {# Compress and fix manpage links.chown -R root:root $PKG/usr/doc/$PKGNAME-$VERSIONfind $PKG/usr/doc/$PKGNAME-$VERSION/ -type f -exec chmod 644 {} \;done ln -s $PKG/usr/lib${LIBDIRSUFFIX}/ooo-3.2/$i $PKG/usr/doc/$PKGNAME-$VERSION ;for i in README README.html LICENSE LICENSE.html THIRDPARTYLICENSEREADME.html ; domkdir -p $PKG/usr/doc/$PKGNAME-$VERSION# Link extra documentation into /usr/doc cut -d: -f1 | xargs strip --strip-unneeded ; } 2>/dev/null{ find $PKG | xargs file | egrep "executable|shared object" | grep "ELF" | \# Strip debugging symbols.mv $PKG/etc/bash_completion.d/ooffice3.2.sh $PKG/etc/bash_completion.d/ooffice3.2.sh.new# Preserve fileszcat $CWD/gnome-menus-ooo3.menu.gz > $PKG/etc/gnome/xdg/menus/gnome-menus-ooo3.menu || exit 1zcat $CWD/OpenOffice3.directory.gz > $PKG/usr/share/desktop-directories/OpenOffice3.directory &&mkdir -p $PKG/usr/share/desktop-directories &&mkdir -p $PKG/etc/gnome/xdg/menus &&# Copy menus done; sed -i '/^Name/s/$/ 3.2/g' $i; do for i in $PKG/usr/share/applications/*.desktop ;# ooo 3.2 and ooo 2.4 can exist on the same system at once# Make sure our GNOME icons specify that we're using 3.2 since both) done ln -sf /usr/share/icons/hicolor/48x48/apps/ooo-${APP}3.2.png . ; for APP in base calc draw impress math writer ; do( cd $PKG/usr/pixmapsmkdir -p $PKG/usr/pixmaps# Add /usr/share/pixmaps directory and link icons to itfi; done; rm -fr $TMP/$PKGNAME-l10n-$lang ; ) makepkg -p -l y -c n $PKGDEST/$PKGNAME-l10n-${lang}-${VERSION//-/_}-noarch-${BUILD}${TAG}.txz) ( cd $TMP/$PKGNAME-l10n-$lang ; | sed "s,@LANG@,${lang//en-GB/en},g" > $TMP/$PKGNAME-l10n-$lang/install/doinst.sh ; cat $CWD/doinst-l10n.sh | sed "s,@LIBDIRSUFFIX@,${LIBDIRSUFFIX},g" \ # doinst dictionary installation $TMP/$PKGNAME-l10n-$lang/install/slack-desc ; cat $CWD/l10n/slack-desc.openoffice3-l10n-${lang} > \ mkdir -p $TMP/$PKGNAME-l10n-$lang/install && -o -name "*${lang}.oxt" ) | ( cd $TMP/$PKGNAME-l10n-$lang ; tar xf - ) -o -name "Langpack-${lang}.xcu" \ -o -name "Lang_*${lang}.xba" \ -o -type d -name "${lang}" \ -o -name "LICENSE*${lang}*" \ tar cf - --remove-files $(find . -name "README*$lang*" \