wok rev 21202
updated command procedure get-LibreOffice
author | Hans-G?nter Theisgen |
---|---|
date | Sun Apr 07 07:44:57 2019 +0100 (2019-04-07) |
parents | aede45d8bcca |
children | adbdcada3730 |
files | get-LibreOffice/receipt get-LibreOffice/stuff/get-LibreOffice |
line diff
1.1 --- a/get-LibreOffice/receipt Sat Apr 06 17:02:36 2019 +0200 1.2 +++ b/get-LibreOffice/receipt Sun Apr 07 07:44:57 2019 +0100 1.3 @@ -1,18 +1,19 @@ 1.4 # SliTaz package receipt. 1.5 1.6 PACKAGE="get-LibreOffice" 1.7 -VERSION="1.2" 1.8 +VERSION="1.3" 1.9 CATEGORY="office" 1.10 +TAGS="office word excel ppt openoffice libreoffice" 1.11 SHORT_DESC="Productivity suite." 1.12 MAINTAINER="ben@seawolfsanctuary.com" 1.13 LICENSE="GPL3" 1.14 -WEB_SITE="http://www.documentfoundation.org" 1.15 -TAGS="office word excel ppt openoffice libreoffice" 1.16 +WEB_SITE="https://www.documentfoundation.org" 1.17 1.18 # Rules to gen a SliTaz package suitable for Tazpkg. 1.19 genpkg_rules() 1.20 { 1.21 mkdir -p $fs/usr/bin 1.22 - install -o root -g root -m755 stuff/get-LibreOffice $fs/usr/bin 1.23 + install -o root -g root -m755 \ 1.24 + stuff/get-LibreOffice $fs/usr/bin 1.25 ln -s get-LibreOffice $fs/usr/bin/get-libreoffice 1.26 }
2.1 --- a/get-LibreOffice/stuff/get-LibreOffice Sat Apr 06 17:02:36 2019 +0200 2.2 +++ b/get-LibreOffice/stuff/get-LibreOffice Sun Apr 07 07:44:57 2019 +0100 2.3 @@ -1,238 +1,319 @@ 2.4 #!/bin/sh 2.5 -# get-LibreOffice - install LibreOffice excl. KDE/Gnome integration & test suite. 2.6 +# get-LibreOffice - create and install SliTaz package LibreOffice 2.7 +# excluding KDE and GNOME integration and test suite. 2.8 # 2.9 -# (C) 2010 SliTaz - GNU General Public License v3. 2.10 +# (C) 2019 SliTaz - GNU General Public License v3. 2.11 # Author : Ben Arnold <ben@seawolfsanctuary.com> 2.12 # via : get-OpenOffice3 (Eric Joseph-Alexandre <erjo@slitaz.org>) 2.13 +# modified by Hans-Günter Theisgen on 2019-04-07 2.14 # 2.15 2.16 -PACKAGE="LibreOffice" 2.17 -URL="http://www.libreoffice.org" 2.18 -ROOT="$1" 2.19 +# === Initialisations === 2.20 + 2.21 +PKGS_DB="/var/lib/tazpkg" # packages database directory 2.22 +PACKAGE="LibreOffice" # package to create and install 2.23 +CATEGORY="office" 2.24 +SHORT_DESC="Productivity suite." 2.25 +WEB_SITE="https://www.libreoffice.org" 2.26 +LICENCE="MPL v2.0" 2.27 + 2.28 DIR="stable" 2.29 SUFFIX="Linux_x86_rpm.tar.gz" 2.30 -WGET_URL="http://download.documentfoundation.org/libreoffice/$DIR" 2.31 +PREFIX="http://download.documentfoundation.org/libreoffice/$DIR" 2.32 2.33 -VERSION="$(basename $(wget -O - $WGET_URL/ 2> /dev/null | \ 2.34 - sed '/href=\"[0-9]/!d;s/.*href=\"//;s/[/\">].*//' | tail -1))" 2.35 -if [ -z "$VERSION" ]; then 2.36 - echo "Can't detect an appropriate version. The version numbering or URL may have changed. Aborted." 2.37 - exit 0 2.38 -fi 2.39 -VER="${VERSION/\-/}" # without hyphens 2.40 +DEPENDS="java6-jre cups" 2.41 +EXCLUDE="kde|gnome|test" 2.42 2.43 +# Declare functions check_root, status, ... 2.44 +. /lib/libtaz.sh 2.45 +# and make commandline options (if any) available as variables 2.46 2.47 -TARBALL="LibreOffice_${VER}_${SUFFIX}" 2.48 - 2.49 -for LOC in ${LANG/_/-} ${LANG%_*}; do 2.50 - L_SUFFIX="Linux_x86_rpm_langpack_$LOC.tar.gz" 2.51 - L_TARBALL="LibreOffice_${VER}_${L_SUFFIX}" 2.52 - LANG_URL="$WGET_URL/${VERSION}/rpm/x86/${L_TARBALL}" 2.53 - busybox wget -s $LANG_URL 2> /dev/null || continue 2.54 - echo "Added $LANG ($LOC)." 2.55 - break 2.56 -done 2.57 -WGET_URL="$WGET_URL/${VERSION}/rpm/x86/${TARBALL}" 2.58 - 2.59 -CUR_DIR=$(pwd) 2.60 -TEMP_DIR="/tmp/$PACKAGE.$$" 2.61 -SOURCE_DIR="/tmp/src.$$" 2.62 -EXCLUDE="kde|gnome|test" 2.63 -LOG="/tmp/$(basename $0 .sh).log" 2.64 - 2.65 - 2.66 -# Status function with color (supported by Ash). 2.67 -status() 2.68 +is_installed() 2.69 { 2.70 - local CHECK=$? 2.71 - echo -en "\\033[70G[ " 2.72 - if [ $CHECK = 0 ]; then 2.73 - echo -en "\\033[1;33mOK" 2.74 - else 2.75 - echo -en "\\033[1;31mFailed" 2.76 - fi 2.77 - echo -e "\\033[0;39m ]" 2.78 - return $CHECK 2.79 -} 2.80 - 2.81 -# Check if user is root to install, or remove packages. 2.82 -check_root() 2.83 -{ 2.84 - if test $(id -u) != 0 ; then 2.85 - echo -e "\nYou must be root to run `basename $0` with this option." 2.86 - echo -e "Please use 'su' and root password to become super-user.\n" 2.87 - exit 0 2.88 - fi 2.89 -} 2.90 - 2.91 -check_if_installed() 2.92 -{ 2.93 - # Avoid reinstall 2.94 - if [ -d $ROOT/var/lib/tazpkg/installed/$PACKAGE ];then 2.95 + if [ -d $root$PKGS_DB/installed/$PACKAGE ] 2.96 + then #package is deemed to be installed 2.97 return 0 2.98 - else 2.99 + else 2.100 return 1 2.101 fi 2.102 } 2.103 2.104 -# We need to be root 2.105 +# Show available commandline options, if requested by --help 2.106 +if [ "$help" = "yes" ] 2.107 + then 2.108 + echo "Available commandline options: 2.109 + $0 2.110 + --version=<version> 2.111 + --root=<path_to_root> 2.112 + --install=yes|no 2.113 + --keep=no|yes 2.114 + --srcdir=<directory_for_source_packages> 2.115 + --tmpdir=<directory_to_build-package>" 2.116 + exit 2.117 +fi 2.118 + 2.119 +# Check for system administrator privileges 2.120 check_root 2.121 2.122 -# Check if package already installed 2.123 -if (check_if_installed $PACKAGE); then 2.124 +title "Package $PACKAGE will be build as SliTaz package and installed" 2.125 + 2.126 +# Fetch latest $DIR version, unless version is set by option --version 2.127 +[ -z "$version" ] && version="latest" 2.128 + 2.129 +# Fetch language pack according to $LANG, unless otherwise set by option --lang 2.130 +[ -z "$lang" ] && lang="automatic" 2.131 + 2.132 +# Install SliTaz package, unless inhibited by option --install=no 2.133 +[ -z "$install" ] && install="yes" 2.134 + 2.135 +# Delete SliTaz package file $PACKAGE-$VERSION.tazpkg after installation, 2.136 +# unless option --keep=yes is given 2.137 +[ -z "$keep" ] && keep="no" 2.138 + 2.139 +# Directory for temporary files 2.140 +[ -z "$tempdir" ] && TEMP_DIR="/tmp/get-$PACKAGE" 2.141 + 2.142 +# Directory for source archives 2.143 +[ -z "$srcdir" ] && SOURCE_DIR="/tmp/src-$PACKAGE" 2.144 + 2.145 +# Logging file 2.146 +LOG="/tmp/$(basename $0 .sh).log" 2.147 + 2.148 +cat <<EOT 2.149 +Options in use: 2.150 + root : $root/ 2.151 + version : $version 2.152 + lang : $lang 2.153 + install package : $install 2.154 + keep tazpkg : $keep 2.155 + source directory: $SOURCE_DIR 2.156 + build directory : $TEMP_DIR 2.157 + 2.158 +EOT 2.159 + 2.160 +separator; newline 2.161 + 2.162 +# === Remove package, if installed === 2.163 +if is_installed 2.164 + then 2.165 echo "$PACKAGE is already installed." 2.166 - [ -n "$ROOT" ] && exit 0 2.167 - echo -n "Would you like to remove and reinstall this package [y/n]? " 2.168 + [ -n "$root" ] && exit 0 2.169 + echo -n "Would you like to remove and reinstall this package [y/N]? " 2.170 read answer 2.171 case "$answer" in 2.172 - y|Y) 2.173 - tazpkg remove $PACKAGE ;; 2.174 - *) 2.175 + (y|Y) 2.176 + action "Removing installed version..." 2.177 + tazpkg remove $PACKAGE --root="$root/" 2.178 + [ ! is_installed ] && 2.179 + die "Can't remove installed version. Exiting." ;; 2.180 + (*) 2.181 exit 0 ;; 2.182 esac 2.183 - 2.184 fi 2.185 2.186 +# === Fetch archive file, if not existing === 2.187 2.188 -# Check if we have the tarball before. 2.189 -if [ ! -f $SOURCE_DIR/$TARBALL ]; then 2.190 - echo "Downloading LibreOffice tarball (it's time to have a break)... " 2.191 - # Check if $SOURCE_DIR exist 2.192 - test -d $SOURCE_DIR || mkdir -p $SOURCE_DIR 2.193 - # Get the file. 2.194 +if [ "$version" == "latest" ] 2.195 + then 2.196 + VERSION="$(basename $(wget -O - $PREFIX/ 2> /dev/null | \ 2.197 + sed '/href=\"[0-9]/!d;s/.*href=\"//;s/[/\">].*//' | tail -1))" 2.198 + if [ -z "$VERSION" ] 2.199 + then 2.200 + echo "Can't detect an appropriate version. The version numbering or URL may have changed. Exiting." 2.201 + exit 1 2.202 + fi 2.203 + else 2.204 + VERSION="$version" 2.205 +fi 2.206 + 2.207 +VER="${VERSION/\-/}" # without hyphens 2.208 +TARBALL="LibreOffice_${VER}_${SUFFIX}" 2.209 +WGET_URL="$PREFIX/${VERSION}/rpm/x86/${TARBALL}" 2.210 + 2.211 +# Set LANG_URL to fetch language package 2.212 +if [ "$lang" = "automatic" ] 2.213 + then # use language from $LANG of running process 2.214 + for LOC in ${LANG/_/-} ${LANG%_*} 2.215 + do 2.216 + L_SUFFIX="Linux_x86_rpm_langpack_$LOC.tar.gz" 2.217 + L_TARBALL="LibreOffice_${VER}_${L_SUFFIX}" 2.218 + LANG_URL="$PREFIX/${VERSION}/rpm/x86/${L_TARBALL}" 2.219 + busybox wget -s $LANG_URL 2> /dev/null || continue 2.220 + echo "Added language pack for $LANG ($LOC)." 2.221 + break 2.222 + done 2.223 + else 2.224 + L_SUFFIX="Linux_x86_rpm_langpack_$lang.tar.gz" 2.225 + L_TARBALL="LibreOffice_${VER}_${L_SUFFIX}" 2.226 + LANG_URL="$PREFIX/${VERSION}/rpm/x86/${L_TARBALL}" 2.227 + busybox wget -s $LANG_URL 2> /dev/null && 2.228 + echo "Added language pack for $lang." 2.229 +fi 2.230 + 2.231 +CUR_DIR=$(pwd) 2.232 +mkdir -p $TEMP_DIR 2.233 +cd $TEMP_DIR 2.234 + 2.235 +if [ -f $SOURCE_DIR/$TARBALL ] 2.236 + then 2.237 + echo "Using existing archive file $TARBALL" 2.238 + else 2.239 + action "Fetching the archives..." 2.240 + newline 2.241 + # Check if $SOURCE_DIR exists 2.242 + [ -d $SOURCE_DIR ] || mkdir -p $SOURCE_DIR 2.243 wget -c $WGET_URL -O $SOURCE_DIR/$TARBALL 2.244 - if [ -n $L_TARBALL ] ; then # Are we localised? 2.245 + if [ -n $L_TARBALL ] # language pack required? 2.246 + then 2.247 wget -c $LANG_URL -O $SOURCE_DIR/$L_TARBALL 2.248 fi 2.249 status 2.250 - 2.251 fi 2.252 2.253 -if [ ! -f $SOURCE_DIR/$TARBALL ]; then 2.254 +if [ ! -f $SOURCE_DIR/$TARBALL ] 2.255 + then 2.256 rm -rf $SOURCE_DIR 2.257 - echo "Could not download $TARBALL. Exiting." 2.258 + echo "Could not get $TARBALL. Exiting." 2.259 exit 1 2.260 fi 2.261 2.262 -echo -n "Extracting files (this may take a while): " 2.263 +# === Extract files from archives === 2.264 +action "Extracting the archives..." 2.265 +newline 2.266 +mkdir -p $TEMP_DIR 2.267 +for TB in $TARBALL $L_TARBALL 2.268 + do 2.269 + tar xvzf $SOURCE_DIR/$TB -C $TEMP_DIR > $LOG 2>&1 || 2.270 + (echo "Failed to extract $TB" ; exit 1) 2.271 + done 2.272 2.273 -# Creates TEMP_DIR and extract tarball 2.274 -mkdir -p $TEMP_DIR 2.275 -for TB in $TARBALL $L_TARBALL ; do 2.276 - tar xvzf $SOURCE_DIR/$TB -C $TEMP_DIR > $LOG 2>&1 || \ 2.277 - (echo "Failed to extract $TB" ; exit 1) 2.278 -done 2.279 +# === Create SliTaz package === 2.280 2.281 -# Get version found in archive (often directory is still RC version when final is present) 2.282 -ARCHIVED_VERSION=`cd $TEMP_DIR;find . -type d 2> /dev/null | grep LibreOffice | head -n 1 | sed 's/_/ /g' | awk '{print $2}'` 2.283 -echo -n "(found v${ARCHIVED_VERSION})" 2.284 +# Prepare metadata for SliTaz package 2.285 2.286 -# Consolidate localisations into main package 2.287 -if [ -n $L_TARBALL ] ; then # Are we localised? 2.288 - TARBALL_NAME="${TARBALL/.tar.gz/}" 2.289 +# Get version found in archive 2.290 +# (often directory is still RC version when final is present) 2.291 +VERSION_FROM_ARCHIVE=$(cd $TEMP_DIR;find . -type d 2> /dev/null \ 2.292 + | grep LibreOffice | head -n 1 | sed 's/_/ /g' | awk '{print $2}') 2.293 +echo -n "(found v${VERSION_FROM_ARCHIVE})" 2.294 + 2.295 +# Merge language pack into main package 2.296 +if [ -n $L_TARBALL ] # language pack required? 2.297 + then 2.298 + TARBALL_NAME="${TARBALL/.tar.gz/}" 2.299 L_TARBALL_NAME="${L_TARBALL/.tar.gz/}" 2.300 - mv -f $TEMP_DIR/${L_TARBALL_NAME/$VERSION/$ARCHIVED_VERSION}/RPMS/*.rpm $TEMP_DIR/${TARBALL_NAME/$VERSION/$ARCHIVED_VERSION}/RPMS/ 2.301 + mv -f $TEMP_DIR/${L_TARBALL_NAME/$VERSION/$VERSION_FROM_ARCHIVE}/RPMS/*.rpm \ 2.302 + $TEMP_DIR/${TARBALL_NAME/$VERSION/$VERSION_FROM_ARCHIVE}/RPMS/ 2.303 fi 2.304 status 2.305 2.306 -# Extracted pkg can be removed: Save RAM 2.307 +# Extracted archives can be removed 2.308 rm -rf $SOURCE_DIR 2.309 2.310 -# Extract everything from RPMS 2.311 -cd $TEMP_DIR/${TARBALL_NAME/$VERSION/$ARCHIVED_VERSION}/RPMS 2.312 +# Extract almost everything from RPMS directory 2.313 +action "Extracting RPMs..." 2.314 +newline 2.315 +cd $TEMP_DIR/${TARBALL_NAME/$VERSION/$VERSION_FROM_ARCHIVE}/RPMS 2.316 for i in *.rpm 2.317 -do 2.318 - if (! echo $i | egrep -qi $EXCLUDE); then 2.319 + do 2.320 + if (! echo $i | egrep -qi $EXCLUDE) 2.321 + then 2.322 echo -n "." 2.323 (rpm2cpio $i | cpio -id >> $LOG 2>&1 ) && rm -f $i 2.324 fi 2.325 -done 2.326 + done 2.327 +status 2.328 2.329 -#rpm2cpio desktop-integration/*freedesktop*.rpm | cpio -id >> $LOG 2>&1 2.330 -#rpm2cpio *freedesktop*.rpm | cpio -id >> $LOG 2>&1 2.331 +# Move files to package tree $PACKAGE-$VERSION/fs/ 2.332 +action "Preparing package..." 2.333 +mkdir -p $PACKAGE-$VERSION/fs/usr/lib/libreoffice 2.334 +mkdir -p $PACKAGE-$VERSION/fs/usr/share 2.335 2.336 -# extracted pkg can be removed: Save RAM 2.337 -rm -f desktop-integration/*freedesktop*.rpm 2.338 +# use mv instead of 'cp -a' to save space 2.339 +mv opt/libreoffice* $PACKAGE-$VERSION/fs/usr/lib 2.340 +mv usr/share/mime $PACKAGE-$VERSION/fs/usr/share 2.341 +mv usr/share/icons $PACKAGE-$VERSION/fs/usr/share 2.342 +mv usr/bin $PACKAGE-$VERSION/fs/usr 2.343 2.344 -status 2.345 -echo -n "Preparing package... " 2.346 +# relocalised libexec directory 2.347 +bin=$PACKAGE-$VERSION/fs/usr/bin/libreoffice${VERSION:0:3} 2.348 +if [ -L $bin ] 2.349 + then 2.350 + target=$(readlink $bin) 2.351 + rm -f $bin 2.352 + ln -s ${target/opt/usr\/lib\/libreoffice} $bin 2.353 + else 2.354 + sed -i 's#/opt/#/usr/lib/libreoffice/#' $bin 2.355 +fi 2.356 2.357 -# Make the package 2.358 -mkdir -p $PACKAGE-$VERSION/fs/usr/lib/libreoffice \ 2.359 - $PACKAGE-$VERSION/fs/usr/share 2.360 - 2.361 -# use mv instead of 'cp -a' to save RAM 2.362 -mv opt/libreoffice* $PACKAGE-$VERSION/fs/usr/lib 2.363 -mv usr/share/mime $PACKAGE-$VERSION/fs/usr/share 2.364 -mv usr/share/icons $PACKAGE-$VERSION/fs/usr/share 2.365 -mv usr/bin $PACKAGE-$VERSION/fs/usr 2.366 - 2.367 -# relocalized libexec directory 2.368 -bin=$(echo $PACKAGE-$VERSION/fs/usr/bin/libreoffice???) 2.369 -if [ -L $bin ]; then 2.370 - target=$(readlink $bin) 2.371 - rm -f $bin 2.372 - ln -s ${target/opt/usr\/lib\/libreoffice} $bin 2.373 -else 2.374 - sed -i 's#/opt/#/usr/lib/libreoffice/#' $bin 2.375 -fi 2.376 - 2.377 -# Create receipt 2.378 +# Create recipe for SliTaz package 2.379 cat > $PACKAGE-$VERSION/receipt <<EOT 2.380 # SliTaz package receipt. 2.381 2.382 PACKAGE="$PACKAGE" 2.383 VERSION="$VERSION" 2.384 -CATEGORY="office" 2.385 -SHORT_DESC="Productivity suite." 2.386 -DEPENDS="java6-jre cups" 2.387 -WEB_SITE="$URL" 2.388 +CATEGORY="$CATEGORY" 2.389 +TAGS="writer spreadsheet database" 2.390 +SHORT_DESC="$SHORT_DESC" 2.391 +LICENSE="$LICENCE" 2.392 +WEB_SITE="$WEB_SITE" 2.393 +DEPENDS="$DEPENDS" 2.394 2.395 post_install() 2.396 { 2.397 - ln -sf /usr/lib/libreoffice?* /usr/lib/libreoffice 2.398 - path_libreoffice=\$(find /usr/lib/libreoffice -name libreoffice*.*) 2.399 + ln -sf /usr/lib/libreoffice?* \ 2.400 + /usr/lib/libreoffice 2.401 + path_libreoffice=\$(find /usr/lib/libreoffice -name libreoffice*.*) 2.402 2.403 - # Remove links if exist 2.404 - rm -f /usr/share/applications/libreoffice-* 2.405 + # Remove links, if existing 2.406 + rm -f /usr/share/applications/libreoffice-* 2.407 2.408 - # Create links 2.409 - cd /usr/share/applications 2.410 - ln -sf \$path_libreoffice/share/xdg/base.desktop libreoffice-base.desktop 2.411 - ln -sf \$path_libreoffice/share/xdg/impress.desktop libreoffice-impress.desktop 2.412 - ln -sf \$path_libreoffice/share/xdg/writer.desktop libreoffice-writer.desktop 2.413 - ln -sf \$path_libreoffice/share/xdg/calc.desktop libreoffice-calc.desktop 2.414 - ln -sf \$path_libreoffice/share/xdg/math.desktop libreoffice-math.desktop 2.415 - ln -sf \$path_libreoffice/share/xdg/draw.desktop libreoffice-draw.desktop 2.416 + # Create links 2.417 + cd /usr/share/applications 2.418 + ln -sf \$path_libreoffice/share/xdg/base.desktop \ 2.419 + libreoffice-base.desktop 2.420 + ln -sf \$path_libreoffice/share/xdg/impress.desktop \ 2.421 + libreoffice-impress.desktop 2.422 + ln -sf \$path_libreoffice/share/xdg/writer.desktop \ 2.423 + libreoffice-writer.desktop 2.424 + ln -sf \$path_libreoffice/share/xdg/calc.desktop \ 2.425 + libreoffice-calc.desktop 2.426 + ln -sf \$path_libreoffice/share/xdg/math.desktop \ 2.427 + libreoffice-math.desktop 2.428 + ln -sf \$path_libreoffice/share/xdg/draw.desktop \ 2.429 + libreoffice-draw.desktop 2.430 2.431 - chmod +x \$path_libreoffice/share/xdg/*.desktop 2.432 + chmod +x \$path_libreoffice/share/xdg/*.desktop 2.433 2.434 # If necessary, recreate links for soffice 2.435 - rm -f /usr/bin/soffice /usr/bin/libreoffice 2.436 - ln -sf \$path_libreoffice/program/soffice /usr/bin/libreoffice 2.437 - ln -sf \$path_libreoffice/program/soffice /usr/bin/soffice 2.438 + rm -f /usr/bin/soffice 2.439 + rm -f /usr/bin/libreoffice 2.440 + ln -sf \$path_libreoffice/program/soffice /usr/bin/libreoffice 2.441 + ln -sf \$path_libreoffice/program/soffice /usr/bin/soffice 2.442 } 2.443 2.444 post_remove() 2.445 { 2.446 rm -f /usr/share/applications/libreoffice-* 2.447 } 2.448 +EOT 2.449 2.450 -EOT 2.451 status 2.452 2.453 -# Pack 2.454 +# Create the package 2.455 tazpkg pack $PACKAGE-$VERSION 2.456 2.457 -# Clean to save RAM memory 2.458 +# Remove package tree 2.459 rm -rf $PACKAGE-$VERSION 2.460 2.461 -# Install pseudo package 2.462 -tazpkg install $PACKAGE-$VERSION.tazpkg --root=$ROOT 2.463 -case " $@ " in 2.464 -*\ --k*) mv $PACKAGE-$VERSION.tazpkg $CUR_DIR ;; 2.465 -esac 2.466 +# === Install the SliTaz package === 2.467 +[ "$install" == "yes" ] && 2.468 +tazpkg install $PACKAGE-$VERSION.tazpkg --root="$root" 2.469 2.470 -# Clean 2.471 +# === Cleanup === 2.472 +# Preserve package file, if requested 2.473 +[ "$keep" == "yes" ] && mv $PACKAGE-$VERSION.tazpkg $CUR_DIR 2.474 + 2.475 +# Remove temporary build directory 2.476 cd $CUR_DIR 2.477 rm -rf $TEMP_DIR