blob: a1bdc8d50b683751f7bd5b1370b1005541ff7724 (
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
|
# Maintainer: David Cooper <david@dtcooper.com>
pkgname=tomato-radio-automation
_pkgname="${pkgname}"
pkgver=0.12.6
pkgrel=1
pkgdesc='Tomato Radio Automation desktop client. Dead simple radio ads.'
arch=('x86_64' 'aarch64')
url='https://dtcooper.github.io/tomato/'
license=('MIT')
depends=('gtk3' 'nss' 'alsa-lib')
makedepends=('nodejs' 'npm' 'git' 'jq')
options=('!debug')
source=(
"tomato-radio-automation-${pkgver}.tar.gz::https://github.com/dtcooper/tomato/archive/refs/tags/v${pkgver}.tar.gz"
)
sha256sums=('6f81ff237b33f6c82ef8071309772a3aa49ec6d4275302aaa0ce3bcbc049cf16')
_repodir="tomato-${pkgver}"
_shortver() {
echo "${pkgver}"
}
_longver() {
echo "${pkgver}"
}
# Source below the exact same as tomato-radio-automation-git
prepare() {
cd "${_repodir}/client"
npm install
cp "scripts/debian/tomato.desktop" "${srcdir}/${_pkgname}.desktop"
sed "s/^\(\(Exec\|Icon\)=.*\)tomato/\1${_pkgname}/" scripts/debian/tomato.desktop > "${srcdir}/${_pkgname}.desktop"
}
build() {
cd "${_repodir}/client"
jq '.version = "'"$(_shortver)"'"' package.json > package.json.tmp
mv -v package.json.tmp package.json
TOMATO_VERSION="$(_longver) (arch)" npm run package
mv -v "out/Tomato-linux-"* "out/${_pkgname}"
chmod 0755 "out/${_pkgname}"
}
package() {
install -dm755 "${pkgdir}/opt/"
cp -r "${srcdir}/${_repodir}/client/out/${_pkgname}" "${pkgdir}/opt/"
install -Dm755 "${srcdir}/${_pkgname}.desktop" "${pkgdir}/usr/share/applications/${_pkgname}.desktop"
install -Dm644 "${srcdir}/${_repodir}/client/assets/icons/tomato.png" "${pkgdir}/usr/share/pixmaps/${_pkgname}.png"
install -Dm644 "${srcdir}/${_repodir}/LICENSE" "${pkgdir}/usr/share/licenses/tomato-radio-automation/LICENSE"
install -dm755 "${pkgdir}/usr/bin/"
ln -s "/opt/${_pkgname}/tomato" "${pkgdir}/usr/bin/${_pkgname}"
}
|