SliTaz Packages

Community Doc Forum Pro Shop Bugs Hg
.

Receipt for package "abiword"

# SliTaz package receipt.

PACKAGE="abiword"
VERSION="3.0.5"
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="https://gitlab.gnome.org/World/AbiWord/"
WGET_URL="https://fossies.org/linux/misc/$TARBALL"
TAGS="word doc office"
LOCALES="cs da de es fr hu id it pt ru sl sv zh"

DEPENDS="librsvg wv fribidi libxslt"
BUILD_DEPENDS="gtk+-dev enchant-dev libxslt-dev fribidi-dev wv-dev \
libgsf-dev librsvg-dev libboost-dev libwmf-dev"
SUGGESTED="abiword-plugins"

HOST_ARCH="i486 x86_64"

# 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

    # Fix build with recent gcc
    export CXXFLAGS="$CXXFLAGS -fpermissive"

    ./configure \
        --prefix=/usr \
        --with-gtk2 \
        --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-3.0/plugins

    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

    cp -a $install/usr/share/icons $fs/usr/share
    # Non standard pixmap
    cp $install/usr/share/icons/hicolor/48x48/apps/abiword.png \
        $fs/usr/share/pixmaps/abiword.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-*/
}
6063 packages and 233209 files in current database (Sat Dec 21 00:00:03 2024)