blob: 6a60ea79192631c42a6fe74d6a0e1991835ae1c6 (
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
|
# Maintainer: Nixuge
pkgname=cider-polybar
pkgver=1.2.0
pkgrel=1
pkgdesc='A PolyBar custom script to interact with Cider - An open-source, community-oriented Apple Music'
url=https://github.com/tnguye20/cider-polybar
arch=(x86_64)
license=(GNU3)
conflicts=('cider-polybar-bin')
makedepends=('typescript' 'nodejs' 'npm' 'git')
options=(!strip)
source=("git+https://github.com/tnguye20/cider-polybar.git")
sha256sums=('SKIP')
_pkgname="cider-polybar"
build() {
cd "${srcdir}/${_pkgname}"
# Install the requirements (pkg & types) to build
npm install pkg @types/node --save-dev
# Compile
tsc -p .
}
package() {
cd "${srcdir}/${_pkgname}"
# Install the License
install -Dm644 "LICENSE" "${pkgdir}/usr/share/licenses/cider-polybar/LICENSE"
# Unset the dev tag
unset CIDER_DEV
# Package with pkg*
node node_modules/pkg/lib-es5/bin.js . \
--output "${pkgdir}/usr/local/bin/cider-polybar" \
--targets node12-linux-x64
}
#*Using node12 since for some weird reason pkg
# doesn't seem to like other versions at all
|