summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: a8ebc04c6862a16cdb44ae488aba669a2586169d (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
# Maintainer:
# Contributor: Mark Wagie <mark.wagie at proton dot me>

_pkgname="sticky"
pkgname="$_pkgname-git"
pkgver=1.21.r0.gf713dc5
pkgrel=1
pkgdesc="A sticky notes app for the Linux desktop"
url="https://github.com/collinss/sticky"
license=('GPL-2.0-or-later')
arch=('any')

provides=("$_pkgname=${pkgver%%.r*}")
conflicts=("$_pkgname")

depends=(
  'gspell'
  'gtk3'
  'python'
  'python-gobject'
  'python-xapp'
  'xapp'
)
makedepends=(
  'git'
  'meson'
  'ninja'
)

_pkgsrc="$_pkgname"
source=("git+$url.git")
sha256sums=('SKIP')

pkgver() {
  cd "$_pkgsrc"
  git describe --long --tags --abbrev=7 --exclude='*[a-zA-Z][a-zA-Z]*' \
    | sed -E 's/^[^0-9]*//;s/([^-]*-g)/r\1/;s/-/./g'
}

prepare() {
  cd "$_pkgsrc"

  # Set version in About dialog
  sed -i "s/__DEB_VERSION__/${pkgver//+*/}/g" "usr/lib/$_pkgname/$_pkgname.py"

  # Fix license path
  # sed -i 's|common-licenses/GPL|licenses/common/GPL/license.txt|g' "usr/lib/$_pkgname/$_pkgname.py"
}

build() {
  arch-meson "$_pkgsrc" build
  meson compile -C build
}

package() {
  meson install -C build --destdir "$pkgdir"
}