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

pkgname=ruffle-git
pkgver=0.1.0.7599.gee52ce329
pkgrel=1
pkgdesc="A Flash Player emulator written in Rust"
arch=(x86_64)
url="https://ruffle.rs/"
license=(Apache MIT)
depends=(alsa-lib libxcb  gtk3)
makedepends=(git cargo python jdk-openjdk at-spi2-core)
provides=(ruffle)
conflicts=(ruffle)
source=("git+https://github.com/ruffle-rs/ruffle.git")
sha256sums=('SKIP')
options=(!lto)

pkgver() {
  cd "ruffle/desktop"
  printf "%s.%s.g%s" $(awk '/^version/ {gsub(/"/, ""); print $3}' Cargo.toml) "$(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 --all-features
}

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
}