#!/bin/bash # # ccsm.SlackBuild # code: Vicious (michal@scxd.info); improvements: Zielony (e-pl@o2.pl) set -e # PACKAGE GENERAL INFO [EDIT] PKGNAME=ccsm VERSION=0.7.6 BUILD=1X ARCH=noarch URL=http://releases.compiz-fusion.org/$VERSION/ccsm-$VERSION.tar.bz2 CWD=`pwd` TMP=/tmp/$PKGNAME PKG=$TMP/package if [ ! -d $TMP/$PKGNAME-$VERSION ]; then rm -rf $PKG mkdir -p $PKG/install # PACKAGE DESCRIPTION [EDIT] cat << 'SLACKDESC' | fmt -w $(( 80 - `echo $PKGNAME | wc -c` - 3 )) | perl -pe "s/^/$PKGNAME: /" > $PKG/install/slack-desc CompizConfig Settings Manager (Compiz Fusion manager) CCSM is a configuration tool for Compiz Fusion. It is used to configure the many plugins included in Compiz and Compiz Fusion, as well as the use of various profiles and intergrating better with existing desktop settings. CCSM uses the CompizConfig compiz configuration system. Package prepared by Zielony (e-pl@o2.pl) SLACKDESC cd $TMP # step 1: DOWNLOAD SOURCE case "${URL//*\/}" in *.tar.bz2) EXTENSION="tar.bz2"; DECOMPRESS="tar jxvf" ;; *.tar.gz) EXTENSION="tar.gz"; DECOMPRESS="tar zxvf" ;; *.tgz) EXTENSION="tgz"; DECOMPRESS="tar zxvf" ;; *.zip) EXTENSION="zip"; DECOMPRESS="unzip" ;; esac PKGFNAME="$PKGNAME-$VERSION.$EXTENSION" ( wget -c $URL -P $TMP -O $PKGFNAME ) # step 2: UNPACK SOURCE AND PREPARE PACKAGE $DECOMPRESS $PKGFNAME DIRNAME=`ls -c | head -1 | cut -d / -f 1` if [ "$DIRNAME" != "$PKGNAME-$VERSION" ]; then mv $DIRNAME $PKGNAME-$VERSION; fi chown root:root $TMP -R fi cd $TMP/$PKGNAME-$VERSION cat << 'DESKTOP' > ccsm.desktop [Desktop Entry] Encoding=UTF-8 Name=CompizConfig Settings Manager Name[ar]=ضابط الإعدادات Name[bn]=কমপিজ কনফিগ ব্যবস্থাপক Name[bn_IN]=কমপিজ কনফিগ ব্যবস্থাপক Name[ca]=Editor de la configuració de Compiz Name[cs]=Manažer nastavení Compizu Name[de]=CompizConfig Einstellungs-Manager Name[el]=Διαχειριστής Ρυθμίσεων CompizConfig Name[en_GB]=CompizConfig Settings Manager Name[es]=Administrador de Opciones CompizConfig Name[fi]=CompizConfig-asetusten hallinta Name[fr]=Gestionnaire de Configuration CompizConfig Name[gl]=Administrador de Opcións CompizConfig Name[gu]=CompizConfig સુયોજનો વ્યવસ્થાપક Name[hi]=CompizConfig जमावट प्रबंधक Name[id]=CompizConfig Settings Manager Name[it]=Gestore configurazione CompizConfig Name[ja]=CompizConfig 設定マネージャ Name[ko]=컴피즈 설정 관리자 Name[md]=CompizConfig compiz -la tillĩdirão leti Name[nb]=CompizConfig Innstillingshåndterer Name[nl]=CompizConfig Instellingen Beheerder Name[or]=କମ୍ପିଜକନଫିଗ ସେଟିଙ୍ଗ ପ୍ରବନ୍ଧକ Name[pa]=CompizConfig ਸੈਟਿੰਗ ਮੈਨੇਜਰ Name[pl]=Menedżer ustawień CompizConfig Name[pt]=Sistema de Configuração do Compiz Name[pt_BR]=Gerenciador de configurações do CompizConfig Name[ru]=Менеджер настройки CompizConfig Name[sk]=Správca nastavení CompizConfig Name[sv]=CompizConfig inställningshanterare Name[tr]=CompizConfig Ayar Yöneticisi Name[wo]=Tannay u CompizConfig Name[zh_CN]=CompizConfig 设置管理器 Comment=Configure Compiz with CompizConfig Comment[it]=Configura Compiz attraverso CompizConfig Comment[ja]=CompizConfig で Compiz を設定します Icon=ccsm Exec=ccsm Terminal=false Type=Application Categories=Compiz;Settings;DesktopSettings; DESKTOP sed -i -e 's/^cmd =.*//' -e 's/^proc.*//g' setup.py make all make install PREFIX=$PKG/usr sed -i "s@$PKG@@g" $TMP/package/usr/lib/python2.5/site-packages/ccm/* # step 3: STRIP BINARIES & GZIP MANUALS cd $PKG ( find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : \ | xargs strip --strip-unneeded 2> /dev/null find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : \ | xargs strip --strip-unneeded 2> /dev/null find . | xargs file | grep "current ar archive" | grep ELF | cut -f 1 -d : \ | xargs strip --strip-debug 2> /dev/null ) find $PKG/usr -regex '.+/man/\(.+?/\)?man./.+' -exec gzip -9 \{} \; # step 4: CREATE PACKAGE & CLEAN TMP if [ `find . | wc -l` -le 1 ]; then echo "Brak plikw pakietu!" else ( requiredbuilder -y -s $PKG/install $PKG ) makepkg -l y -c n $CWD/$PKGNAME-$VERSION-$ARCH-$BUILD.tgz if [ "$1" != "-nc" ]; then rm -rf $TMP; fi fi