summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 748acbbd9899042ebbc48a837927c30dcae373ca (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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# Maintainer: Matt Quintanilla <matt @ matt quintanilla .xyz>
# Maintainer: claymorwan <claymorwan@fembois.dev>

_pkgname="shijima-qt"

pkgname='shijima-qt-bin'
pkgver='0.1.0'
pkgrel='2'
pkgdesc='Cross-platform shimeji simulation Desktop pets on any device.'
arch=(x86_64 aarch64)
url='https://github.com/pixelomer/Shijima-Qt'
license=('GPL-3.0-only')
depends=(
  'qt6-base'
  'qt6-multimedia'
)
makedepends=('imagemagick')
provides=("$_pkgname")
conflicts=("$_pkgname")
options=("!strip" "!debug")
source=(
  "$_pkgname.ico::https://raw.githubusercontent.com/pixelomer/Shijima-Qt/refs/heads/main/$_pkgname.ico"
  "LICENSE::$url/blob/main/LICENSE"
)
source_x86_64=("$_pkgname.zip::$url/releases/download/v$pkgver/release-linux-x86_64.zip")
source_aarch64=("$_pkgname.zip::$url/releases/download/v$pkgver/release-linux-arm64.zip")

sha256sums=('a142a1a0802c5209a9fc306781c48a8e96b9c2dab5b6f50a9c7080d634c3c188'
            'SKIP')
sha256sums_x86_64=('dec313e5180ce11eb397158ed8c5f92af5921a3f72cc8352002a9d877bc34403')
sha256sums_aarch64=('dec313e5180ce11eb397158ed8c5f92af5921a3f72cc8352002a9d877bc34403')

build() {
  cd "$srcdir"

  # Convert image
	magick "$_pkgname.ico" "$_pkgname.png"
}

package() {
  cd "$srcdir"
  install -d "$pkgdir/usr/bin/"
  install -d "$pkgdir/opt/$_pkgname"

  install -Dm755 "Shijima-Qt.AppImage" "$pkgdir/opt/$_pkgname/Shijima-Qt-x86_64.AppImage"
  install -Dm755 "$_pkgname" "$pkgdir/opt/$_pkgname/$_pkgname"
  install -Dm755 "libunarr.so.1" "$pkgdir/opt/$_pkgname/libunarr.so.1"

  ln -s "/opt/$_pkgname/Shijima-Qt-x86_64.AppImage" "$pkgdir/usr/bin/$_pkgname"
  
  # Icon
  install -D "$_pkgname.png" "$pkgdir/usr/share/icons/$_pkgname.png"

  # Licences
  install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/$_pkgname/LICENSE"
  cd licenses
	for _file in *; do
		if [ -f "$_file" ]; then
			install -Dm644 $_file "$pkgdir/usr/share/licenses/$_pkgname/$_file"
		fi
	done


  install -Dm0644 /dev/stdin $pkgdir/usr/share/applications/$_pkgname.desktop << EOF
[Desktop Entry]
Name=Shijima-Qt
Exec=$_pkgname
Icon=$_pkgname
Terminal=false
Type=Application
Comment=Cross-platform shimeji simulation for desktop
EOF
}