wok-6.x view get-xnviewmp/stuff/get-xnviewmp @ rev 5122
Fix cryptopp maintainer email
author | Eric Joseph-Alexandre <erjo@slitaz.org> |
---|---|
date | Sun Mar 21 09:28:08 2010 +0100 (2010-03-21) |
parents | 32959e7975fc |
children | 0cfa77ea0a47 |
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://download.xnview.com"
20 wget ${WEB_SITE}/XnViewMP-linux.tgz
21 if [ ! -f $TARBALL ]; then
22 rm -rf XnViewMP
23 echo "Could not download $TARBALL. Exiting."
24 exit 1
25 fi
27 # Extract
28 TARBALL=$(ls XnView*.tgz 2> /dev/null || true)
29 tar xzf $TARBALL
30 cd XnViewMP
32 # Install files
33 mkdir -p xnviewmp/fs/usr/bin
34 mkdir -p xnviewmp/fs/usr/lib/xnviewmp/
35 mkdir -p xnviewmp/fs/usr/share/xnviewmp/
37 # use mv instead of 'cp -a' to save RAM
38 mv lib* xnviewmp/fs/usr/lib/xnviewmp/
39 mv phonon_backend xnviewmp/fs/usr/lib/xnviewmp/
40 mv language xnviewmp/fs/usr/share/xnviewmp/
41 mv xnview xnviewmp/fs/usr/share/xnviewmp/
43 cat > xnviewmp/fs/usr/bin/xnview <<EOT
44 #!/bin/sh
45 LD_LIBRARY_PATH=/usr/lib/xnviewmp/
46 export LD_LIBRARY_PATH
47 /usr/share/xnviewmp/xnview
48 EOT
49 chmod +x xnviewmp/fs/usr/bin/xnview
51 # Create pseudo package
52 cat > xnviewmp/receipt <<EOT
53 PACKAGE="xnviewmp"
54 VERSION="0.12"
55 CATEGORY="non-free"
56 SHORT_DESC="XnViewMP"
57 WEB_SITE="http://www.xnview.com"
58 DEPENDS=""
59 CONFIG_FILES=""
60 EOT
62 # Pack
63 tazpkg pack xnviewmp
65 # Install pseudo package
66 tazpkg install xnviewmp.tazpkg --root=$ROOT
67 cd ..
69 # Clean
70 rm -rf XnViewMP $TARBALL