#!/bin/bash # Packager : Jean-Philippe Guillemin soft='gnome-gmail' softversion='80eddb9' packageversion='1jp' arch=${arch:-x86_64} case "$arch" in i486) SLKCFLAGS="-O2 -march=i486 -mtune=i686" SLKLDFLAGS="" LIBDIRSUFFIX="" ;; x86_64) SLKCFLAGS="-O2 -fPIC" SLKLDFLAGS="-L/usr/lib64" LIBDIRSUFFIX="64" ;; esac export CFLAGS="$SLKCFLAGS" export CXXFLAGS="$SLKCFLAGS" export LDFLAGS="$SLKLDFLAGS" buildir=$(pwd) srcpkg="$buildir/$soft-$softversion.tar.gz" src="$buildir/$soft-$softversion" package="$soft-$softversion-$arch-$packageversion" PKG="/tmp/$package" cd $buildir rm -rf $src tar -xvf $srcpkg rm -f $PKG.tgz rm -rf $PKG mkdir -p $PKG chown -R root:root . ( cd $src python setup.py build --root=$PKG python setup.py install --root=$PKG mkdir -p $PKG/usr/doc/$soft-$softversion cp -a INSTALL NEWS COPYING AUTHORS README INSTALL layout_doc.html $PKG/usr/doc/$soft-$softversion rm -rf $PKG/usr/share/doc ) # Striptease ( 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 for mandir in $(find . -name man -type d) ; do if [ -d $mandir ]; then ( cd $mandir find . -type f -name "*.?" -exec gzip -9 {} \; ) fi done ) # Install dir mkdir -p $PKG/install chmod -R 755 $PKG/install cat << "EODESC" > $PKG/install/slack-desc gnome-gmail: gnome-gmail - Gmail desktop integration gnome-gmail: gnome-gmail: Gnome-gmail Integrate Gmail into the Linux desktop gnome-gmail: It allows Gmail to be selected as the default mail application gnome-gmail: for the desktop. Unlike other solutions on the net, Gnome Gmail gnome-gmail: supports "To:", "Subject:", "body", "CC:", and "BCC: fields, gnome-gmail: and is available in deb and rpm format. gnome-gmail: gnome-gmail: gnome-gmail: gnome-gmail: EODESC cat << DOINST > $PKG/install/doinst.sh if [ -x /usr/bin/update-desktop-database ]; then usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1 fi if [ -x /usr/bin/gtk-update-icon-cache ]; then usr/bin/gtk-update-icon-cache usr/share/icons/hicolor >/dev/null 2>&1 fi if [ -x /usr/bin/glib-compile-schemas ]; then usr/bin/glib-compile-schemas usr/share/glib-2.0/schemas >/dev/null 2>&1 fi DOINST # Desktop file mkdir -p $PKG/usr/share/xfce4/helpers cat << "EOF" > $PKG/usr/share/xfce4/helpers/gnome-gmail.desktop [Desktop Entry] Version=1.0 Icon=gmail Type=X-XFCE-Helper Name=Gmail StartupNotify=false X-XFCE-Binaries=gnome-gmail; X-XFCE-Category=MailReader X-XFCE-Commands=/usr/bin/gnome-gmail; X-XFCE-CommandsWithParameter=/usr/bin/gnome-gmail "%s" EOF mkdir -p $PKG/usr/src/$soft-$softversion ( cd $buildir cp -a build-$soft.sh $PKG/usr/src/$soft-$softversion/ ) cd $PKG makepkg -l y -c y $PKG.txz # cleanup rm -rf $PKG rm -rf $src