summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: ea4af7dee50f6ecdc1d28e4a25fe2d3410e27fec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Maintainer: vanilla salahhachmi06@gmail.com
# Contributor: sbaerr26

pkgname=mangayomi-bin
_pkgname=mangayomi
pkgver=0.6.5
pkgrel=1
epoch=1
pkgdesc="A free and open source manga, manhwa and manhua reader for Android, Windows, Linux, and macOS."
arch=('x86_64')
url="https://github.com/kodjodevf/mangayomi"
license=('GPL3')

depends=('webkit2gtk-4.1' 'mpv' 'xdg-user-dirs' 'unzip')
provides=("${_pkgname}")
conflicts=("${_pkgname}")

source=("https://github.com/kodjodevf/mangayomi/releases/download/v${pkgver}/Mangayomi-v${pkgver}-linux.zip")

# The checksum has been generated for the source file.
sha256sums=('18c76c5b02cfa8f80bce5551a1fbccc6481bc0da35c17f4c8e9590a75946c189')

package() {
  # 1. Create the installation directory in /opt
  install -d "${pkgdir}/opt/${_pkgname}"

  # 2. Copy the application executable, data, and library files from the extracted zip.
  # The zip file extracts its contents directly into the source directory.
  cp -r "${srcdir}/mangayomi" "${srcdir}/data" "${srcdir}/lib" "${pkgdir}/opt/${_pkgname}/"

  # 3. Create a symlink so you can run it from the terminal
  install -d "${pkgdir}/usr/bin"
  ln -s "/opt/${_pkgname}/mangayomi" "${pkgdir}/usr/bin/${_pkgname}"

  # 4. Install the application icon for the .desktop file to use
  install -Dm644 "${srcdir}/data/flutter_assets/assets/app_icons/icon.png" "${pkgdir}/usr/share/pixmaps/${_pkgname}.png"

  # 5. Install the desktop entry
  install -Dm644 /dev/stdin "${pkgdir}/usr/share/applications/${_pkgname}.desktop" <<EOF
[Desktop Entry]
Name=Mangayomi
Comment=Manga, Manhwa, and Manhua Reader
Exec=${_pkgname}
Icon=${_pkgname}
Terminal=false
Type=Application
Categories=Graphics;Viewer;
EOF
}