summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: df9777e3767ed5af78163ecbc013d7d7a8fd9a50 (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
pkgname=ashpd-demo-git
pkgver=0.3.0
pkgrel=2.0
pkgdesc='asph-demo'
arch=('x86_64' 'aarch64')
url='https://github.com/bilelmoussaoui/ashpd'
license=('MIT')
depends=('gtk4' 'libadwaita')
makedepends=('git' 'ninja' 'meson' 'rust')
source=("$pkgname::git+$url")
sha256sums=('SKIP')

pkgver() {
	cd $pkgname
	(
		set -o pipefail

		# the -next rewrite is a completely separate git history, which does not have any tags yet
		git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
		printf "0.2.0.r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
	)
}

build() {
  cd $pkgname/ashpd-demo
  meson setup \
    -Dprefix=/usr \
    -Dbuildtype=release \
    build
  ninja -C build
}

package() {
  cd $pkgname/ashpd-demo
  DESTDIR="$pkgdir" ninja -C build install
}