diff options
author | Kuklin István | 2019-03-04 09:14:01 +0100 |
---|---|---|
committer | Kuklin István | 2019-03-04 09:44:14 +0100 |
commit | 452f5544c43a2417efc5a8a792e3cd493debcc22 (patch) | |
tree | f7f2ba6cd8518b0cc0fcb4b70cb31905c09f3915 | |
download | packages-452f5544c43a2417efc5a8a792e3cd493debcc22.tar.gz packages-452f5544c43a2417efc5a8a792e3cd493debcc22.tar.bz2 packages-452f5544c43a2417efc5a8a792e3cd493debcc22.zip |
It works!
Mandatory fields, .SRCINFO
-rw-r--r-- | .SRCINFO | 16 | ||||
-rw-r--r-- | PKGBUILD | 51 | ||||
-rw-r--r-- | anki-official-binary-bundle.install | 9 | ||||
-rw-r--r-- | remove_xdg_cmds_from_makefile.patch | 21 |
4 files changed, 97 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 0000000..23f4cfa --- /dev/null +++ b/.SRCINFO | |||
@@ -0,0 +1,16 @@ | |||
1 | pkgbase = anki-official-binary-bundle | ||
2 | pkgdesc = The official binary shipped with the tested versions of the dependent libraries. | ||
3 | pkgver = 2.1.9 | ||
4 | pkgrel = 1 | ||
5 | url = https://apps.ankiweb.net | ||
6 | arch = x86_64 | ||
7 | license = GNU AGPL | ||
8 | provides = anki | ||
9 | conflicts = anki-git | ||
10 | source = https://apps.ankiweb.net/downloads/current/anki-2.1.9-linux-amd64.tar.bz2 | ||
11 | source = remove_xdg_cmds_from_makefile.patch | ||
12 | md5sums = 8cc5bb80efc5dac2e9dc9ee802924e24 | ||
13 | md5sums = a7e473f132a4fecd9cb77ac9c8530f5f | ||
14 | |||
15 | pkgname = anki-official-binary-bundle | ||
16 | |||
diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 0000000..b8be4c2 --- /dev/null +++ b/PKGBUILD | |||
@@ -0,0 +1,51 @@ | |||
1 | # This is an example PKGBUILD file. Use this as a start to creating your own, | ||
2 | # and remove these comments. For more information, see 'man PKGBUILD'. | ||
3 | # NOTE: Please fill out the license field for your package! If it is unknown, | ||
4 | # then please put 'unknown'. | ||
5 | |||
6 | # Maintainer: Kuklin István <kuklinistvan@zoho.com> | ||
7 | pkgname=anki-official-binary-bundle | ||
8 | pkgver=2.1.9 | ||
9 | pkgrel=1 | ||
10 | epoch= | ||
11 | pkgdesc="The official binary shipped with the tested versions of the dependent libraries." | ||
12 | arch=('x86_64') | ||
13 | url="https://apps.ankiweb.net" | ||
14 | license=('GNU AGPL') | ||
15 | groups=() | ||
16 | depends=() | ||
17 | makedepends=() | ||
18 | checkdepends=() | ||
19 | optdepends=() | ||
20 | provides=('anki') | ||
21 | conflicts=('anki-git') | ||
22 | replaces=() | ||
23 | backup=() | ||
24 | options=() | ||
25 | install= | ||
26 | changelog= | ||
27 | topdirname="anki-$pkgver-linux-amd64" | ||
28 | source=("https://apps.ankiweb.net/downloads/current/${topdirname}.tar.bz2" "remove_xdg_cmds_from_makefile.patch") | ||
29 | noextract=() | ||
30 | md5sums=('8cc5bb80efc5dac2e9dc9ee802924e24' 'a7e473f132a4fecd9cb77ac9c8530f5f') | ||
31 | validpgpkeys=() | ||
32 | |||
33 | prepare() { | ||
34 | cd "$srcdir" | ||
35 | patch -p0 -i remove_xdg_cmds_from_makefile.patch | ||
36 | } | ||
37 | |||
38 | build() { | ||
39 | cd "$topdirname" | ||
40 | make | ||
41 | } | ||
42 | |||
43 | # check() { | ||
44 | # cd "$topdirname" | ||
45 | # make -k check | ||
46 | # } | ||
47 | |||
48 | package() { | ||
49 | cd "$topdirname" | ||
50 | make PREFIX="$pkgdir/usr" install | ||
51 | } | ||
diff --git a/anki-official-binary-bundle.install b/anki-official-binary-bundle.install new file mode 100644 index 0000000..e54a631 --- /dev/null +++ b/anki-official-binary-bundle.install | |||
@@ -0,0 +1,9 @@ | |||
1 | post_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 | |||
7 | pre_remove() { | ||
8 | xdg-mime uninstall /usr/share/anki/anki.xml | ||
9 | } | ||
diff --git a/remove_xdg_cmds_from_makefile.patch b/remove_xdg_cmds_from_makefile.patch new file mode 100644 index 0000000..99f5065 --- /dev/null +++ b/remove_xdg_cmds_from_makefile.patch | |||
@@ -0,0 +1,21 @@ | |||
1 | --- anki-2.1.9-linux-amd64/Makefile.old 2019-02-20 05:54:05.000000000 +0100 | ||
2 | +++ anki-2.1.9-linux-amd64/Makefile 2019-03-04 09:02:18.385431498 +0100 | ||
3 | @@ -20,14 +20,14 @@ | ||
4 | mv anki.xpm anki.png ${PREFIX}/share/pixmaps/;\ | ||
5 | mv anki.desktop ${PREFIX}/share/applications/;\ | ||
6 | mv anki.1 ${PREFIX}/share/man/man1/) | ||
7 | - xdg-mime install anki.xml --novendor | ||
8 | - xdg-mime default anki.desktop application/x-colpkg | ||
9 | - xdg-mime default anki.desktop application/x-apkg | ||
10 | +# xdg-mime install anki.xml --novendor | ||
11 | +# xdg-mime default anki.desktop application/x-colpkg | ||
12 | +# xdg-mime default anki.desktop application/x-apkg | ||
13 | @echo | ||
14 | @echo "Install complete. Type 'anki' to run." | ||
15 | |||
16 | uninstall: | ||
17 | - -xdg-mime uninstall ${PREFIX}/share/anki/anki.xml | ||
18 | +# -xdg-mime uninstall ${PREFIX}/share/anki/anki.xml | ||
19 | rm -rf ${PREFIX}/share/anki | ||
20 | rm -rf ${PREFIX}/bin/anki | ||
21 | rm -rf ${PREFIX}/share/pixmaps/anki.xpm | ||