summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 11628a18509e41fa93428dfba019c5a180f57978 (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
# Maintainer: Fabio 'Lolix' Loli <fabio.loli@disroot.org> -> https://github.com/FabioLolix
# Contributor: quininer

pkgname=ruffle-git
pkgver=r10589.673aa78f9
pkgrel=2
epoch=1
pkgdesc="A Flash Player emulator written in Rust"
arch=(x86_64 aarch64)
url="https://ruffle.rs/"
license=(Apache MIT)
depends=(alsa-lib gtk3

         # namcap implicit depends
         glibc gcc-libs glib2 zlib openssl hicolor-icon-theme)
makedepends=(git cargo clang python jdk-openjdk at-spi2-core)
provides=(ruffle)
conflicts=(ruffle)
options=(!lto)
source=("git+https://github.com/ruffle-rs/ruffle.git")
sha256sums=('SKIP')

pkgver() {
  cd "ruffle/desktop"
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

prepare() {
  cd "ruffle/desktop"
  cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
}

build(){
  cd "ruffle/desktop"
  cargo build --frozen --release
}

package() {
  cd ruffle
  install -D -m755 "target/release/ruffle_desktop" "$pkgdir/usr/bin/ruffle"
  install -Dm 644 LICENSE.md -t "$pkgdir/usr/share/licenses/$pkgname/"

  for s in 16x16 32x32 128x128 256x256 512x512; do
    install -Dm0644 "desktop/assets/Assets.xcassets/RuffleMacIcon.iconset/icon_$s.png" "${pkgdir}/usr/share/icons/hicolor/$s/apps/ruffle.png"
  done

  install -d "${pkgdir}/usr/share/applications/"
 cat > "${pkgdir}/usr/share/applications/ruffle.desktop" << _EOD
[Desktop Entry]
Type=Application
Name=Ruffle
GenericName=Ruffle
Comment=Player for using content created on the Adobe Flash platform
Exec=ruffle
Icon=ruffle
Terminal=false
StartupNotify=false
Categories=Audio;AudioVideo;Graphics;GTK;Player;Video;Viewer;
MimeType=application/x-shockwave-flash;
_EOD
}