summaryrefslogtreecommitdiffstats
path: root/anki-official-binary-bundle
diff options
context:
space:
mode:
authorYigit Sever2023-06-22 16:21:31 +0300
committerYigit Sever2023-06-22 16:21:31 +0300
commit972a5f43efec8469c5958b1d1ad243e045b8207d (patch)
treed780c0815a7d2072c8b4161cc83f63db3c60d050 /anki-official-binary-bundle
parent0e211b1fd4030cb7cf8563daa9f447b081fbd458 (diff)
parent856cf628225ecfbdb0ceb5dd0e8ce741d43799db (diff)
downloadpackages-972a5f43efec8469c5958b1d1ad243e045b8207d.tar.gz
packages-972a5f43efec8469c5958b1d1ad243e045b8207d.tar.bz2
packages-972a5f43efec8469c5958b1d1ad243e045b8207d.zip
Add 'anki-official-binary-bundle/' from commit '856cf628225ecfbdb0ceb5dd0e8ce741d43799db'
git-subtree-dir: anki-official-binary-bundle git-subtree-mainline: 0e211b1fd4030cb7cf8563daa9f447b081fbd458 git-subtree-split: 856cf628225ecfbdb0ceb5dd0e8ce741d43799db
Diffstat (limited to 'anki-official-binary-bundle')
-rw-r--r--anki-official-binary-bundle/.SRCINFO20
-rw-r--r--anki-official-binary-bundle/.gitignore4
-rw-r--r--anki-official-binary-bundle/PKGBUILD36
-rw-r--r--anki-official-binary-bundle/anki-official-binary-bundle.install9
-rw-r--r--anki-official-binary-bundle/install_sh.patch27
-rwxr-xr-xanki-official-binary-bundle/update_srcinfo.sh9
6 files changed, 105 insertions, 0 deletions
diff --git a/anki-official-binary-bundle/.SRCINFO b/anki-official-binary-bundle/.SRCINFO
new file mode 100644
index 0000000..effb064
--- /dev/null
+++ b/anki-official-binary-bundle/.SRCINFO
@@ -0,0 +1,20 @@
1pkgbase = anki-official-binary-bundle
2 pkgdesc = The official binary shipped with the tested versions of the dependent libraries.
3 pkgver = 2.1.63
4 pkgrel = 1
5 url = https://github.com/ankitects/anki
6 install = anki-official-binary-bundle.install
7 arch = x86_64
8 license = AGPL
9 depends = libxkbcommon-x11
10 optdepends = mpv
11 provides = anki
12 conflicts = anki
13 conflicts = anki-bin
14 conflicts = anki-git
15 source = https://github.com/ankitects/anki/releases/download/2.1.63/anki-2.1.63-linux-qt6.tar.zst
16 source = install_sh.patch
17 sha256sums = 022a0b9b3f27bebbd6d5ce5ee5c61fb3fcc4f98a80e03fd7d8651e92e80e846a
18 sha256sums = 991297cb02434d753f55980205a22971ed98655b0f62f0104ae4692155355d8c
19
20pkgname = anki-official-binary-bundle
diff --git a/anki-official-binary-bundle/.gitignore b/anki-official-binary-bundle/.gitignore
new file mode 100644
index 0000000..2bdc6ae
--- /dev/null
+++ b/anki-official-binary-bundle/.gitignore
@@ -0,0 +1,4 @@
1*.tar.bz2
2*.tar.xz
3src
4pkg
diff --git a/anki-official-binary-bundle/PKGBUILD b/anki-official-binary-bundle/PKGBUILD
new file mode 100644
index 0000000..364354b
--- /dev/null
+++ b/anki-official-binary-bundle/PKGBUILD
@@ -0,0 +1,36 @@
1# Maintainer: Kuklin István <kuklinistvan@zoho.com>
2# Maintainer: Aria Moradi <aria.moradi007 at gmail dot com>
3
4
5pkgname=anki-official-binary-bundle
6pkgver=2.1.63
7_pkgname="anki-$pkgver-linux-qt6"
8pkgrel=1
9epoch=
10pkgdesc="The official binary shipped with the tested versions of the dependent libraries."
11arch=('x86_64')
12url="https://github.com/ankitects/anki"
13license=('AGPL')
14groups=()
15depends=('libxkbcommon-x11')
16makedepends=()
17optdepends=('mpv')
18provides=('anki')
19conflicts=('anki' 'anki-bin' 'anki-git')
20replaces=()
21options=()
22install=$pkgname.install
23source=("https://github.com/ankitects/anki/releases/download/${pkgver}/${_pkgname}.tar.zst"
24 "install_sh.patch")
25sha256sums=('022a0b9b3f27bebbd6d5ce5ee5c61fb3fcc4f98a80e03fd7d8651e92e80e846a'
26 '991297cb02434d753f55980205a22971ed98655b0f62f0104ae4692155355d8c')
27
28prepare() {
29 cd "$srcdir/$_pkgname"
30 patch install.sh ../install_sh.patch
31}
32
33package() {
34 cd "$_pkgname"
35 PREFIX="$pkgdir/usr/" ./install.sh
36}
diff --git a/anki-official-binary-bundle/anki-official-binary-bundle.install b/anki-official-binary-bundle/anki-official-binary-bundle.install
new file mode 100644
index 0000000..e54a631
--- /dev/null
+++ b/anki-official-binary-bundle/anki-official-binary-bundle.install
@@ -0,0 +1,9 @@
1post_install () {
2 xdg-mime install /usr/share/anki/anki.xml --novendor
3 xdg-mime default /usr/share/applications/anki.desktop application/x-colpkg
4 xdg-mime default /usr/share/applications/anki.desktop application/x-apkg
5}
6
7pre_remove() {
8 xdg-mime uninstall /usr/share/anki/anki.xml
9}
diff --git a/anki-official-binary-bundle/install_sh.patch b/anki-official-binary-bundle/install_sh.patch
new file mode 100644
index 0000000..e76e1af
--- /dev/null
+++ b/anki-official-binary-bundle/install_sh.patch
@@ -0,0 +1,27 @@
1--- install.sh.orig 2022-06-06 18:29:11.117752422 -0500
2+++ install.sh 2022-06-06 18:40:38.153466913 -0500
3@@ -13,9 +13,10 @@
4
5 rm -rf "$PREFIX"/share/anki "$PREFIX"/bin/anki
6 mkdir -p "$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/
10 mkdir -p "$PREFIX"/bin
11-ln -sf "$PREFIX"/share/anki/anki "$PREFIX"/bin/anki
12+ln -sf ../share/anki/anki "$PREFIX"/bin/anki
13 # fix a previous packaging issue where we created this as a file
14 (test -f "$PREFIX"/share/applications && rm "$PREFIX"/share/applications)||true
15 mkdir -p "$PREFIX"/share/pixmaps
16@@ -26,11 +26,4 @@
17 mv -Z anki.desktop "$PREFIX"/share/applications/;\
18 mv -Z anki.1 "$PREFIX"/share/man/man1/)
19
20-xdg-mime install anki.xml --novendor
21-xdg-mime default anki.desktop application/x-colpkg
22-xdg-mime default anki.desktop application/x-apkg
23-xdg-mime default anki.desktop application/x-ankiaddon
24-
25-rm install.sh
26-
27 echo "Install complete. Type 'anki' to run."
diff --git a/anki-official-binary-bundle/update_srcinfo.sh b/anki-official-binary-bundle/update_srcinfo.sh
new file mode 100755
index 0000000..d34ac7d
--- /dev/null
+++ b/anki-official-binary-bundle/update_srcinfo.sh
@@ -0,0 +1,9 @@
1#!/bin/sh
2
3DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
4
5echo Updating .SRCINFO
6
7cd "$DIR"
8makepkg --printsrcinfo > .SRCINFO
9git add .SRCINFO