wok-6.x rev 13702
Add get-geogebra
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Mon Dec 17 10:35:12 2012 +0100 (2012-12-17) |
parents | 62b0ea7fa4fc |
children | d478641e3dce |
files | get-geogebra/receipt get-geogebra/stuff/get-geogebra get-xcas/stuff/get-xcas |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/get-geogebra/receipt Mon Dec 17 10:35:12 2012 +0100 1.3 @@ -0,0 +1,16 @@ 1.4 +# SliTaz package receipt. 1.5 + 1.6 +PACKAGE="get-geogebra" 1.7 +VERSION="1.00" 1.8 +CATEGORY="non-free" 1.9 +SHORT_DESC="Get geogebra: Mathematics software for learning and teaching." 1.10 +MAINTAINER="pascal.bellard@slitaz.org" 1.11 +WEB_SITE="http://www.geogebra.org/" 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-geogebra $fs/usr/bin 1.18 +} 1.19 +
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/get-geogebra/stuff/get-geogebra Mon Dec 17 10:35:12 2012 +0100 2.3 @@ -0,0 +1,100 @@ 2.4 +#!/bin/sh -e 2.5 + 2.6 +PACKAGE="geogebra" 2.7 +WEB_SITE="http://www.geogebra.org/" 2.8 +CATEGORY="non-free" 2.9 +SHORT_DESC="Mathematics software for learning and teaching." 2.10 +MAINTAINER="somebody@geogebra.org" 2.11 +DEPENDS="bash" 2.12 +URL="http://www.geogebra.org/download/?os=linux&portable=true" 2.13 + 2.14 +ROOT="$1" 2.15 +[ -d "$ROOT" ] || ROOT="" 2.16 + 2.17 +if test $(id -u) != 0 ; then 2.18 + echo -e "\nYou must be root to run `basename $0`." 2.19 + echo -e "Please type 'su' and root password to become super-user.\n" 2.20 + exit 0 2.21 +fi 2.22 + 2.23 +if [ -d $ROOT/var/lib/tazpkg/installed/$PACKAGE ]; then 2.24 + [ -n "$ROOT" ] && exit 1 2.25 + tazpkg remove $PACKAGE 2.26 + [ -d /var/lib/tazpkg/installed/$PACKAGE ] && exit 1 2.27 +fi 2.28 + 2.29 +TMP_DIR=/tmp/get-$PACKAGE-$$-$RANDOM 2.30 +CUR_DIR=$(pwd) 2.31 +mkdir -p $TMP_DIR && cd $TMP_DIR 2.32 + 2.33 +get_releases() 2.34 +{ 2.35 + wget -qO- "$URL?C=M;O=D" | sed 's|.*[Ff]="\([^"/]*\).*|\1|;/[^0-9b]/d' 2.36 +} 2.37 + 2.38 +# Download deb 2.39 +FILE=$PACKAGE.tgz 2.40 +wget -O $FILE "$URL" 2.41 + 2.42 +if [ ! -f $FILE ]; then 2.43 + cd $CUR_DIR 2.44 + rm -rf $TMP_DIR 2.45 + echo "Could not download $FILE from $URL. Exiting." 2.46 + exit 1 2.47 +fi 2.48 + 2.49 +mkdir -p $PACKAGE/fs/usr/share 2.50 +tar xzf $FILE -C $PACKAGE/fs/usr/share 2.51 +# extracted pkg can be removed: Save RAM 2.52 +rm -f $FILE 2.53 + 2.54 +VERSION="$(ls $PACKAGE/fs/usr/share | sed 's/.*-//;s|/||')" 2.55 +mv $PACKAGE/fs/usr/share/* $PACKAGE/fs/usr/share/$PACKAGE 2.56 +mkdir -p $PACKAGE/fs/usr/bin 2.57 +ln -s /usr/share/$PACKAGE/$PACKAGE-portable $PACKAGE/fs/usr/bin/$PACKAGE 2.58 + 2.59 +mv $PACKAGE $PACKAGE-$VERSION 2.60 +cd $PACKAGE-$VERSION/fs 2.61 + 2.62 +# Create menu 2.63 +mkdir -p usr/share/applications 2.64 +cat > usr/share/applications/$PACKAGE.desktop <<EOT 2.65 +[Desktop Entry] 2.66 +Version=1.0 2.67 +Encoding=UTF-8 2.68 +Name=$PACKAGE 2.69 +Exec=$PACKAGE 2.70 +Terminal=false 2.71 +Categories=Application 2.72 +Comment=$SHORT_DESC 2.73 +Type=Application 2.74 +Categories=Office; 2.75 +EOT 2.76 +cd ../.. 2.77 + 2.78 +cat > $PACKAGE-$VERSION/receipt <<EOT 2.79 +PACKAGE="$PACKAGE" 2.80 +VERSION="$VERSION" 2.81 +CATEGORY="$CATEGORY" 2.82 +SHORT_DESC="$SHORT_DESC" 2.83 +MAINTAINER="$MAINTAINER" 2.84 +DEPENDS="$DEPENDS" 2.85 +WEB_SITE="$WEB_SITE" 2.86 +EOT 2.87 + 2.88 +# Pack 2.89 +tazpkg pack $PACKAGE-$VERSION 2.90 + 2.91 +# Clean to save RAM memory 2.92 +rm -rf $PACKAGE-$VERSION 2.93 + 2.94 +# Install pseudo package 2.95 +tazpkg install $PACKAGE-$VERSION.tazpkg --root=$ROOT 2.96 +case " $@ " in 2.97 +*\ --k*) mv $PACKAGE-$VERSION.tazpkg $CUR_DIR ;; 2.98 +esac 2.99 + 2.100 +# Clean 2.101 +cd $CUR_DIR 2.102 +rm -rf $TMP_DIR 2.103 +
3.1 --- a/get-xcas/stuff/get-xcas Mon Dec 17 10:11:05 2012 +0100 3.2 +++ b/get-xcas/stuff/get-xcas Mon Dec 17 10:35:12 2012 +0100 3.3 @@ -67,16 +67,16 @@ 3.4 3.5 # Create menu 3.6 mkdir -p usr/share/applications 3.7 -cat > usr/share/applications/xcas.desktop <<EOT 3.8 +cat > usr/share/applications/$PACKAGE.desktop <<EOT 3.9 [Desktop Entry] 3.10 Version=1.0 3.11 Encoding=UTF-8 3.12 -Name=Xcas 3.13 -Exec=xcas 3.14 +Name=$PACKAGE 3.15 +Exec=$PACKAGE 3.16 Terminal=false 3.17 Categories=Application 3.18 Icon=$XCAS_BASE/share/giac//doc/en/tutoriel/img8.png 3.19 -Comment=Computer algebra system 3.20 +Comment=$SHORT_DESC 3.21 Type=Application 3.22 Categories=Office; 3.23 EOT