wok-6.x rev 13703
Add get-scilab
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Mon Dec 17 11:16:12 2012 +0100 (2012-12-17) |
parents | 023a32bce7dd |
children | 0af812d8e116 |
files | get-geogebra/stuff/get-geogebra get-scilab/receipt get-scilab/stuff/get-scilab get-xcas/stuff/get-xcas |
line diff
1.1 --- a/get-geogebra/stuff/get-geogebra Mon Dec 17 10:35:12 2012 +0100 1.2 +++ b/get-geogebra/stuff/get-geogebra Mon Dec 17 11:16:12 2012 +0100 1.3 @@ -27,12 +27,7 @@ 1.4 CUR_DIR=$(pwd) 1.5 mkdir -p $TMP_DIR && cd $TMP_DIR 1.6 1.7 -get_releases() 1.8 -{ 1.9 - wget -qO- "$URL?C=M;O=D" | sed 's|.*[Ff]="\([^"/]*\).*|\1|;/[^0-9b]/d' 1.10 -} 1.11 - 1.12 -# Download deb 1.13 +# Download tarball 1.14 FILE=$PACKAGE.tgz 1.15 wget -O $FILE "$URL" 1.16 1.17 @@ -66,6 +61,7 @@ 1.18 Exec=$PACKAGE 1.19 Terminal=false 1.20 Categories=Application 1.21 +Icon=/usr/share/geogebra/geogebra.png 1.22 Comment=$SHORT_DESC 1.23 Type=Application 1.24 Categories=Office;
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/get-scilab/receipt Mon Dec 17 11:16:12 2012 +0100 2.3 @@ -0,0 +1,16 @@ 2.4 +# SliTaz package receipt. 2.5 + 2.6 +PACKAGE="get-scilab" 2.7 +VERSION="1.00" 2.8 +CATEGORY="misc" 2.9 +SHORT_DESC="Get scilab: Free Open Source Software for Numerical Computation." 2.10 +MAINTAINER="pascal.bellard@slitaz.org" 2.11 +WEB_SITE="http://www.scilab.org/" 2.12 + 2.13 +# Rules to gen a SliTaz package suitable for Tazpkg. 2.14 +genpkg_rules() 2.15 +{ 2.16 + mkdir -p $fs/usr/bin 2.17 + cp stuff/get-scilab $fs/usr/bin 2.18 +} 2.19 +
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 3.2 +++ b/get-scilab/stuff/get-scilab Mon Dec 17 11:16:12 2012 +0100 3.3 @@ -0,0 +1,97 @@ 3.4 +#!/bin/sh -e 3.5 + 3.6 +PACKAGE="scilab" 3.7 +WEB_SITE="http://www.scilab.org/" 3.8 +CATEGORY="misc" 3.9 +SHORT_DESC="Free Open Source Software for Numerical Computation." 3.10 +MAINTAINER="somebody@scilab.org" 3.11 +DEPENDS="xorg-libXss" 3.12 +URL="http://www.scilab.org/fr/products/scilab/download" 3.13 + 3.14 +ROOT="$1" 3.15 +[ -d "$ROOT" ] || ROOT="" 3.16 + 3.17 +if test $(id -u) != 0 ; then 3.18 + echo -e "\nYou must be root to run `basename $0`." 3.19 + echo -e "Please type 'su' and root password to become super-user.\n" 3.20 + exit 0 3.21 +fi 3.22 + 3.23 +if [ -d $ROOT/var/lib/tazpkg/installed/$PACKAGE ]; then 3.24 + [ -n "$ROOT" ] && exit 1 3.25 + tazpkg remove $PACKAGE 3.26 + [ -d /var/lib/tazpkg/installed/$PACKAGE ] && exit 1 3.27 +fi 3.28 + 3.29 +TMP_DIR=/tmp/get-$PACKAGE-$$-$RANDOM 3.30 +CUR_DIR=$(pwd) 3.31 +mkdir -p $TMP_DIR && cd $TMP_DIR 3.32 + 3.33 +# Download tarball 3.34 +URL="$(wget -O - $URL | sed '/linux-i686/!d;/href/!d;s/.*href=.\([^"]*\).*/\1/')" 3.35 +FILE="$(basename $URL)" 3.36 +wget -O $FILE "$URL" 3.37 + 3.38 +if [ ! -f $FILE ]; then 3.39 + cd $CUR_DIR 3.40 + rm -rf $TMP_DIR 3.41 + echo "Could not download $FILE from $URL. Exiting." 3.42 + exit 1 3.43 +fi 3.44 + 3.45 +mkdir -p $PACKAGE/fs/usr/share 3.46 +tar xzf $FILE -C $PACKAGE/fs/usr/share 3.47 +# extracted pkg can be removed: Save RAM 3.48 +rm -f $FILE 3.49 + 3.50 +VERSION="$(ls $PACKAGE/fs/usr/share | sed 's/.*-//;s|/||')" 3.51 +mv $PACKAGE/fs/usr/share/* $PACKAGE/fs/usr/share/$PACKAGE 3.52 +mkdir -p $PACKAGE/fs/usr/bin 3.53 +ln -s /usr/share/$PACKAGE/bin/$PACKAGE $PACKAGE/fs/usr/bin/$PACKAGE 3.54 + 3.55 +mv $PACKAGE $PACKAGE-$VERSION 3.56 +cd $PACKAGE-$VERSION/fs 3.57 + 3.58 +# Create menu 3.59 +mkdir -p usr/share/applications 3.60 +cat > usr/share/applications/$PACKAGE.desktop <<EOT 3.61 +[Desktop Entry] 3.62 +Version=1.0 3.63 +Encoding=UTF-8 3.64 +Name=$PACKAGE 3.65 +Exec=$PACKAGE 3.66 +Terminal=false 3.67 +Categories=Application 3.68 +Icon=/usr/share/scilab/share/icons/hicolor/24x24/apps/scilab.png 3.69 +Comment=$SHORT_DESC 3.70 +Type=Application 3.71 +Categories=Office; 3.72 +EOT 3.73 +cd ../.. 3.74 + 3.75 +cat > $PACKAGE-$VERSION/receipt <<EOT 3.76 +PACKAGE="$PACKAGE" 3.77 +VERSION="$VERSION" 3.78 +CATEGORY="$CATEGORY" 3.79 +SHORT_DESC="$SHORT_DESC" 3.80 +MAINTAINER="$MAINTAINER" 3.81 +DEPENDS="$DEPENDS" 3.82 +WEB_SITE="$WEB_SITE" 3.83 +EOT 3.84 + 3.85 +# Pack 3.86 +tazpkg pack $PACKAGE-$VERSION 3.87 + 3.88 +# Clean to save RAM memory 3.89 +rm -rf $PACKAGE-$VERSION 3.90 + 3.91 +# Install pseudo package 3.92 +tazpkg install $PACKAGE-$VERSION.tazpkg --root=$ROOT 3.93 +case " $@ " in 3.94 +*\ --k*) mv $PACKAGE-$VERSION.tazpkg $CUR_DIR ;; 3.95 +esac 3.96 + 3.97 +# Clean 3.98 +cd $CUR_DIR 3.99 +rm -rf $TMP_DIR 3.100 +
4.1 --- a/get-xcas/stuff/get-xcas Mon Dec 17 10:35:12 2012 +0100 4.2 +++ b/get-xcas/stuff/get-xcas Mon Dec 17 11:16:12 2012 +0100 4.3 @@ -27,12 +27,7 @@ 4.4 CUR_DIR=$(pwd) 4.5 mkdir -p $TMP_DIR && cd $TMP_DIR 4.6 4.7 -get_releases() 4.8 -{ 4.9 - wget -qO- "$URL?C=M;O=D" | sed 's|.*[Ff]="\([^"/]*\).*|\1|;/[^0-9b]/d' 4.10 -} 4.11 - 4.12 -# Download deb 4.13 +# Download tarball 4.14 FILE=$(basename $URL) 4.15 wget $URL 4.16