summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: bc84243d302e9cda4164c4cdc348051a6fa716d7 (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
# Maintainer: Lewis Donaldson <lewdon0001@gmail.com>
pkgname=lyrwal
pkgver=1.0.10
pkgrel=1
pkgdesc="A program to set the wallpaper to random song lyrics"
arch=('any')
url="https://github.com/ZerimGH/lyrwal"
license=('MIT')
depends=('python' 'freetype2')
makedepends=('make' 'gcc' 'python')
source=("git+https://github.com/ZerimGH/lyrwal.git")
sha256sums=('SKIP')

prepare() {
  cd "$srcdir/lyrwal"
  git submodule update --init --recursive
}

build() {
  cd "$srcdir/lyrwal"

  make all -C textwal

  python -m venv venv

  venv/bin/pip install --upgrade pip
  venv/bin/pip install -r py/requirements.txt
}

package() {
  cd "$srcdir/lyrwal"

  install -Dm755 lyrwal.sh \
    "$pkgdir/usr/bin/lyrwal"

  install -Dm755 textwal/build/textwal \
    "$pkgdir/usr/bin/textwal"

  install -d "$pkgdir/usr/lib/lyrwal"
  cp -r py "$pkgdir/usr/lib/lyrwal/"

  cp -r venv "$pkgdir/usr/lib/lyrwal/venv"

  install -Dm644 LICENSE \
    "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}