Thunar SlackBuild

I really like the Thunar file manager, so I decided to make a SlackBuild file for it and its libexo dependancy. The script lets you build against XFCE 4.2.3.2 that comes with Slackware not the 4.4 developement version. These are my first couple of SlackBuild files, so any pointers you could give would be great.

The scripts are posted as comments. (I couldn’t figure out how to add them to the post without taking up too much space on the main page)

Advertisements
This entry was posted in Enhance Slackware, Packages, SlackBuilds, Slackware. Bookmark the permalink.

4 Responses to Thunar SlackBuild

  1. dosnlinux says:

    SlackBuild for libexo
    ————————————————


    CWD=`pwd`
    TMP=/tmp/exo
    LOGFILE=build.log


    NAME=exo
    VERSION=0.3.1.10rc1
    ARCH=i686
    BUILD=1


    PKG=$NAME-$VERSION
    PKGTMP=$TMP/pkg
    SRC=$TMP/$PKG


    # UTILLITY FUNCTIONS #
    log()
    {
    echo $* >> $LOGFILE
    }


    log2()
    {
    log -e "\t" $*
    }


    # SETUP BUILD ENVIORMENT #
    clear


    echo starting log file: $LOGFILE
    echo `date` > $LOGFILE


    if [ -d $TMP ]
    then
    echo $TMP exists
    log $TMP exists
    echo deleting $TMP
    log deleting $TMP

    rm -vrf $TMP
    fi


    echo creating build directories
    log creating build directories
    mkdir -vp $PKGTMP


    # EXTRACT THE SOURCE #
    echo extracting the source tarball
    log extracting the source tarball


    tar jxf $PKG.tar.bz2 -C $TMP


    # BUILD IT #
    echo building from source
    log building from source


    PREFIX=/usr
    SYSCONFDIR=/etc


    if [ "$ARCH" = "i386" ]; then
    SLKCFLAGS="-O2 -march=i386 -mtune=i686"
    elif [ "$ARCH" = "i486" ]; then
    SLKCFLAGS="-O2 -march=i486 -mtune=i686"
    elif [ "$ARCH" = "i386" ]; then
    SLKCFLAGS="-O2 -march=i586 -mtune=i686"
    elif [ "$ARCH" = "i486" ]; then
    SLKCFLAGS="-O2 -march=i686 -mtune=i686"
    fi

    CFLAGS=”$SLKFLAGS”
    CXXFLAGS=”$SLKFLAGS”
    DEFAULTOPTIONS=”–prefix=$PREFIX –sysconfdir=$SYSCONFDIR”


    cd $SRC


    ./configure $DEFAULTOPTIONS \
    --enable-xsltproc
    make -j3 || exit 1
    make install DESTDIR=$PKGTMP


    # MAKE DOCS DIRECTORY #
    DOCDIR=$PKGTMP/$PREFIX/doc/$PKG


    cd $SRC


    echo making the docs directory
    log making the docs directory
    log `mkdir -pv $DOCDIR`


    echo copying doc files
    log copying doc files
    log2 `cp -v AUTHORS COPYING ChangeLog Hacking Makefile NEWS README THANKS TODO $DOCDIR`


    # MAKE THE PACKAGE!!! #
    cd $CWD
    echo making the package
    log making the package


    log `mkdir -pv $PKGTMP/install`
    log `cp -v slack-desc.$NAME $PKGTMP/install/slack-desc`


    cd $PKGTMP
    chown -R root:root *
    /sbin/makepkg -l y -c n /tmp/$PKG-$ARCH-$BUILD.tgz

  2. dosnlinux says:

    SlackBuild for Thunar
    —————————————————


    CWD=`pwd`
    TMP=/tmp/thunar
    LOGFILE=build.log


    NAME=thunar
    VERSION=0.4.0rc1
    ARCH=i686
    BUILD=1


    PKG=$NAME-$VERSION
    PKGTMP=$TMP/pkg
    src=$TMP/Thunar*/


    # UTILLITY FUNCTIONS #
    log()
    {
    echo $* >> $LOGFILE
    }


    log2()
    {
    log -e "\t" $*
    }


    # SETUP BUILD ENVIORMENT #
    clear


    echo starting log file: $LOGFILE
    echo `date` > $LOGFILE


    if [ -d $TMP ]
    then
    echo $TMP exists
    log $TMP exists
    echo deleting $TMP
    log deleting $TMP


    rm -vrf $TMP
    fi


    echo creating build directories
    log creating build directories
    mkdir -vp $PKGTMP


    # EXTRACT THE SOURCE #
    echo extracting the source tarball
    log extracting the source tarball


    tar jxf Thunar*.tar.bz2 -C $TMP


    # BUILD IT #
    echo building from source
    log building from source


    PREFIX=/usr
    SYSCONFDIR=/etc


    if [ "$ARCH" = "i386" ]; then
    SLKCFLAGS="-O2 -march=i386 -mtune=i686"
    elif [ "$ARCH" = "i486" ]; then
    SLKCFLAGS="-O2 -march=i486 -mtune=i686"
    elif [ "$ARCH" = "i386" ]; then
    SLKCFLAGS="-O2 -march=i586 -mtune=i686"
    elif [ "$ARCH" = "i486" ]; then
    SLKCFLAGS="-O2 -march=i686 -mtune=i686"
    fi


    CFLAGS="$SLKFLAGS"
    CXXFLAGS="$SLKFLAGS"
    DEFAULTOPTIONS="--prefix=$PREFIX --sysconfdir=$SYSCONFDIR"


    cd $SRC


    ./configure $DEFAULTOPTIONS \
    --enable-xsltproc
    make -j3 || exit 1
    make install DESTDIR=$PKGTMP


    # MAKE DOCS DIRECTORY #
    DOCDIR=$PKGTMP/$PREFIX/doc/$PKG


    cd $SRC


    echo making the docs directory
    log making the docs directory
    log `mkdir -pv $DOCDIR`


    echo copying doc files
    log copying doc files
    log2 `cp -v AUTHORS COPYING COPYING.LIB FAQ ChangeLog Hacking Makefile INSTALL NEWS README THANKS TODO $DOCDIR`


    # MAKE THE PACKAGE!!! #
    cd $CWD
    echo making the package
    log making the package


    log `mkdir -pv $PKGTMP/install`
    log `cp -v slack-desc.$NAME $PKGTMP/install/slack-desc`


    cd $PKGTMP
    chown -R root:root *
    /sbin/makepkg -l y -c n /tmp/$PKG-$ARCH-$BUILD.tgz

  3. steshache says:

    Автор далеко пойдет

  4. moz says:

    hi doslinux.
    tried to follow your code albeit the newbie i am.noticed a ‘-‘ missing b4 j below.

    tar jxf Thunar*.tar.bz2 -C $TMP

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s