wok view get-xnviewmp/stuff/get-xnviewmp @ rev 3345
id3lib: Fix build for gcc 4.4.x and remove libicon dep (use glibc iconv)
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Thu Jun 11 16:34:20 2009 +0200 (2009-06-11) |
parents | 54595a083a24 |
children | 126bfa34502c |
line source
1 #!/bin/sh -e
3 ROOT="$1"
5 if test $(id -u) != 0 ; then
6 echo -e "\nYou must be root to run `basename $0`."
7 echo -e "Please type 'su' and root password to become super-user.\n"
8 exit 0
9 fi
11 if [ -d $ROOT/var/lib/tazpkg/installed/xnviewmp ]; then
12 [ -n "$ROOT" ] && exit 1
13 tazpkg remove xnviewmp
14 [ -d /var/lib/tazpkg/installed/xnviewmp ] && exit 1
15 fi
16 [ -d $ROOT/usr/share/xnviewmp ] && rm -rf $ROOT/usr/share/xnviewmp
18 # Download tarball
19 WEB_SITE="http://91.121.175.160/download/"
20 wget ${WEB_SITE}/XnViewMP-linux.tgz
22 # Extract
23 TARBALL=$(ls XnView*.tgz 2> /dev/null || true)
24 tar xzf $TARBALL
25 cd XnViewMP
27 # Install files
28 mkdir -p xnviewmp/fs/usr/bin
29 mkdir -p xnviewmp/fs/usr/lib/xnviewmp/
30 mkdir -p xnviewmp/fs/usr/share/xnviewmp/
31 cp -a lib* xnviewmp/fs/usr/lib/xnviewmp/
32 cp -a phonon_backend xnviewmp/fs/usr/lib/xnviewmp/
33 cp -a language xnviewmp/fs/usr/share/xnviewmp/
34 cp -a xnview xnviewmp/fs/usr/share/xnviewmp/
35 cat > xnviewmp/fs/usr/bin/xnview <<EOT
36 #!/bin/sh
37 LD_LIBRARY_PATH=/usr/lib/xnviewmp/
38 export LD_LIBRARY_PATH
39 /usr/share/xnviewmp/xnview
40 EOT
41 chmod +x xnviewmp/fs/usr/bin/xnview
43 # Create pseudo package
44 cat > xnviewmp/receipt <<EOT
45 PACKAGE="xnviewmp"
46 VERSION="0.12"
47 CATEGORY="non-free"
48 SHORT_DESC="XnViewMP"
49 WEB_SITE="http://www.xnview.com"
50 DEPENDS=""
51 CONFIG_FILES=""
52 EOT
54 # Pack
55 tazpkg pack xnviewmp
57 # Install pseudo package
58 tazpkg install xnviewmp.tazpkg --root=$ROOT
59 cd ..
61 # Clean
62 rm -rf XnViewMP $TARBALL