SliTaz Packages

Community Doc Forum Pro Shop Bugs Hg
.

Receipt for package "abiword"

# SliTaz package receipt.

PACKAGE="abiword"
VERSION="2.8.6"
CATEGORY="office"
SHORT_DESC="Light and speed word processing application."
MAINTAINER="pankso@slitaz.org"
LICENSE="GPL2"
SUGGESTED="abiword-plugins"
TARBALL="$PACKAGE-$VERSION.tar.gz"
WEB_SITE="http://www.abisource.com/"
WGET_URL="http://www.abisource.com/downloads/abiword/$VERSION/source/$TARBALL"
TAGS="word doc office"
LOCALES="cs da de es fr hu id it pt ru sl sv zh"

DEPENDS="gtk+ libgnomeprint libgnomeprintui libgnomecanvas fribidi libglade \
popt libxml2 libart_lgpl libgsf libgio enchant wv xorg-libXdamage gcc-lib-base \
librsvg goffice glibc-locale libffi"
BUILD_DEPENDS="$DEPENDS gtk+-dev libgnomeprint-dev libgnomeprintui-dev \
fribidi-dev libglade-dev popt-dev libxml2-dev libart_lgpl-dev libgsf-dev \
enchant-dev wv-dev libgnomecanvas-dev libcroco-dev libboost-dev librsvg-dev"
SUGGESTED="abiword-plugins"

# What is the latest version available today?
current_version()
{
    wget -O - http://www.abisource.com/downloads/abiword/ 2>/dev/null | \
    sed "/latest/d;/\[DIR/!d;s|.*href=.\\([0-9\.]*\\)/.*|http://www.abisource.com/downloads/abiword/\\1/source/|" | \
    sort -Vr | sed q | xargs wget -O - 2>/dev/null | \
    sed "/latest/d;/$PACKAGE-/!d;/tar/!d;s|.*$PACKAGE-\\(.*\\).tar.*\".*|\\1|" | sort -Vr | sed q
}

# Rules to configure and make the package.
compile_rules()
{
    sed -i 's|glib/gmacros.h|glib.h|' goffice-bits/goffice/app/goffice-app.h
    sed -i 's|glib/gerror.h|glib.h|' src/af/util/xp/ut_go_file.h
    sed -i 's|--no-undefined||' src/Makefile*
    sed -i 's|cat \$(BUILTIN_STAMP)|& 2> /dev/null|' src/plugins/Makefile*
    sed -i 's|TRUE|boolean(TRUE)|' src/af/util/xp/ut_jpeg.cpp
    ./configure \
        --prefix=/usr \
        --infodir=/usr/share/info \
        --mandir=/usr/share/man \
        --enable-plugins \
        --enable-clipart \
        --enable-templates \
        --disable-collab-backend-sugar \
        $CONFIGURE_ARGS &&
    make $MAKEFLAGS &&
    make DESTDIR=$DESTDIR install
    
    cd plugins
    make DESTDIR=$DESTDIR install
}

# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()
{
    mkdir -p $fs/usr/share/pixmaps $fs/usr/lib/abiword-2.8/plugins $fs/usr/share/icons

    cp -a $install/usr/bin $fs/usr
    cp -a $install/usr/lib/*.so $fs/usr/lib

    cp -a $install/usr/share/abiword-* $fs/usr/share

    # Non standard pixmap
    cp $install/usr/share/icons/abiword_48.png \
        $fs/usr/share/pixmaps/abiword.png

    # fix error when abiword is run in command line
    ln -sf /usr/share/pixmaps/abiword.png $fs/usr/share/icons/abiword_48.png

    # Non-standard locale use: get all official SliTaz locales
    rm $fs/usr/share/abiword-*/strings/*
    rm $fs/usr/share/abiword-*/templates/*
    rm $fs/usr/share/abiword-*/system.pro*

    for LOCALE in $LOCALES; do
        cp $install/usr/share/abiword-*/strings/$LOCALE*.strings \
             $fs/usr/share/abiword-*/strings/
        # id locale not complete in sources
        if [ "$LOCALE" != "id" ]; then
            cp $install/usr/share/abiword-*/templates/normal.awt-$LOCALE* \
                 $fs/usr/share/abiword-*/templates/
            cp $install/usr/share/abiword-*/system.profile-$LOCALE* \
                 $fs/usr/share/abiword-*/
        fi
    done

    cp $install/usr/share/abiword-*/templates/*.awt $fs/usr/share/abiword-*/templates/
    cp $install/usr/share/abiword-*/system.profile $fs/usr/share/abiword-*/
}
6025 packages and 203154 files in current database (Thu Apr 25 06:17:47 2024)