kind: autotools
description: weston compositor
depends:
- graphics-common.bst
- input-common.bst
- mesa-common.bst
- libdrm-common.bst
- wayland-generic.bst
sources:
- kind: git
  url: upstream:weston
  track: baserock/weston-1.11.0/tegra
  ref: 2e5232b980eaa1074023a65dd7941e80b72a763c
config:
  configure-commands:
  - autoreconf -ivf
  - |
    LDFLAGS='-L/lib64 -lrt' \
    ./configure --prefix=%{prefix} --disable-xwayland \
    --disable-x11-compositor \
    --disable-wayland-compositor  --enable-egl \
    --enable-clients --enable-demo-clients-install --enable-fbdev-compositor
  install-commands:
    (>):
    - install -d "%{install-root}/usr/share/weston"
    - install -m 0644 data/*.png "%{install-root}/usr/share/weston/"
    - cp ivi-shell/weston.ini ivi-shell/ivi-shell-weston.ini
    - sed -i 's,/weston.build/data/,/usr/share/weston/,g' ivi-shell/ivi-shell-weston.ini
    - sed -i 's,/weston.build/clients/,/usr/bin/,g' ivi-shell/ivi-shell-weston.ini
    - sed -i 's,/weston.build/,/usr/libexec/,g' ivi-shell/ivi-shell-weston.ini
    - sed -i '/^\[ivi-launcher\]/,$d' ivi-shell/ivi-shell-weston.ini
    - |
      cat <<EOF >> ivi-shell/ivi-shell-weston.ini
      [ivi-launcher]
      workspace-id=0
      icon-id=4001
      icon=/usr/share/weston/icon_ivi_flower.png
      path=/usr/bin/weston-flower

      [ivi-launcher]
      workspace-id=0
      icon-id=4002
      icon=/usr/share/weston/icon_ivi_clickdot.png
      path=/usr/bin/weston-clickdot

      [ivi-launcher]
      workspace-id=1
      icon-id=4003
      icon=/usr/share/weston/icon_ivi_simple-egl.png
      path=/usr/bin/weston-simple-egl

      [ivi-launcher]
      workspace-id=1
      icon-id=4004
      icon=/usr/share/weston/icon_ivi_simple-shm.png
      path=/usr/bin/weston-simple-shm

      [ivi-launcher]
      workspace-id=2
      icon-id=4005
      icon=/usr/share/weston/icon_ivi_smoke.png
      path=/usr/bin/weston-smoke

      [ivi-launcher]
      workspace-id=2
      icon-id=4006
      icon=/usr/share/weston/terminal.png
      path=/usr/bin/EGLWLMockNavigation
      EOF
    - |
      cat <<EOF > ivi-shell/gdp-weston.ini
      [core]
      shell=ivi-shell.so

      [ivi-shell]
      ivi-module=ivi-controller.so
      ivi-input-module=ivi-input-controller.so

      cursor-theme=default
      cursor-size=32

      base-layer-id=1000
      workspace-background-layer-id=2000
      workspace-layer-id=3000
      application-layer-id=4000

      transition-duration=300
      EOF
    - install -d "%{install-root}/usr/share/doc/weston"
    - install -m 0644 ivi-shell/ivi-shell-weston.ini "%{install-root}/usr/share/doc/weston/ivi-shell-weston.ini"
    - install -m 0644 ivi-shell/gdp-weston.ini "%{install-root}/usr/share/doc/weston/gdp-weston.ini"
