summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 907ac0c22ab5e0762f8323bbefb75564200d0c79 (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
# Maintainer: begin-theadventure <begin-thecontact.ncncb at dralias dot com>

pkgname=weather-vala-git
pkgver=r16.7a20233
pkgrel=1
pkgdesc='Application for viewing the current weather (latest commit)'
url="https://github.com/alexkdeveloper/weather"
arch=('x86_64')
license=('GPL3')
conflicts=("weather-vala")
provides=("weather-vala")
depends=('geoclue' 'libadwaita' 'libgweather-4')
makedepends=('git' 'meson' 'vala')
checkdepends=('appstream-glib')
source=("git+$url.git")
sha256sums=('SKIP')

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

build() {
  arch-meson weather build
  meson compile -C build
}

check() {
  meson test -C build --print-errorlogs || :
}

package() {
  DESTDIR="$pkgdir" meson install -C build
  cd "$pkgdir"
  mv usr/bin/weather usr/bin/weather-vala
  sed -i -E "s|Exec=weather|Exec=weather-vala|g" usr/share/applications/io.github.alexkdeveloper.weather.desktop
}