#!/bin/sh # Copyright (c) 2006 Eric Hameleers # Distributed under the terms of the GNU General Public License, Version 2 # $Id$ # ----------------------------------------------------------------------------- # # Slackware SlackBuild script # =========================== # By: Eric Hameleers # For: psi-lang # URL: http://psi-im.org/ # Needs: psi # 0.10-1: 13/jan/2006 by Eric Hameleers # * The final 0.10 release is here (including laguage packs). # # Run 'sh SlackBuild --cleanup' to build a Slackware package. # The package (.tgz) plus descriptive .txt file are created in /tmp . # Install using 'installpkg'. # # ----------------------------------------------------------------------------- # --- INIT --- # Set initial variables: CWD=`pwd` if [ "$TMP" = "" ]; then TMP=/tmp fi PRGNAM=psi-lang VERSION=0.10 ARCH=noarch BUILD=1 PKG=$TMP/package-$PRGNAM if [ ! -d $TMP/tmp-$PRGNAM ]; then mkdir -p $TMP/tmp-$PRGNAM # location to build the source fi if [ ! -d $PKG ]; then mkdir -p $PKG # place for the package to be built fi LANG="es eo fr hu nl pl pt_BR sl vi bg mk" for NN in $LANG; do if ! [ -f psi_${NN}.qm ]; then echo "Getting language pack '$NN' for $PRGNAM - version ${VERSION}" URL="http://psi-im.org/files/translation/${VERSION}/psi_${NN}.qm" wget -nv "$URL" fi done # --- PACKAGE BUILDING --- echo "++" echo "|| $PRGNAM-$VERSION" echo "++" # Separate package "psi-lang" for the language translation files rm -rf $PKG/* # Add some translations mkdir -p ${PKG}/usr/share/psi cp $CWD/psi_*.qm ${PKG}/usr/share/psi/ # --- OWNERSHIP, RIGHTS --- chown -R root:root $PKG chmod -R o-w $PKG # --- PACKAGE DESCRIPTION --- mkdir -p ${PKG}/install cat <<-ENDDESC > ${PKG}/install/slack-desc # 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------------------------------------------------------| psi-lang: psi-lang (Language pack for Psi) psi-lang: psi-lang: Psi is a multi-platform Jabber client. psi-lang: This package adds several translations as a package to the Psi psi-lang: installation (release ${VERSION}) psi-lang: Available are: ${LANG} psi-lang: psi-lang: psi-lang: psi-lang: Homepage is http://psi-im.org/ psi-lang: ENDDESC # --- MAKE PACKAGE --- cd ${PKG} makepkg --linkadd y --chown n $TMP/${PRGNAM}-$VERSION-noarch-$BUILD.tgz \ 2>&1 | tee $CWD/makepkg-${PRGNAM}.log (cd $TMP && md5sum ${PRGNAM}-$VERSION-noarch-$BUILD.tgz > ${PRGNAM}-$VERSION-noarch-$BUILD.tgz.md5) cat install/slack-desc | grep "^${PRGNAM}" > $TMP/${PRGNAM}-$VERSION-noarch-$BUILD.txt # --- CLEANUP --- # Clean up the extra stuff: if [ "$1" = "--cleanup" ]; then rm -rf $TMP/tmp-$PRGNAM rm -rf $PKG fi