diff options
| -rw-r--r-- | .SRCINFO | 14 | ||||
| -rw-r--r-- | Dockerfile | 4 | ||||
| -rw-r--r-- | PKGBUILD | 26 | ||||
| -rw-r--r-- | docker.sudoers | 1 | ||||
| -rw-r--r-- | install_sh.patch | 21 | ||||
| -rw-r--r-- | prefix-fix.patch | 11 | ||||
| -rw-r--r-- | remove_xdg_cmds_from_makefile.patch | 20 |
7 files changed, 44 insertions, 53 deletions
| @@ -1,19 +1,19 @@ | |||
| 1 | pkgbase = anki-official-binary-bundle | 1 | pkgbase = anki-official-binary-bundle |
| 2 | pkgdesc = The official binary shipped with the tested versions of the dependent libraries. | 2 | pkgdesc = The official binary shipped with the tested versions of the dependent libraries. |
| 3 | pkgver = 2.1.35 | 3 | pkgver = 2.1.38 |
| 4 | pkgrel = 1 | 4 | pkgrel = 1 |
| 5 | url = https://apps.ankiweb.net | 5 | url = https://apps.ankiweb.net |
| 6 | arch = x86_64 | 6 | arch = x86_64 |
| 7 | license = GNU AGPL | 7 | license = GNU AGPL |
| 8 | depends = libxkbcommon-x11 | ||
| 9 | optdepends = mpv | ||
| 8 | provides = anki | 10 | provides = anki |
| 9 | conflicts = anki | 11 | conflicts = anki |
| 10 | conflicts = anki-git | 12 | conflicts = anki-git |
| 11 | source = https://apps.ankiweb.net/downloads/current/anki-2.1.35-linux-amd64.tar.bz2 | 13 | source = https://github.com/ankitects/anki/releases/download/2.1.38/anki-2.1.38-linux.tar.bz2 |
| 12 | source = remove_xdg_cmds_from_makefile.patch | 14 | source = install_sh.patch |
| 13 | source = prefix-fix.patch | 15 | md5sums = ab70980ca8b87a6f0fd67d05fc7a37d4 |
| 14 | md5sums = d7ad8af7c1d9ddd92bb14d9d4a10ea7c | 16 | md5sums = 0ffca54471c2b5b2a300a68a93e135db |
| 15 | md5sums = 0eb542757f6b15d9904a53496627c76b | ||
| 16 | md5sums = 82a5d4f63bbc29e6a80043dd95973b4f | ||
| 17 | 17 | ||
| 18 | pkgname = anki-official-binary-bundle | 18 | pkgname = anki-official-binary-bundle |
| 19 | 19 | ||
| @@ -1,4 +1,8 @@ | |||
| 1 | FROM archlinux | 1 | FROM archlinux |
| 2 | RUN pacman -Sy --noconfirm sudo fakeroot base-devel | 2 | RUN pacman -Sy --noconfirm sudo fakeroot base-devel |
| 3 | RUN pacman -S --noconfirm git | 3 | RUN pacman -S --noconfirm git |
| 4 | RUN pacman -S --noconfirm vim | ||
| 5 | COPY docker.sudoers /etc/sudoers.d/wheel | ||
| 4 | RUN useradd user | 6 | RUN useradd user |
| 7 | RUN usermod -a user -G wheel | ||
| 8 | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | 5 | ||
| 6 | # Maintainer: Kuklin István <kuklinistvan@zoho.com> | 6 | # Maintainer: Kuklin István <kuklinistvan@zoho.com> |
| 7 | pkgname=anki-official-binary-bundle | 7 | pkgname=anki-official-binary-bundle |
| 8 | pkgver=2.1.35 | 8 | pkgver=2.1.38 |
| 9 | pkgrel=1 | 9 | pkgrel=1 |
| 10 | epoch= | 10 | epoch= |
| 11 | pkgdesc="The official binary shipped with the tested versions of the dependent libraries." | 11 | pkgdesc="The official binary shipped with the tested versions of the dependent libraries." |
| @@ -13,10 +13,10 @@ arch=('x86_64') | |||
| 13 | url="https://apps.ankiweb.net" | 13 | url="https://apps.ankiweb.net" |
| 14 | license=('GNU AGPL') | 14 | license=('GNU AGPL') |
| 15 | groups=() | 15 | groups=() |
| 16 | depends=() | 16 | depends=('libxkbcommon-x11') |
| 17 | makedepends=() | 17 | makedepends=() |
| 18 | checkdepends=() | 18 | checkdepends=() |
| 19 | optdepends=() | 19 | optdepends=('mpv') |
| 20 | provides=('anki') | 20 | provides=('anki') |
| 21 | conflicts=('anki' 'anki-git') | 21 | conflicts=('anki' 'anki-git') |
| 22 | replaces=() | 22 | replaces=() |
| @@ -24,33 +24,29 @@ backup=() | |||
| 24 | options=() | 24 | options=() |
| 25 | install= | 25 | install= |
| 26 | changelog= | 26 | changelog= |
| 27 | topdirname="anki-$pkgver-linux-amd64" | 27 | topdirname="anki-$pkgver-linux" |
| 28 | source=( | 28 | source=( |
| 29 | "https://apps.ankiweb.net/downloads/current/${topdirname}.tar.bz2" | 29 | "https://github.com/ankitects/anki/releases/download/${pkgver}/${topdirname}.tar.bz2" |
| 30 | "remove_xdg_cmds_from_makefile.patch" | 30 | "install_sh.patch" |
| 31 | "prefix-fix.patch" | ||
| 32 | ) | 31 | ) |
| 33 | noextract=() | 32 | noextract=() |
| 34 | md5sums=('d7ad8af7c1d9ddd92bb14d9d4a10ea7c' | 33 | md5sums=('ab70980ca8b87a6f0fd67d05fc7a37d4' |
| 35 | '0eb542757f6b15d9904a53496627c76b' | 34 | '0ffca54471c2b5b2a300a68a93e135db') |
| 36 | '82a5d4f63bbc29e6a80043dd95973b4f') | ||
| 37 | 35 | ||
| 38 | validpgpkeys=() | 36 | validpgpkeys=() |
| 39 | 37 | ||
| 40 | prepare() { | 38 | prepare() { |
| 41 | cd "$srcdir" | 39 | cd "$srcdir" |
| 42 | ln -s "$topdirname" anki | 40 | ln -s "$topdirname" anki |
| 43 | patch -p1 -i remove_xdg_cmds_from_makefile.patch | 41 | patch -p0 -i install_sh.patch anki/install.sh |
| 44 | patch -p0 -i prefix-fix.patch | ||
| 45 | rm anki | 42 | rm anki |
| 46 | } | 43 | } |
| 47 | 44 | ||
| 48 | build() { | 45 | build() { |
| 49 | cd "$topdirname" | 46 | cd "$topdirname" |
| 50 | make | ||
| 51 | } | 47 | } |
| 52 | 48 | ||
| 53 | package() { | 49 | package() { |
| 54 | cd "$topdirname" | 50 | cd "$topdirname" |
| 55 | make PREFIX="$pkgdir"/usr/ install | 51 | PREFIX="$pkgdir"/usr/ ./install.sh |
| 56 | } | 52 | } |
diff --git a/docker.sudoers b/docker.sudoers new file mode 100644 index 0000000..7c499c2 --- /dev/null +++ b/docker.sudoers | |||
| @@ -0,0 +1 @@ | |||
| %wheel ALL=(ALL) NOPASSWD: ALL | |||
diff --git a/install_sh.patch b/install_sh.patch new file mode 100644 index 0000000..e436b84 --- /dev/null +++ b/install_sh.patch | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | --- install.sh.orig 2020-12-10 06:36:44.000000000 +0100 | ||
| 2 | +++ install.sh 2020-12-30 14:54:50.834734784 +0100 | ||
| 3 | @@ -10,7 +10,7 @@ | ||
| 4 | mkdir -p ${PREFIX}/share/anki | ||
| 5 | cp -av * ${PREFIX}/share/anki/ | ||
| 6 | mkdir -p ${PREFIX}/bin | ||
| 7 | -ln -sf ${PREFIX}/share/anki/bin/Anki ${PREFIX}/bin/anki | ||
| 8 | +ln -sf /usr/share/anki/bin/Anki ${PREFIX}/bin/anki | ||
| 9 | # fix a previous packaging issue where we created this as a file | ||
| 10 | (test -f ${PREFIX}/share/applications && rm ${PREFIX}/share/applications)||true | ||
| 11 | mkdir -p ${PREFIX}/share/pixmaps | ||
| 12 | @@ -21,9 +21,4 @@ | ||
| 13 | mv anki.desktop ${PREFIX}/share/applications/;\ | ||
| 14 | mv anki.1 ${PREFIX}/share/man/man1/) | ||
| 15 | |||
| 16 | -xdg-mime install anki.xml --novendor | ||
| 17 | -xdg-mime default anki.desktop application/x-colpkg | ||
| 18 | -xdg-mime default anki.desktop application/x-apkg | ||
| 19 | -xdg-mime default anki.desktop application/x-ankiaddon | ||
| 20 | - | ||
| 21 | echo "Install complete. Type 'anki' to run." | ||
diff --git a/prefix-fix.patch b/prefix-fix.patch deleted file mode 100644 index af7e059..0000000 --- a/prefix-fix.patch +++ /dev/null | |||
| @@ -1,11 +0,0 @@ | |||
| 1 | --- anki/Makefile.orig | ||
| 2 | +++ anki/Makefile | ||
| 3 | @@ -10,7 +10,7 @@ | ||
| 4 | mkdir -p ${PREFIX}/share/anki | ||
| 5 | cp -av * ${PREFIX}/share/anki/ | ||
| 6 | mkdir -p ${PREFIX}/bin | ||
| 7 | - ln -sf ${PREFIX}/share/anki/bin/anki ${PREFIX}/bin/ | ||
| 8 | + ln -sf /usr/share/anki/bin/anki ${PREFIX}/bin/ | ||
| 9 | # fix a previous packaging issue where we created this as a file | ||
| 10 | (test -f ${PREFIX}/share/applications && rm ${PREFIX}/share/applications)||true | ||
| 11 | mkdir -p ${PREFIX}/share/pixmaps | ||
diff --git a/remove_xdg_cmds_from_makefile.patch b/remove_xdg_cmds_from_makefile.patch deleted file mode 100644 index 8785e8b..0000000 --- a/remove_xdg_cmds_from_makefile.patch +++ /dev/null | |||
| @@ -1,20 +0,0 @@ | |||
| 1 | diff --git a/anki/Makefile b/anki/Makefile | ||
| 2 | index 9f10a3a..6a3539b 100644 | ||
| 3 | --- a/anki/Makefile | ||
| 4 | +++ b/anki/Makefile | ||
| 5 | @@ -20,15 +20,10 @@ install: | ||
| 6 | mv anki.xpm anki.png ${PREFIX}/share/pixmaps/;\ | ||
| 7 | mv anki.desktop ${PREFIX}/share/applications/;\ | ||
| 8 | mv anki.1 ${PREFIX}/share/man/man1/) | ||
| 9 | - xdg-mime install anki.xml --novendor | ||
| 10 | - xdg-mime default anki.desktop application/x-colpkg | ||
| 11 | - xdg-mime default anki.desktop application/x-apkg | ||
| 12 | - xdg-mime default anki.desktop application/x-ankiaddon | ||
| 13 | @echo | ||
| 14 | @echo "Install complete. Type 'anki' to run." | ||
| 15 | |||
| 16 | uninstall: | ||
| 17 | - -xdg-mime uninstall ${PREFIX}/share/anki/anki.xml | ||
| 18 | rm -rf ${PREFIX}/share/anki | ||
| 19 | rm -rf ${PREFIX}/bin/anki | ||
| 20 | rm -rf ${PREFIX}/share/pixmaps/anki.xpm | ||
