desktop/anki: Added (friendly, intelligent flashcards)

Signed-off-by: Niels Horn <niels.horn@slackbuilds.org>
This commit is contained in:
Giuseppe Scalzi 2011-10-21 16:50:11 -02:00 committed by Niels Horn
parent a7cde684cf
commit 299cf88d27
5 changed files with 129 additions and 0 deletions

15
desktop/anki/README Normal file
View File

@ -0,0 +1,15 @@
Anki is a program which makes remembering things easy. Because it is
a lot more efficient than traditional study methods, you can either
greatly decrease your time spent studying, or greatly increase the
amount you learn.
Anyone who needs to remember things in their daily life can benefit
from Anki. Since it is content-agnostic and supports images, audio,
videos and scientific markup (via LaTeX), the possibilities are endless.
This requires pysetuptools, SQLAlchemy, simplejson, numpy, matplotlib,
and BeautifulSoup
For audio recording support pyaudio and lame are required, but pyaudio
(http://people.csail.mit.edu/hubert/pyaudio/) is not available yet on
SlackBuilds.org.

View File

@ -0,0 +1,76 @@
#!/bin/sh
# Slackware build script for anki
# Written by Giuseppe Scalzi <giuseppe[at]osgate[dot]org>
PRGNAM=anki
VERSION=${VERSION:-1.2.9}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i486 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
else
SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
fi
set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tgz
cd $PRGNAM-$VERSION
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
-exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
# Fix sqlite table problem (without this anki isn't able to create new decks)
sed -i 's/\"sqlite_stat1\"/\"sqlite_stat1\",\"sqlite_stat2\"/' libanki/anki/deck.py
cd libanki
python setup.py install --root=$PKG
cd ..
python setup.py install --root=$PKG
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a \
COPYING CREDITS README README.development README.translating ChangeLog ChangeLog.old \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}

10
desktop/anki/anki.info Normal file
View File

@ -0,0 +1,10 @@
PRGNAM="anki"
VERSION="1.2.9"
HOMEPAGE="http://www.ankisrs.net/"
DOWNLOAD="http://anki.googlecode.com/files/anki-1.2.9.tgz"
MD5SUM="3b32c40c589565ebd5b349f8e0d36967"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
MAINTAINER="Giuseppe Scalzi"
EMAIL="giuseppe@osgate.org"
APPROVED="Niels Horn"

9
desktop/anki/doinst.sh Normal file
View File

@ -0,0 +1,9 @@
if [ -x /usr/bin/update-desktop-database ]; then
/usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
fi
if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then
if [ -x /usr/bin/gtk-update-icon-cache ]; then
/usr/bin/gtk-update-icon-cache usr/share/icons/hicolor >/dev/null 2>&1
fi
fi

19
desktop/anki/slack-desc Normal file
View File

@ -0,0 +1,19 @@
# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description. Line
# up the first '|' above the ':' following the base package name, and the '|'
# on the right side marks the last column you can put a character in. You must
# make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':' except on otherwise blank lines.
|-----handy-ruler------------------------------------------------------|
anki: anki (friendly, intelligent flashcards)
anki:
anki: Anki is a program which makes remembering things easy. Because it is
anki: a lot more efficient than traditional study methods, you can either
anki: greatly decrease your time spent studying, or greatly increase the
anki: amount you learn.
anki:
anki: Anyone who needs to remember things in their daily life can benefit
anki: from Anki. Since it is content-agnostic and supports images, audio,
anki: videos and scientific markup (via LaTeX), the possibilities are
anki: endless.