wok rev 1844

Add : get-xnviewmp
author Julien Rabier <taziden@slitaz.org>
date Sat Dec 13 00:14:33 2008 +0100 (2008-12-13)
parents 8ab0243e5a22
children 5c120309434e
files get-xnviewmp/receipt get-xnviewmp/stuff/get-xnviewmp
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/get-xnviewmp/receipt	Sat Dec 13 00:14:33 2008 +0100
     1.3 @@ -0,0 +1,16 @@
     1.4 +# SliTaz package receipt.
     1.5 +
     1.6 +PACKAGE="get-xnviewmp"
     1.7 +VERSION="1.00"
     1.8 +CATEGORY="non-free"
     1.9 +SHORT_DESC="Get XnViewMP. Image viewer"
    1.10 +MAINTAINER="taziden@slitaz.org"
    1.11 +WEB_SITE="http://www.xnview.com"
    1.12 +
    1.13 +# Rules to gen a SliTaz package suitable for Tazpkg.
    1.14 +genpkg_rules()
    1.15 +{
    1.16 +	mkdir -p $fs/usr/bin
    1.17 +	cp stuff/get-xnviewmp $fs/usr/bin
    1.18 +}
    1.19 +
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/get-xnviewmp/stuff/get-xnviewmp	Sat Dec 13 00:14:33 2008 +0100
     2.3 @@ -0,0 +1,62 @@
     2.4 +#!/bin/sh -e
     2.5 +
     2.6 +ROOT="$1"
     2.7 +
     2.8 +if test $(id -u) != 0 ; then
     2.9 +	echo -e "\nYou must be root to run `basename $0`."
    2.10 +	echo -e "Please type 'su' and root password to become super-user.\n"
    2.11 +	exit 0
    2.12 +fi
    2.13 +
    2.14 +if [ -d $ROOT/var/lib/tazpkg/installed/xnviewmp ]; then
    2.15 +  [ -n "$ROOT" ] && exit 1
    2.16 +  tazpkg remove xnviewmp
    2.17 +  [ -d /var/lib/tazpkg/installed/xnviewmp ] && exit 1
    2.18 +fi
    2.19 +[ -d $ROOT/usr/share/xnviewmp ] && rm -rf $ROOT/usr/share/xnviewmp
    2.20 +
    2.21 +# Download tarball
    2.22 +WEB_SITE="http://91.121.175.160/download/"
    2.23 +wget ${WEB_SITE}/XnViewMP-linux.tgz
    2.24 +
    2.25 +# Extract
    2.26 +TARBALL=$(ls XnView*.tgz 2> /dev/null || true)
    2.27 +tar xzf $TARBALL
    2.28 +cd XnViewMP
    2.29 +
    2.30 +# Install files
    2.31 +mkdir -p xnviewmp/fs/usr/bin
    2.32 +mkdir -p xnviewmp/fs/usr/lib/xnviewmp/
    2.33 +mkdir -p xnviewmp/fs/usr/share/xnviewmp/
    2.34 +cp -a lib* xnviewmp/fs/usr/lib/xnviewmp/
    2.35 +cp -a phonon_backend xnviewmp/fs/usr/lib/xnviewmp/
    2.36 +cp -a language xnviewmp/fs/usr/share/xnviewmp/
    2.37 +cp -a xnview xnviewmp/fs/usr/share/xnviewmp/
    2.38 +cat > xnviewmp/fs/usr/bin/xnview <<EOT
    2.39 +#!/bin/sh
    2.40 +LD_LIBRARY_PATH=/usr/lib/xnviewmp/
    2.41 +export LD_LIBRARY_PATH
    2.42 +/usr/share/xnviewmp/xnview
    2.43 +EOT
    2.44 +chmod +x xnviewmp/fs/usr/bin/xnview
    2.45 +
    2.46 +# Create pseudo package
    2.47 +cat > xnviewmp/receipt <<EOT
    2.48 +PACKAGE="xnviewmp"
    2.49 +VERSION="0.12"
    2.50 +CATEGORY="non-free"
    2.51 +SHORT_DESC="XnViewMP"
    2.52 +WEB_SITE="http://www.xnview.com"
    2.53 +DEPENDS=""
    2.54 +CONFIG_FILES=""
    2.55 +EOT
    2.56 +
    2.57 +# Pack
    2.58 +tazpkg pack xnviewmp
    2.59 +
    2.60 +# Install pseudo package
    2.61 +tazpkg install xnviewmp.tazpkg --root=$ROOT
    2.62 +cd ..
    2.63 +
    2.64 +# Clean
    2.65 +rm -rf $TARBALL