summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO16
-rw-r--r--PKGBUILD51
-rw-r--r--anki-official-binary-bundle.install9
-rw-r--r--remove_xdg_cmds_from_makefile.patch21
4 files changed, 97 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..23f4cfa262a2
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,16 @@
+pkgbase = anki-official-binary-bundle
+ pkgdesc = The official binary shipped with the tested versions of the dependent libraries.
+ pkgver = 2.1.9
+ pkgrel = 1
+ url = https://apps.ankiweb.net
+ arch = x86_64
+ license = GNU AGPL
+ provides = anki
+ conflicts = anki-git
+ source = https://apps.ankiweb.net/downloads/current/anki-2.1.9-linux-amd64.tar.bz2
+ source = remove_xdg_cmds_from_makefile.patch
+ md5sums = 8cc5bb80efc5dac2e9dc9ee802924e24
+ md5sums = a7e473f132a4fecd9cb77ac9c8530f5f
+
+pkgname = anki-official-binary-bundle
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..b8be4c2d9344
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,51 @@
+# This is an example PKGBUILD file. Use this as a start to creating your own,
+# and remove these comments. For more information, see 'man PKGBUILD'.
+# NOTE: Please fill out the license field for your package! If it is unknown,
+# then please put 'unknown'.
+
+# Maintainer: Kuklin István <kuklinistvan@zoho.com>
+pkgname=anki-official-binary-bundle
+pkgver=2.1.9
+pkgrel=1
+epoch=
+pkgdesc="The official binary shipped with the tested versions of the dependent libraries."
+arch=('x86_64')
+url="https://apps.ankiweb.net"
+license=('GNU AGPL')
+groups=()
+depends=()
+makedepends=()
+checkdepends=()
+optdepends=()
+provides=('anki')
+conflicts=('anki-git')
+replaces=()
+backup=()
+options=()
+install=
+changelog=
+topdirname="anki-$pkgver-linux-amd64"
+source=("https://apps.ankiweb.net/downloads/current/${topdirname}.tar.bz2" "remove_xdg_cmds_from_makefile.patch")
+noextract=()
+md5sums=('8cc5bb80efc5dac2e9dc9ee802924e24' 'a7e473f132a4fecd9cb77ac9c8530f5f')
+validpgpkeys=()
+
+prepare() {
+ cd "$srcdir"
+ patch -p0 -i remove_xdg_cmds_from_makefile.patch
+}
+
+build() {
+ cd "$topdirname"
+ make
+}
+
+# check() {
+# cd "$topdirname"
+# make -k check
+# }
+
+package() {
+ cd "$topdirname"
+ make PREFIX="$pkgdir/usr" install
+}
diff --git a/anki-official-binary-bundle.install b/anki-official-binary-bundle.install
new file mode 100644
index 000000000000..e54a6311bbd6
--- /dev/null
+++ b/anki-official-binary-bundle.install
@@ -0,0 +1,9 @@
+post_install () {
+ xdg-mime install /usr/share/anki/anki.xml --novendor
+ xdg-mime default /usr/share/applications/anki.desktop application/x-colpkg
+ xdg-mime default /usr/share/applications/anki.desktop application/x-apkg
+}
+
+pre_remove() {
+ xdg-mime uninstall /usr/share/anki/anki.xml
+}
diff --git a/remove_xdg_cmds_from_makefile.patch b/remove_xdg_cmds_from_makefile.patch
new file mode 100644
index 000000000000..99f50650a496
--- /dev/null
+++ b/remove_xdg_cmds_from_makefile.patch
@@ -0,0 +1,21 @@
+--- anki-2.1.9-linux-amd64/Makefile.old 2019-02-20 05:54:05.000000000 +0100
++++ anki-2.1.9-linux-amd64/Makefile 2019-03-04 09:02:18.385431498 +0100
+@@ -20,14 +20,14 @@
+ mv anki.xpm anki.png ${PREFIX}/share/pixmaps/;\
+ mv anki.desktop ${PREFIX}/share/applications/;\
+ mv anki.1 ${PREFIX}/share/man/man1/)
+- xdg-mime install anki.xml --novendor
+- xdg-mime default anki.desktop application/x-colpkg
+- xdg-mime default anki.desktop application/x-apkg
++# xdg-mime install anki.xml --novendor
++# xdg-mime default anki.desktop application/x-colpkg
++# xdg-mime default anki.desktop application/x-apkg
+ @echo
+ @echo "Install complete. Type 'anki' to run."
+
+ uninstall:
+- -xdg-mime uninstall ${PREFIX}/share/anki/anki.xml
++# -xdg-mime uninstall ${PREFIX}/share/anki/anki.xml
+ rm -rf ${PREFIX}/share/anki
+ rm -rf ${PREFIX}/bin/anki
+ rm -rf ${PREFIX}/share/pixmaps/anki.xpm