summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: e16bbb28e5676297855130167f4c54bebf973d51 (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
# Maintainer: Dee.H.Y <dongfengweixiao at hotmail dot com>
pkgname=dahliaos-clock-git
pkgver=r39.5889188
pkgrel=2
pkgdesc="dahliaOS built-in clock and alarms application."
arch=('x86_64')
url="https://github.com/dahliaOS/clock"
license=('Apache')
depends=('gtk3')
makedepends=('git' 'cmake' 'ninja' 'imagemagick' 'clang>=11.0.0')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
source=('git+https://github.com/dahliaOS/clock.git'
  "${pkgname%-git}.desktop"
  "https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_3.10.5-stable.tar.xz")
sha256sums=('SKIP'
  '0f974e8e9c49f61aa068254fe7fc31b1b38e1382011176f71f5da6c6318fde51'
  '86643cbfe8acf766a226a6cd4625bb8301c2601ea9bb825448318c8669b72a13')

pkgver() {
  cd "$srcdir/clock"
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
  cd "$srcdir/clock"
  $srcdir/flutter/bin/flutter build linux
}

package() {
  cd "$srcdir/clock/build/linux/x64/release/bundle"
  install -d "$pkgdir/opt/${pkgname%-git}"
  cp -r * "$pkgdir/opt/${pkgname%-git}"

  install -d "$pkgdir/usr/bin"
  ln -s "/opt/${pkgname%-git}/clock" "$pkgdir/usr/bin/${pkgname%-git}"

  install -Dm644 "$srcdir/clock/dahliaOS/clock.png" "$pkgdir/usr/share/pixmaps/${pkgname%-git}.png"
  install -Dm644 "$srcdir/${pkgname%-git}.desktop" -t "$pkgdir/usr/share/applications"
}