mirarr-app / mirarr

Mirarr, FOSS Movie App
Other
534 stars 16 forks source link

Aur package #21

Open omnigenous opened 4 months ago

wonkywolle commented 4 months ago

I made a quick PKGBUILD

# Maintainer: Wonkywolle <154385401+wonkywolle@users.noreply.github.com>
# Contributor: Wonkywolle <154385401+wonkywolle@users.noreply.github.com>

pkgname=mirarr
pkgver=9955453088
pkgrel=1
pkgdesc="A movie and TV show streaming application"
arch=('x86_64')
url="https://github.com/mirarr-app/mirarr"
license=('GPL')
depends=('flutter' 'dart')
makedepends=('git')
source=("git+https://github.com/mirarr-app/mirarr.git#commit=HEAD"
        "dot_env.example")
sha256sums=('SKIP'
            'da3706ad7ee1092d6bc19ba7877850b666a29d10331c26f033998f481e0e88fd')

pkgver() {
  cd "$srcdir/mirarr"
  git describe --tags | cut -d '-' -f 1
}

build() {
  cd "$srcdir/mirarr"
  cp "$srcdir/dot_env.example" .env
  flutter pub get
  flutter build linux --release
}

package() {
  cd "$srcdir/mirarr"

  install -d "$pkgdir/opt/$pkgname/data"
  install -d "$pkgdir/usr/lib"

  # Install binaries and data files
  install -Dm755 build/linux/x64/release/bundle/Mirarr "$pkgdir/opt/$pkgname/mirarr"

  cp -r ./build/linux/x64/release/bundle/lib/* "$pkgdir/usr/lib/"
  cp -r ./build/linux/x64/release/bundle/data/* "$pkgdir/opt/$pkgname/data/"
}

# vim:set ts=2 sw=2 et:

The package is built, can be installed but when run the screen is black and there is an error message

embedder.cc (1438): 'FlutterEngineCreateAOTData' returned 'kInvalidArguments'. Invalid ELF path specified.

** (mirarr:145743): WARNING **: 00:45:49.041: Failed to start Flutter engine: Failed to create AOT data

image

Reason, if I understood correctly, is that the install directory is not writable. If interested I can improve the PKGBUILD.

Edit: package() was not correct

mirarr-app commented 4 months ago

Will come eventually.

AriaMoradi commented 4 months ago

Trying to run the app on my Arch Linux system threw these errors and the application didn't show anything.

[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: MissingPlatformDirectoryException(Unable to get application documents directory)
#0      getApplicationDocumentsDirectory (package:path_provider/path_provider.dart:122)
<asynchronous suspension>
#1      HiveX.initFlutter (package:hive_flutter/src/hive_extensions.dart:12)
<asynchronous suspension>
#2      main (package:Mirarr/main.dart:15)
<asynchronous suspension>

Looking this up in similar projects revealed that the app depends on the xdg-user-dirs package, and installing it worked. Reference: https://github.com/flutter/gallery/issues/979#issuecomment-1693361972

Edit: This is a duplicate of #22 , this info needs to be added to README.md