SliTaz Packages

Community Doc Forum Pro Shop Bugs Hg
.

Receipt for package "mplayer"

# SliTaz package receipt.

PACKAGE="mplayer"
VERSION="1.4"
CATEGORY="multimedia"
SHORT_DESC="The Ultimate Movie Player For Linux."
MAINTAINER="pankso@slitaz.org"
LICENSE="GPL2"
WEB_SITE="http://www.mplayerhq.hu/design7/news.html"

SOURCE="MPlayer"
TARBALL="$SOURCE-$VERSION.tar.xz"
WGET_URL="http://www1.mplayerhq.hu/MPlayer/releases/$TARBALL"

HOST_ARCH="i486 arm"

# Dont forget to update all related pkgs
RELATED="mplayer-codecs mencoder" 
DEPENDS="alsa-lib audiofile enca esound ncurses cdparanoia-III ffmpeg gcc83-lib-base
    giflib gtk+ lame libdvdnav libdvdread libmad libmng libogg libtheora libvorbis
    lirc x264 xorg-libXdamage xorg-libXss xorg-libXv xorg-libXxf86vm xvidcore zlib"
BUILD_DEPENDS="alsa-lib-dev audiofile-dev esound-dev ffmpeg-dev gcc83 giflib-dev
    gtk+-dev lame-dev libdvdnav-dev libdvdread-dev libmad-dev libogg-dev
    libtheora-dev libvorbis-dev ncurses-dev pkg-config xorg-libXdamage-dev
    xorg-libXv-dev xorg-libXxf86vm-dev xorg-xextproto xvidcore-dev yasm zlib-dev"

# Handle arch package install. Less deps and no GTK gui for ARM
case "$SLITAZ_ARCH" in
    arm*) 
        DEPENDS="alsa-lib zlib libmad xorg-libXv xorg-libXxf86vm libogg \
        libvorbis libtheora libsdl xvidcore lame esound gtk+" ;;
esac

# Handle cross compilation. Host coreutils-file-* are used
case "$ARCH" in
    i?86) 
        ARCH_ARGS="--target=i386-linux --disable-sdl --enable-runtime-cpudetection" 
        BUILD_DEPENDS="$BUILD_DEPENDS cdparanoia-III-dev x264-dev enca-dev \
        libmng-dev lirc-dev" ;;
    arm*) 
        export PATH=/cross/arm/tools/arm-slitaz-linux-gnueabi/bin:$PATH
        BUILD_DEPENDS="$BUILD_DEPENDS libsdl-dev" 
        ARCH_ARGS="--target=arm-linux --enable-cross-compile --enable-sdl" ;;
esac

# What is the latest version available today?
current_version()
{
    wget -O - ${WGET_URL%/*}/ 2>/dev/null | \
    sed "/latest/d;/$SOURCE-[0-9]/!d;/tar/!d;s|.*$SOURCE-\\(.*\\).tar.*|\\1|" | sort -Vr | sed q
}

# Rules to configure and make the package.
compile_rules()
{
    export    CC=gcc-83
    export    CXX=g++-83
    ./configure                \
        --prefix=/usr            \
        --confdir=/etc/mplayer        \
        --libdir=/usr/lib/mplayer    \
        --enable-gui            \
        --language="en de es fr it ru"    \
        --disable-ffmpeg_a        \
        --disable-gl            \
        --disable-jack            \
        --disable-liblzo        \
        --disable-libdv            \
        --disable-fribidi        \
        --disable-ivtv            \
        --disable-smb            \
        --disable-ftp            \
        --disable-openal        \
        --disable-faac            \
        --disable-speex            \
        ${ARCH_ARGS} &&
    make $MAKEFLAGS &&
    make install DESTDIR=$DESTDIR | sed '/install: strip: .*/'d
}

# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()
{
    mkdir -p $fs/usr/share/mplayer/skins
    cp -a $install/usr/bin            $fs/usr
    # Mencoder goes in a splitted package.
    rm                    $fs/usr/bin/mencoder
    [ -d "$install/usr/share/mplayer" ] &&
    cp -a $install/usr/share/mplayer    $fs/usr/share
    cp -a $install/etc            $fs
    cp $src/etc/example.conf        $fs/etc/mplayer
    # Configuration to use Xv by default.
    cp $stuff/mplayer.conf            $fs/etc/mplayer
    # default skin
    tar xjf $stuff/productive-1.0.tar.bz2 -C $fs/usr/share/mplayer/skins
    cd $fs/usr/share/mplayer/skins && ln -s productive default
    # Font
    cd .. && ln -s ../fonts/truetype/ttf-dejavu/DejaVuSans.ttf subfont.ttf
    # Xv support dont work for ARM and gmplayer symlink not created
    case "$ARCH" in
        arm*)
            cp -f $stuff/mplayer-arm.conf $fs/etc/mplayer/mplayer.conf 
            cd $fs/usr/bin && ln -s mplayer gmplayer ;;
    esac
}
5934 packages and 845775 files in cooking database (Sun Apr 28 00:45:13 2024)