summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO8
-rw-r--r--Dockerfile16
-rw-r--r--PKGBUILD24
-rw-r--r--docker.sudoers1
-rw-r--r--install_sh.patch26
5 files changed, 29 insertions, 46 deletions
diff --git a/.SRCINFO b/.SRCINFO
index c8855a5..55afe04 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
1pkgbase = anki-official-binary-bundle 1pkgbase = 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.49 3 pkgver = 2.1.53
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
@@ -10,9 +10,9 @@ pkgbase = anki-official-binary-bundle
10 provides = anki 10 provides = anki
11 conflicts = anki 11 conflicts = anki
12 conflicts = anki-git 12 conflicts = anki-git
13 source = https://github.com/ankitects/anki/releases/download/2.1.49/anki-2.1.49-linux.tar.bz2 13 source = https://github.com/ankitects/anki/releases/download/2.1.53/anki-2.1.53-linux-qt6.tar.zst
14 source = install_sh.patch 14 source = install_sh.patch
15 md5sums = d0c13ae7cf988358fb231645f6490088 15 sha256sums = c9739271c6f2bfbe248c98fd83d5ce8952301f21ac39f2c0504219294557ddfc
16 md5sums = 82d6fb7eb10ec0ae592093d89d8d5957 16 sha256sums = b6dc61727ad2c2e10fb49cb58d1cd9900aa15eaba525117299a2143ad2745868
17 17
18pkgname = anki-official-binary-bundle 18pkgname = anki-official-binary-bundle
diff --git a/Dockerfile b/Dockerfile
deleted file mode 100644
index 9422cfc..0000000
--- a/Dockerfile
+++ /dev/null
@@ -1,16 +0,0 @@
1FROM archlinux
2
3# https://serverfault.com/a/1053273
4# TEMP-FIX for pacman issue
5RUN patched_glibc=glibc-linux4-2.33-4-x86_64.pkg.tar.zst \
6 && curl -LO "https://raw.githubusercontent.com/sickcodes/Docker-OSX/master/${patched_glibc}" \
7 && bsdtar -C / -xvf "${patched_glibc}" || echo "Everything is fine."
8# TEMP-FIX for pacman issue
9
10RUN pacman -Sy --noconfirm sudo fakeroot base-devel
11RUN pacman -S --noconfirm git
12RUN pacman -S --noconfirm vim
13COPY docker.sudoers /etc/sudoers.d/wheel
14RUN useradd user
15RUN usermod -a user -G wheel
16
diff --git a/PKGBUILD b/PKGBUILD
index b715267..af9fcb2 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,7 +5,7 @@
5 5
6# Maintainer: Kuklin István <kuklinistvan@zoho.com> 6# Maintainer: Kuklin István <kuklinistvan@zoho.com>
7pkgname=anki-official-binary-bundle 7pkgname=anki-official-binary-bundle
8pkgver=2.1.49 8pkgver=2.1.53
9pkgrel=1 9pkgrel=1
10epoch= 10epoch=
11pkgdesc="The official binary shipped with the tested versions of the dependent libraries." 11pkgdesc="The official binary shipped with the tested versions of the dependent libraries."
@@ -22,31 +22,25 @@ conflicts=('anki' 'anki-git')
22replaces=() 22replaces=()
23backup=() 23backup=()
24options=() 24options=()
25install= 25install=$pkgname.install
26changelog= 26changelog=
27topdirname="anki-$pkgver-linux" 27topdirname="anki-$pkgver-linux-qt6"
28source=( 28source=(
29 "https://github.com/ankitects/anki/releases/download/${pkgver}/${topdirname}.tar.bz2" 29 "https://github.com/ankitects/anki/releases/download/${pkgver}/${topdirname}.tar.zst"
30 "install_sh.patch" 30 "install_sh.patch"
31) 31)
32noextract=() 32noextract=()
33md5sums=('d0c13ae7cf988358fb231645f6490088' 33sha256sums=('c9739271c6f2bfbe248c98fd83d5ce8952301f21ac39f2c0504219294557ddfc'
34 '82d6fb7eb10ec0ae592093d89d8d5957') 34 '991297cb02434d753f55980205a22971ed98655b0f62f0104ae4692155355d8c')
35 35
36validpgpkeys=() 36validpgpkeys=()
37 37
38prepare() { 38prepare() {
39 cd "$srcdir" 39 cd "$srcdir"/"$topdirname"
40 ln -s "$topdirname" anki 40 patch install.sh ../install_sh.patch
41 patch -p0 -i install_sh.patch anki/install.sh
42 rm anki
43}
44
45build() {
46 cd "$topdirname"
47} 41}
48 42
49package() { 43package() {
50 cd "$topdirname" 44 cd "$topdirname"
51 PREFIX="$pkgdir"/usr/ ./install.sh 45 PREFIX="$pkgdir"/usr/ ./install.sh
52} 46}
diff --git a/docker.sudoers b/docker.sudoers
deleted file mode 100644
index 7c499c2..0000000
--- a/docker.sudoers
+++ /dev/null
@@ -1 +0,0 @@
1%wheel ALL=(ALL) NOPASSWD: ALL
diff --git a/install_sh.patch b/install_sh.patch
index 3dc6095..e76e1af 100644
--- a/install_sh.patch
+++ b/install_sh.patch
@@ -1,21 +1,27 @@
1--- install.sh.orig 2020-12-10 06:36:44.000000000 +0100 1--- install.sh.orig 2022-06-06 18:29:11.117752422 -0500
2+++ install.sh 2020-12-30 14:54:50.834734784 +0100 2+++ install.sh 2022-06-06 18:40:38.153466913 -0500
3@@ -15,7 +15,7 @@ 3@@ -13,9 +13,10 @@
4
5 rm -rf "$PREFIX"/share/anki "$PREFIX"/bin/anki
4 mkdir -p "$PREFIX"/share/anki 6 mkdir -p "$PREFIX"/share/anki
5 cp -av * "$PREFIX"/share/anki/ 7-cp -av --no-preserve=owner,context * "$PREFIX"/share/anki/
8+shopt -s extglob
9+cp -av --no-preserve=owner,context !(*install.sh) "$PREFIX"/share/anki/
6 mkdir -p "$PREFIX"/bin 10 mkdir -p "$PREFIX"/bin
7-ln -sf "$PREFIX"/share/anki/bin/Anki "$PREFIX"/bin/anki 11-ln -sf "$PREFIX"/share/anki/anki "$PREFIX"/bin/anki
8+ln -sf /usr/share/anki/bin/Anki "$PREFIX"/bin/anki 12+ln -sf ../share/anki/anki "$PREFIX"/bin/anki
9 # fix a previous packaging issue where we created this as a file 13 # fix a previous packaging issue where we created this as a file
10 (test -f "$PREFIX"/share/applications && rm "$PREFIX"/share/applications)||true 14 (test -f "$PREFIX"/share/applications && rm "$PREFIX"/share/applications)||true
11 mkdir -p "$PREFIX"/share/pixmaps 15 mkdir -p "$PREFIX"/share/pixmaps
12@@ -26,9 +26,4 @@ 16@@ -26,11 +26,4 @@
13 mv anki.desktop "$PREFIX"/share/applications/;\ 17 mv -Z anki.desktop "$PREFIX"/share/applications/;\
14 mv anki.1 "$PREFIX"/share/man/man1/) 18 mv -Z anki.1 "$PREFIX"/share/man/man1/)
15 19
16-xdg-mime install anki.xml --novendor 20-xdg-mime install anki.xml --novendor
17-xdg-mime default anki.desktop application/x-colpkg 21-xdg-mime default anki.desktop application/x-colpkg
18-xdg-mime default anki.desktop application/x-apkg 22-xdg-mime default anki.desktop application/x-apkg
19-xdg-mime default anki.desktop application/x-ankiaddon 23-xdg-mime default anki.desktop application/x-ankiaddon
20- 24-
25-rm install.sh
26-
21 echo "Install complete. Type 'anki' to run." 27 echo "Install complete. Type 'anki' to run."