-
Notifications
You must be signed in to change notification settings - Fork 0
/
PKGBUILD
61 lines (49 loc) · 1.71 KB
/
PKGBUILD
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
# Maintainer: Bims <[email protected]>
pkgname=miru-app-git
_pkgname=miru-app
pkgver=275.287a924
pkgrel=1
pkgdesc="A versatile application that is free, open-source, and supports extension sources for videos, comics, and novels, available on Android, Windows, and Web platforms."
arch=("x86_64")
url="https://github.com/miru-project/${_pkgname}"
license=("APGL-3.0")
provides=($_pkgname)
conflicts=($_pkgname)
replaces=($_pkgname)
depends=("webkit2gtk-4.1" "quickjs-bin")
makedepends=("git" "flutter" "clang" "ninja" "pkgconf")
source=("git+https://github.com/miru-project/$_pkgname.git")
md5sums=('SKIP')
pkgver() {
cd $_pkgname
echo $(git rev-list --count dev).$(git rev-parse --short dev)
}
prepare() {
cd $_pkgname
# Prepare Flutter
flutter --no-version-check config --no-analytics
flutter --no-version-check config --enable-linux-desktop
flutter --no-version-check pub get
}
build() {
cd $_pkgname
# Build the Flutter application
flutter --no-version-check build linux --release
}
package() {
# Create missing directories
mkdir -p "$pkgdir/usr/share/icons"
mkdir -p "$pkgdir/usr/share/applications"
# Move icon and desktop entry to /usr/share
cp "$_pkgname/assets/icon/logo.png" "$pkgdir/usr/share/icons/miru.png"
cp "../Miru.desktop" "$pkgdir/usr/share/applications/Miru.desktop"
cd "$_pkgname/build/linux/x64/release/bundle/"
# Create target directories
install -dm 755 "$pkgdir/opt/$_pkgname" "$pkgdir/usr/bin/"
# Copy the bundled output to /opt
cp -rdp --no-preserve=ownership . "$pkgdir/opt/$_pkgname/"
# Add license
cp "$srcdir/$_pkgname/LICENSE" "$pkgdir/usr/bin/LICENSE"
# Symlink to /usr/bin so the app can be found in PATH
ln -s "/opt/$_pkgname/miru" "$pkgdir/usr/bin/$_pkgname"
}