summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: ad4c2a07080fd64777e19489c21f5a63337360e0 (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
# Maintainer: Gustavo Castro < gustawho [ at ] gmail [ dot ] com > 

pkgname=buho-git
pkgver=v1.1.1.r12.g2e51dd7
pkgrel=2
pkgdesc="Task and Note Keeper"
arch=('x86_64')
groups=('maui-apps')
url="https://invent.kde.org/maui/buho"
license=('GPL3')
depends=('ki18n' 'qt5-webview' 'mauikit-git' 'kio' 'syntax-highlighting' 'attica')
makedepends=('git' 'extra-cmake-modules')
provides=('buho')
conflicts=('buho')
source=("git+$url.git")
sha256sums=('SKIP')

pkgver() {
  cd "${pkgname%-git}"
  ( set -o pipefail
    git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
    printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
  )
}

prepare() {
  cd "${pkgname%-git}"
  mkdir build
}

build() {
  cd "${pkgname%-git}/build"
  cmake .. \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_INSTALL_LIBDIR=/usr/lib
  make
}
 
package() {
  cd "${pkgname%-git}/build"
  install -d "$pkgdir/usr/share/icons/hicolor/scalable/apps"
  install -Dm644 ../src/assets/buho.svg "$pkgdir/usr/share/icons/hicolor/scalable/apps/buho.svg"
  make DESTDIR="$pkgdir" install
}