summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: e2b309edba18317ea0854461b99160db2917dd44 (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
# Maintainer: Omansh Krishn omansh@duck.com

pkgname=bloomeetunes-git
_pkgname=bloomeetunes
pkgver=2.9.9+138.r0.g6455809
pkgrel=2
_flutterver=3.24.0
pkgdesc='🌸Bloomee is a cross-platform music app designed to bring you ad-free tunes from various sources. 🌼🎵'
arch=('x86_64')
url='https://github.com/HemantKArya/BloomeeTunes'
license=('GPL2')
depends=('gtk3' 'pango' 'harfbuzz' 'at-spi2-core' 'cairo' 'gdk-pixbuf2' 'glib2' 'gcc-libs')
makedepends=('fvm' 'curl' 'git' 'unzip' 'xz' 'glu' 'ninja' 'cmake' 'mpv' 'clang')
provides=('bloomeetunes')
conflicts=('bloomeetunes-bin')
options=(!debug)


source=("${_pkgname}::git+https://github.com/HemantKArya/BloomeeTunes.git"
        "${_pkgname}.desktop")

sha512sums=('SKIP'
            'bfd5f754fe1a87f23872520a1c15e4dea3482bbaa81d4edc408e9a474ebd28faaff6e70cc79e36e5ee0598f36bdf60a657ee8fe39b9b243832542f8e9532db7e')

pkgver() {
    cd "${srcdir}/${_pkgname}"
    git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

prepare() {
    cd "${srcdir}/${_pkgname}"
    fvm install "${_flutterver}"
    fvm use "${_flutterver}" -f
    fvm flutter pub get
    echo "CLIENT_ID = XXXXX\nCLIENT_SECRET = XXXX EOF" > assets/.env
}

build() {
  cd "${srcdir}/${_pkgname}" 
  fvm flutter build linux --release
}

package() {
  install -dm755 "${pkgdir}/opt"
  install -dm755 "${pkgdir}/usr/share/applications"
  
  install -Dm755 "${srcdir}/${_pkgname}/build/linux/x64/release/bundle/bloomee" "${pkgdir}/opt/bloomeetunes/bloomee"
  cp --preserve=mode -r "${srcdir}/${_pkgname}/build/linux/x64/release/bundle/data" "${pkgdir}/opt/bloomeetunes/data"
  cp --preserve=mode -r "${srcdir}/${_pkgname}/build/linux/x64/release/bundle/lib" "${pkgdir}/opt/bloomeetunes/lib"

  install -m644 "${_pkgname}.desktop" "${pkgdir}/usr/share/applications/"
  
  cleanup
}

cleanup() {
  cd "${srcdir}/${_pkgname}"
  fvm flutter clean
  fvm remove "${_flutterver}"
  rm -rf ~/fvm/cache.git
}