diff options
author | Giuseppe Scalzi <giuseppe@osgate.org> | 2011-10-21 16:50:11 -0200 |
---|---|---|
committer | Niels Horn <niels.horn@slackbuilds.org> | 2011-10-21 16:50:11 -0200 |
commit | 299cf88d270e872853ffd224e8c62335ec71e874 (patch) | |
tree | f9e4eed683ff50f3ab24ae46c8757f2ebfe6bba6 /desktop/anki | |
parent | a7cde684cf1810436bce10d2702250f4845bcdd6 (diff) |
desktop/anki: Added (friendly, intelligent flashcards)
Signed-off-by: Niels Horn <niels.horn@slackbuilds.org>
Diffstat (limited to 'desktop/anki')
-rw-r--r-- | desktop/anki/README | 15 | ||||
-rw-r--r-- | desktop/anki/anki.SlackBuild | 76 | ||||
-rw-r--r-- | desktop/anki/anki.info | 10 | ||||
-rw-r--r-- | desktop/anki/doinst.sh | 9 | ||||
-rw-r--r-- | desktop/anki/slack-desc | 19 |
5 files changed, 129 insertions, 0 deletions
diff --git a/desktop/anki/README b/desktop/anki/README new file mode 100644 index 0000000000000..0b8ef73ce88e2 --- /dev/null +++ b/desktop/anki/README @@ -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. diff --git a/desktop/anki/anki.SlackBuild b/desktop/anki/anki.SlackBuild new file mode 100644 index 0000000000000..f88df3847ee66 --- /dev/null +++ b/desktop/anki/anki.SlackBuild @@ -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} diff --git a/desktop/anki/anki.info b/desktop/anki/anki.info new file mode 100644 index 0000000000000..95722fb4f6003 --- /dev/null +++ b/desktop/anki/anki.info @@ -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" diff --git a/desktop/anki/doinst.sh b/desktop/anki/doinst.sh new file mode 100644 index 0000000000000..527d5759d4029 --- /dev/null +++ b/desktop/anki/doinst.sh @@ -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 diff --git a/desktop/anki/slack-desc b/desktop/anki/slack-desc new file mode 100644 index 0000000000000..f2c1287d3e099 --- /dev/null +++ b/desktop/anki/slack-desc @@ -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. |