diff options
Diffstat (limited to 'desktop/anki')
-rw-r--r-- | desktop/anki/README | 6 | ||||
-rw-r--r-- | desktop/anki/anki.SlackBuild | 83 | ||||
-rw-r--r-- | desktop/anki/anki.info | 20 | ||||
-rw-r--r-- | desktop/anki/anki/anki.desktop | 12 | ||||
-rw-r--r-- | desktop/anki/anki/anki.png | bin | 0 -> 34595 bytes | |||
-rw-r--r-- | desktop/anki/anki/anki.xpm | 291 |
6 files changed, 381 insertions, 31 deletions
diff --git a/desktop/anki/README b/desktop/anki/README index 3e0be941f1d8..c12fb2faf39f 100644 --- a/desktop/anki/README +++ b/desktop/anki/README @@ -8,5 +8,7 @@ from Anki. Since it is content-agnostic and supports images, audio, videos and scientific markup (via LaTeX), the possibilities are endless. -mpv is recommended for video play-back, but mplayer (included in -Slackware by default) can be used instead. +For audio recording support PyAudio built against Python 3 (not +currently available from SlackBuilds) and lame are required. mpv is +recommended for video play-back, but mplayer (including in Slackware by +default) can be used instead. diff --git a/desktop/anki/anki.SlackBuild b/desktop/anki/anki.SlackBuild index 25c0b10094ea..978350335d3f 100644 --- a/desktop/anki/anki.SlackBuild +++ b/desktop/anki/anki.SlackBuild @@ -3,19 +3,46 @@ # Slackware build script for anki # Written by Giuseppe Scalzi <giuseppe[at]osgate[dot]org> +# Updated for new Anki build scheme by Caterino Tommaso, T.O.P. (2022) +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. cd $(dirname $0) ; CWD=$(pwd) PRGNAM=anki -VERSION=${VERSION:-2.1.16} +VERSION=${VERSION:-2.1.51} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} -ARCH="noarch" -# If the variable PRINT_PACKAGE_NAME is set, then this script will report what -# the name of the created package would be, and then exit. This information -# could be useful to other scripts. +# Find ARCH +if [ -z "$ARCH" ]; then + ARCH=$( uname -m ) +fi + +# Bail out if not x86_64 +if [ "$ARCH" = x86_64 ]; then + LIBDIRSUFFIX=64 +else + echo "Architecture $ARCH is not supported" >&2 + exit 1 +fi + if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" exit 0 @@ -25,36 +52,52 @@ TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -set -e +# Exit for errors or unset variables below. +set -eu rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT -cd $TMP -rm -rf $PRGNAM-$VERSION -tar xvf $CWD/$PRGNAM-$VERSION-source.tgz -cd $PRGNAM-$VERSION +cd $PKG +python3 -m venv usr + +( cd usr ; bin/pip3 install -v --no-deps $CWD/aqt*.whl $CWD/anki*.whl ) + chown -R root:root . find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ -o -perm 511 \) -exec chmod 755 {} \; -o \ - \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ - -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; -DESTDIR=$PKG make install +find $PKG/usr \ + -mindepth 1 -maxdepth 1 \ + -not -name lib \ + -not -name bin \ + -execdir rm -rf '{}' \+ -# Move the man file to the correct directory and gzip it -mv $PKG/usr/share/man/ $PKG/usr/man -find $PKG/usr/man -type f -exec gzip -9 {} \; +find $PKG/usr/bin $PKG/usr/lib/python3.9/site-packages \ + -mindepth 1 -maxdepth 1 \ + -not -name "aqt*" \ + -not -name "anki*" \ + -execdir rm -rf '{}' \+ -# `make install` puts the docs in the wrong place for Slackware -mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -mv $PKG/usr/share/doc/anki/* $PKG/usr/doc/$PRGNAM-$VERSION +mv -v $PKG/usr/lib $PKG/usr/lib$LIBDIRSUFFIX + +# delete line 1, insert python bang +sed -i '1d;2i #!/usr/bin/python3' $PKG/usr/bin/anki + +install -vD -m 0644 $CWD/anki/anki.{png,xpm} -t $PKG/usr/share/pixmaps +install -vD -m 0644 $CWD/anki/anki.desktop -t $PKG/usr/share/applications +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 $CWD/README $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 diff --git a/desktop/anki/anki.info b/desktop/anki/anki.info index 2c6e22a1ea3c..bd681f4334f7 100644 --- a/desktop/anki/anki.info +++ b/desktop/anki/anki.info @@ -1,10 +1,12 @@ PRGNAM="anki" -VERSION="2.1.16" -HOMEPAGE="http://www.ankisrs.net/" -DOWNLOAD="http://slackware.uk/sbosrcarch/by-name/desktop/anki/anki-2.1.16-source.tgz" -MD5SUM="fb79abdae4c6cc10d5d8c5bef0c059f6" -DOWNLOAD_x86_64="" -MD5SUM_x86_64="" -REQUIRES="python3-PyQtWebEngine send2trash decorator Markdown python3-jsonschema BeautifulSoup4" -MAINTAINER="Timothy Pollard" -EMAIL="sbo@timp.com.au" +VERSION="2.1.51" +HOMEPAGE="https://apps.ankiweb.net/" +DOWNLOAD="UNSUPPORTED" +MD5SUM="" +DOWNLOAD_x86_64="https://files.pythonhosted.org/packages/19/71/6622dcad9d1c6988e463f8c51ee8e61ffcf3dbdafa2772d08d0ec01c8069/anki-2.1.51-cp39-abi3-manylinux_2_28_x86_64.whl \ +https://files.pythonhosted.org/packages/77/06/3ee5c1ee4d71f1fe96bb961a1d8104dcdfb492eb6a27f9f3a73883395eb4/aqt-2.1.51-py3-none-any.whl" +MD5SUM_x86_64="98ffc4b8dcd0dc4f58f1b9f9bf3cb752 \ +703e288310b82dda9677f549f2f6acc1" +REQUIRES="python3-PyQtWebEngine send2trash decorator Markdown python3-jsonschema BeautifulSoup4 Flask Flask-Cors waitress" +MAINTAINER="Caterino Tommaso, T.O.P." +EMAIL="alan_averNOsa@lavaSPAMbit.com (remove NO and SPAM)" diff --git a/desktop/anki/anki/anki.desktop b/desktop/anki/anki/anki.desktop new file mode 100644 index 000000000000..f584ebfbdab9 --- /dev/null +++ b/desktop/anki/anki/anki.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Name=Anki +Comment=An intelligent spaced-repetition memory training program +GenericName=Flashcards +Exec=QT_AUTO_SCREEN_SCALE_FACTOR=1 anki %f +TryExec=anki +Icon=anki +Categories=Education;Languages;KDE;Qt; +Terminal=false +Type=Application +Version=1.0 +MimeType=application/x-apkg;application/x-anki; diff --git a/desktop/anki/anki/anki.png b/desktop/anki/anki/anki.png Binary files differnew file mode 100644 index 000000000000..5700121d6035 --- /dev/null +++ b/desktop/anki/anki/anki.png diff --git a/desktop/anki/anki/anki.xpm b/desktop/anki/anki/anki.xpm new file mode 100644 index 000000000000..ef7c2aaef2b7 --- /dev/null +++ b/desktop/anki/anki/anki.xpm @@ -0,0 +1,291 @@ +/* XPM */ +static char * anki_xpm[] = { +"32 32 256 2", +" c None", +". c #525252", +"+ c #515151", +"@ c #505050", +"# c #4F4F4F", +"$ c #4D4D4D", +"% c #4B4B4B", +"& c #4A4A4A", +"* c #494949", +"= c #484848", +"- c #474747", +"; c #464646", +"> c #454545", +", c #444444", +"' c #424242", +") c #404040", +"! c #595959", +"~ c #5E5E5E", +"{ c #707070", +"] c #787878", +"^ c #7C7C7C", +"/ c #7B7B7B", +"( c #7A7A7A", +"_ c #797979", +": c #777777", +"< c #767676", +"[ c #757575", +"} c #747474", +"| c #737373", +"1 c #727272", +"2 c #6D6D6D", +"3 c #606060", +"4 c #636363", +"5 c #828282", +"6 c #808080", +"7 c #7F7F7F", +"8 c #7E7E7E", +"9 c #7D7D7D", +"0 c #6C6C6C", +"a c #616161", +"b c #898989", +"c c #888888", +"d c #868686", +"e c #848484", +"f c #818181", +"g c #989898", +"h c #656565", +"i c #646464", +"j c #8A8A8A", +"k c #8E8E8E", +"l c #8C8C8C", +"m c #858585", +"n c #838383", +"o c #929292", +"p c #A7A7A7", +"q c #949494", +"r c #C7C7C7", +"s c #E8E9E9", +"t c #6E6E6E", +"u c #696969", +"v c #959595", +"w c #939393", +"x c #919191", +"y c #8F8F8F", +"z c #999999", +"A c #F6FBFE", +"B c #DFEFFB", +"C c #E6F1F9", +"D c #BADEF5", +"E c #D4E9F7", +"F c #A5A5A5", +"G c #575757", +"H c #979797", +"I c #969696", +"J c #8D8D8D", +"K c #8B8B8B", +"L c #878787", +"M c #E5EFF5", +"N c #97CDF1", +"O c #8DC8EF", +"P c #7ABFED", +"Q c #D4EAF9", +"R c #C6C6C6", +"S c #5B5B5B", +"T c #9E9E9E", +"U c #9C9C9C", +"V c #9B9B9B", +"W c #E5E7E8", +"X c #B4DAF5", +"Y c #90C9F0", +"Z c #94CBF1", +"` c #ABD6F3", +" . c #E4F2FB", +".. c #D6D7D7", +"+. c #5F5F5F", +"@. c #A2A2A2", +"#. c #A0A0A0", +"$. c #9F9F9F", +"%. c #9D9D9D", +"&. c #9A9A9A", +"*. c #B5B5B5", +"=. c #E8F3FA", +"-. c #AED8F4", +";. c #A9D5F3", +">. c #ADD7F4", +",. c #CDE7F8", +"'. c #EAF5FC", +"). c #E7E7E7", +"!. c #626262", +"~. c #909090", +"{. c #A1A1A1", +"]. c #D8D8D8", +"^. c #EFF2F3", +"/. c #ECF1F4", +"(. c #E8F3FC", +"_. c #F0F0F0", +":. c #B6B6B6", +"<. c #666666", +"[. c #010101", +"}. c #686868", +"|. c #A9A9A9", +"1. c #B0B0B0", +"2. c #E9EAEA", +"3. c #F7FBFD", +"4. c #D7D7D7", +"5. c #6A6A6A", +"6. c #000000", +"7. c #5D5D5D", +"8. c #585858", +"9. c #A8A8A8", +"0. c #E1E1E1", +"a. c #ACACAC", +"b. c #5A5A5A", +"c. c #717171", +"d. c #EEF0F1", +"e. c #CCCCCC", +"f. c #565656", +"g. c #676767", +"h. c #C9C9C9", +"i. c #AAD6F4", +"j. c #DBEBF6", +"k. c #ADADAD", +"l. c #6F6F6F", +"m. c #ECF3F7", +"n. c #4CA9E7", +"o. c #4EAAE7", +"p. c #D2E9F9", +"q. c #319CE3", +"r. c #118CDF", +"s. c #E4E4E4", +"t. c #C2C2C2", +"u. c #C0C0C0", +"v. c #C8C8C8", +"w. c #EEEFF0", +"x. c #9DD0F2", +"y. c #2998E2", +"z. c #1C91E0", +"A. c #92CBF0", +"B. c #96CDF1", +"C. c #98CEF1", +"D. c #99CEF1", +"E. c #F0F8FD", +"F. c #5C5C5C", +"G. c #ECECEC", +"H. c #EEF5F9", +"I. c #C1E1F7", +"J. c #93CBF0", +"K. c #58AEE9", +"L. c #3BA0E5", +"M. c #2F9AE3", +"N. c #2596E2", +"O. c #1990E0", +"P. c #108BDF", +"Q. c #0686DD", +"R. c #47A6E7", +"S. c #E9EFF3", +"T. c #171717", +"U. c #DBEDFA", +"V. c #70BAEB", +"W. c #67B6EA", +"X. c #5BB0E8", +"Y. c #52ABE7", +"Z. c #45A5E6", +"`. c #3CA1E5", +" + c #309BE3", +".+ c #2796E2", +"++ c #50ABE8", +"@+ c #DCEDF9", +"#+ c #A5A6A6", +"$+ c #4C4C4C", +"%+ c #0F0F0F", +"&+ c #ECEDEE", +"*+ c #E1F1FB", +"=+ c #94CBF0", +"-+ c #7ABEED", +";+ c #6EB9EB", +">+ c #64B4EA", +",+ c #58AEE8", +"'+ c #4FAAE7", +")+ c #43A4E5", +"!+ c #3FA2E5", +"~+ c #CBE6F8", +"{+ c #D0D0D0", +"]+ c #101010", +"^+ c #F1F6FA", +"/+ c #B7DCF5", +"(+ c #84C4EE", +"_+ c #7BBFED", +":+ c #6FB9EB", +"<+ c #66B5EA", +"[+ c #5AAFE8", +"}+ c #5BAFE8", +"|+ c #F1F5F7", +"1+ c #6B6B6B", +"2+ c #D1D1D1", +"3+ c #E2F1FB", +"4+ c #8EC8F0", +"5+ c #82C2EE", +"6+ c #78BEED", +"7+ c #6CB8EB", +"8+ c #63B3EA", +"9+ c #D5EBF9", +"0+ c #B9B9B9", +"a+ c #545454", +"b+ c #111111", +"c+ c #C5C5C5", +"d+ c #E7F4FC", +"e+ c #A5D3F3", +"f+ c #AAD5F4", +"g+ c #ACD7F4", +"h+ c #8FC9F0", +"i+ c #CACACA", +"j+ c #ECF6FC", +"k+ c #C2E1F6", +"l+ c #CBE5F7", +"m+ c #F0F7FD", +"n+ c #F9FCFE", +"o+ c #C7E4F7", +"p+ c #B1D9F4", +"q+ c #F1F8FC", +"r+ c #121212", +"s+ c #CFCFCF", +"t+ c #F5FAFD", +"u+ c #EFF7FC", +"v+ c #F3F3F4", +"w+ c #F1F1F1", +"x+ c #0D0D0D", +"y+ c #BFBFBF", +"z+ c #FDFEFE", +"A+ c #EBEBEB", +"B+ c #AEAEAE", +"C+ c #040404", +"D+ c #1B1B1B", +"E+ c #A3A3A3", +"F+ c #0E0E0E", +"G+ c #020202", +" ", +" . + @ # $ $ % & * = - ; > , ' ' ) ", +" ! ~ { ] ^ / ( _ _ ] : < [ } | | 1 2 3 $ ' ", +" 4 / 5 6 7 8 9 ^ / ( ( _ ] : < [ } } | 0 % ", +" a ^ b c d e 5 f 6 7 8 9 ^ / ( _ 9 g f < [ h & ", +" i j k l j c d m n 5 f 6 o p q j r s g _ ] t + ", +" u v w x y k l j b d m n z A B C D E F ^ / } G ", +" 0 z H I q o x y J K b L j M N O P Q R 6 8 < S ", +" { T U V z H I q o x y J y W X Y Z ` ...o ( +. ", +" } @.#.$.%.U &.g H v w x *.=.-.;.>.,.'.).T 9 !. ", +" @ ~.o g T {.$.%.U &.g %.].^./.(.Q _.:.K L 6 <. ", +" [.+.!.}.2 ] c T #.T U %.|.1.1.2.3.4.o J K e 5. ", +" 6.3 ~ 7.S ! 8.S t L w T T %.V 9.0.a.q w x b t ", +" 6.4 !.3 +.7.S b.c.! a { e U $.%.9.V g H v J 1 ", +" 6.<.h 4 !.3 +.~.d.e.0 G f.! } w T $.%.U &.o < ", +" 6.5.}.g.h 4 !.h.i.j.k.b.! G f.3 [ &.@.#.$.I ( ", +" 6.2 0 5.u g.l.m.n.o.=.m 7.b.! G f.! 1 w {.V 8 ", +" 6.{ l.2 0 5.z p.q.r.Z s.t.u.u.a.l.G f.~ : V 5 ", +" 6.} [ J T v.w.x.y.z.z.A.B.C.D.E.*.S b.8.G G F. ", +" 6./ 1.G.H.I.J.K.L.M.N.O.P.Q.R.S.~.~ 7.S b.* T. ", +" 6.d ].U.O V.W.X.Y.Z.`. +.+++@+#+h !.3 ~ 7.$+%+ ", +" 6.8 &.&+*+=+-+;+>+,+'+)+!+~+{+2 g.h i !.3 # ]+ ", +" 6.f 6 K v.^+/+(+_+:+<+[+}+|+z 1+5.}.g.h i . ]+ ", +" 6.e n f m 2+3+N 4+5+6+7+8+9+0+l.2 1+5.}.g.a+b+ ", +" 6.c L m e c+d+-.e+f+g+h+_+g+2.} c.l.t 0 1+8.b+ ", +" 6.K j c L i+j+k+l+m+n+ .o+p+q+b } 1 c.l.t b.r+ ", +" 6.7 J l j s+t+u+v+0+~.*.4._.w+L ] < } | c.G x+ ", +" 6.a x y J y+z+A+B+d e 5 L V V 8 / _ ] < [ & C+ ", +" D+[ o x H E+y K b c d e n f 6 8 ^ / _ g.F+ ", +" G+D+4 n o x y k l K b c d m n 5 7 | $ D+6. ", +" 6.6.6.6.6.6.6.6.6.6.6.6.6.6.6.6.6. ", +" "}; |