From b6104299c7d3b9bbf5f03cb53dfcb1bead1b1df3 Mon Sep 17 00:00:00 2001 From: Kuklin István Alexander Date: Wed, 30 Dec 2020 15:56:31 +0100 Subject: 2.1.38 --- .SRCINFO | 14 +++++++------- Dockerfile | 4 ++++ PKGBUILD | 26 +++++++++++--------------- docker.sudoers | 1 + install_sh.patch | 21 +++++++++++++++++++++ prefix-fix.patch | 11 ----------- remove_xdg_cmds_from_makefile.patch | 20 -------------------- 7 files changed, 44 insertions(+), 53 deletions(-) create mode 100644 docker.sudoers create mode 100644 install_sh.patch delete mode 100644 prefix-fix.patch delete mode 100644 remove_xdg_cmds_from_makefile.patch diff --git a/.SRCINFO b/.SRCINFO index 95034d6..8251d21 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -1,19 +1,19 @@ pkgbase = anki-official-binary-bundle pkgdesc = The official binary shipped with the tested versions of the dependent libraries. - pkgver = 2.1.35 + pkgver = 2.1.38 pkgrel = 1 url = https://apps.ankiweb.net arch = x86_64 license = GNU AGPL + depends = libxkbcommon-x11 + optdepends = mpv provides = anki conflicts = anki conflicts = anki-git - source = https://apps.ankiweb.net/downloads/current/anki-2.1.35-linux-amd64.tar.bz2 - source = remove_xdg_cmds_from_makefile.patch - source = prefix-fix.patch - md5sums = d7ad8af7c1d9ddd92bb14d9d4a10ea7c - md5sums = 0eb542757f6b15d9904a53496627c76b - md5sums = 82a5d4f63bbc29e6a80043dd95973b4f + source = https://github.com/ankitects/anki/releases/download/2.1.38/anki-2.1.38-linux.tar.bz2 + source = install_sh.patch + md5sums = ab70980ca8b87a6f0fd67d05fc7a37d4 + md5sums = 0ffca54471c2b5b2a300a68a93e135db pkgname = anki-official-binary-bundle diff --git a/Dockerfile b/Dockerfile index cd7479f..f2ac91e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,8 @@ FROM archlinux RUN pacman -Sy --noconfirm sudo fakeroot base-devel RUN pacman -S --noconfirm git +RUN pacman -S --noconfirm vim +COPY docker.sudoers /etc/sudoers.d/wheel RUN useradd user +RUN usermod -a user -G wheel + diff --git a/PKGBUILD b/PKGBUILD index ca6d7d1..1ed0341 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -5,7 +5,7 @@ # Maintainer: Kuklin István pkgname=anki-official-binary-bundle -pkgver=2.1.35 +pkgver=2.1.38 pkgrel=1 epoch= pkgdesc="The official binary shipped with the tested versions of the dependent libraries." @@ -13,10 +13,10 @@ arch=('x86_64') url="https://apps.ankiweb.net" license=('GNU AGPL') groups=() -depends=() +depends=('libxkbcommon-x11') makedepends=() checkdepends=() -optdepends=() +optdepends=('mpv') provides=('anki') conflicts=('anki' 'anki-git') replaces=() @@ -24,33 +24,29 @@ backup=() options=() install= changelog= -topdirname="anki-$pkgver-linux-amd64" +topdirname="anki-$pkgver-linux" source=( - "https://apps.ankiweb.net/downloads/current/${topdirname}.tar.bz2" - "remove_xdg_cmds_from_makefile.patch" - "prefix-fix.patch" + "https://github.com/ankitects/anki/releases/download/${pkgver}/${topdirname}.tar.bz2" + "install_sh.patch" ) noextract=() -md5sums=('d7ad8af7c1d9ddd92bb14d9d4a10ea7c' - '0eb542757f6b15d9904a53496627c76b' - '82a5d4f63bbc29e6a80043dd95973b4f') +md5sums=('ab70980ca8b87a6f0fd67d05fc7a37d4' + '0ffca54471c2b5b2a300a68a93e135db') validpgpkeys=() prepare() { - cd "$srcdir" + cd "$srcdir" ln -s "$topdirname" anki - patch -p1 -i remove_xdg_cmds_from_makefile.patch - patch -p0 -i prefix-fix.patch + patch -p0 -i install_sh.patch anki/install.sh rm anki } build() { cd "$topdirname" - make } package() { cd "$topdirname" - make PREFIX="$pkgdir"/usr/ install + PREFIX="$pkgdir"/usr/ ./install.sh } 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 @@ +--- install.sh.orig 2020-12-10 06:36:44.000000000 +0100 ++++ install.sh 2020-12-30 14:54:50.834734784 +0100 +@@ -10,7 +10,7 @@ + mkdir -p ${PREFIX}/share/anki + cp -av * ${PREFIX}/share/anki/ + mkdir -p ${PREFIX}/bin +-ln -sf ${PREFIX}/share/anki/bin/Anki ${PREFIX}/bin/anki ++ln -sf /usr/share/anki/bin/Anki ${PREFIX}/bin/anki + # fix a previous packaging issue where we created this as a file + (test -f ${PREFIX}/share/applications && rm ${PREFIX}/share/applications)||true + mkdir -p ${PREFIX}/share/pixmaps +@@ -21,9 +21,4 @@ + 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 default anki.desktop application/x-ankiaddon +- + 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 @@ ---- anki/Makefile.orig -+++ anki/Makefile -@@ -10,7 +10,7 @@ - mkdir -p ${PREFIX}/share/anki - cp -av * ${PREFIX}/share/anki/ - mkdir -p ${PREFIX}/bin -- ln -sf ${PREFIX}/share/anki/bin/anki ${PREFIX}/bin/ -+ ln -sf /usr/share/anki/bin/anki ${PREFIX}/bin/ - # fix a previous packaging issue where we created this as a file - (test -f ${PREFIX}/share/applications && rm ${PREFIX}/share/applications)||true - 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 @@ -diff --git a/anki/Makefile b/anki/Makefile -index 9f10a3a..6a3539b 100644 ---- a/anki/Makefile -+++ b/anki/Makefile -@@ -20,15 +20,10 @@ install: - 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 default anki.desktop application/x-ankiaddon - @echo - @echo "Install complete. Type 'anki' to run." - - uninstall: -- -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 -- cgit v1.2.3-70-g09d2