summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 6a235fbe3e72c8e8c10420d887e61b3e63f3bea1 (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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
# Maintainer: Nikos Toutountzoglou <nikos dot toutou at protonmail dot com>

pkgbase=superconductor
pkgname=('superconductor' 'tsr-bridge')
pkgver=0.11.3
pkgrel=3
_appname="SuperConductor-$pkgver"
arch=('x86_64')
url="https://github.com/SuperFlyTV/SuperConductor"
license=('LicenseRef-unknown' 'AGPL-3.0-only')
makedepends=(
  'alsa-lib'
  'at-spi2-core'
  'cairo'
  'dbus'
  'glib2'
  'gtk3'
  'hicolor-icon-theme'
  'libcups'
  'libdrm'
  'libvips'
  'libx11'
  'libxcb'
  'libxcomposite'
  'libxdamage'
  'libxext'
  'libxfixes'
  'libxkbcommon'
  'libxrandr'
  'mesa'
  'nodejs-lts-hydrogen'
  'nspr'
  'nss'
  'pango'
  'python-setuptools'
  'yarn'
)
options=(!emptydirs)
source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/refs/tags/v${pkgver}.tar.gz"
        'superconductor.desktop'
        'tsr-bridge.desktop')
sha256sums=('b3ce1cfaca92a21bdd20ff20b5ec32a109f5a9f93e7ffdcd29a87c2ab0a18590'
            '40968067cd055add4f6cfbffa4ca52155abc5771a44df2fca548d691b433bb3a'
            '7e3f99900f3feb6f4d9bae385adaa42a6aae46a8ac8ebcd2bd69b9dfac5e93ea')

prepare() {
  cd ${_appname}
  # Workaround for 'husky - .git can't be found'
  mkdir -p .git
  # Installs all dependencies, including Lerna.
  yarn install --cache-folder "${srcdir}/yarn-cache"
}

build() {
  cd ${_appname}
  # Compile Typescript, run Webpack, etc:
  yarn build
  # Make binaries for the SuperConductor UI and tsr-bridge. Must have run "yarn build" first.
  # The SuperConductor UI binary will be located at apps/app/dist.
  # The tsr-bridge binary will be located at apps/tsr-bridge/dist.
  # This command should work on all platforms (Windows, macOS, and Linux).
  yarn build:binary
}

package_superconductor() {
  pkgdesc='A playout client that will let you control CasparCG Server, BMD ATEM, OBS Studio, vMix, OSC-compatible devices, HTTP (REST)-compatible devices, and more'
  depends=(
    'alsa-lib'
    'at-spi2-core'
    'cairo'
    'dbus'
    'expat'
    'gcc-libs'
    'glib2'
    'glibc'
    'gtk3'
    'hicolor-icon-theme'
    'libcups'
    'libdrm'
    'libvips'
    'libx11'
    'libxcb'
    'libxcomposite'
    'libxdamage'
    'libxext'
    'libxfixes'
    'libxkbcommon'
    'libxrandr'
    'mesa'
    'nspr'
    'nss'
    'pango'
    'python'
  )
  optdepends=('tsr-bridge: External application which handles the actual playout and control of the connected devices')
  provides=('superconductor')
  conflicts=('superconductor')

  install -d "${pkgdir}/usr/bin" "${pkgdir}/usr/share"
  # Install SuperConductor
  cp -a --no-preserve='ownership' "${_appname}/apps/app/dist/linux-unpacked" "${pkgdir}/usr/share/${pkgname}"
  ln -sf "/usr/share/${pkgname}/${pkgname}" "${pkgdir}/usr/bin/${pkgname}"

  # Install icons
  for i in 16 24 32 48 64 96 128 256 512 1024; do
    install -Dm 644 "${_appname}/apps/app/build/icons/${i}x${i}.png" \
      "${pkgdir}/usr/share/icons/hicolor/${i}x${i}/apps/${pkgname}.png"
  done

  # Install desktop files, license
  install -Dm644 ${pkgname}.desktop -t "${pkgdir}/usr/share/applications"
  install -Dm644 ${_appname}/LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
}

package_tsr-bridge() {
  pkgdesc='Handles the actual playout and control of the connected devices'
  depends=(
    'alsa-lib'
    'at-spi2-core'
    'cairo'
    'dbus'
    'expat'
    'gcc-libs'
    'glib2'
    'glibc'
    'gtk3'
    'hicolor-icon-theme'
    'libcups'
    'libdrm'
    'libvips'
    'libx11'
    'libxcb'
    'libxcomposite'
    'libxdamage'
    'libxext'
    'libxfixes'
    'libxkbcommon'
    'libxrandr'
    'mesa'
    'nspr'
    'nss'
    'pango'
    'python'
  )
  provides=('tsr-bridge')
  conflicts=('tsr-bridge')

  install -d "${pkgdir}/usr/bin" "${pkgdir}/usr/share"
  # Install TSR-Bridge
  cp -a --no-preserve='ownership' "${_appname}/apps/tsr-bridge/dist/linux-unpacked" "${pkgdir}/usr/share/tsr-bridge"
  ln -sf "/usr/share/tsr-bridge/tsr-bridge" "${pkgdir}/usr/bin/tsr-bridge"

  # Install icons
  install -Dm 644 "${_appname}/apps/tsr-bridge/assets/tray.png" \
    "${pkgdir}/usr/share/icons/hicolor/48x48/apps/tsr-bridge.png"

  # Install desktop files, license
  install -Dm644 tsr-bridge.desktop -t "${pkgdir}/usr/share/applications"
  install -Dm644 ${_appname}/LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
}

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