summaryrefslogtreecommitdiff
path: root/foot/PKGBUILD
blob: 54df4d26c8f70acb655292ff064a088a589d366e (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
58
# Maintainer: Blake Romero <blake@blkrom.com>
pkgname=foot-git
pkgver=1.20.2.r27.g22e1b16
pkgrel=1
pkgdesc="A fast, lightweight, and minimalistic Wayland terminal emulator"
arch=('x86_64')
url="https://codeberg.org/dnkl/foot"
license=('MIT')
groups=()
depends=('fontconfig' 'pixman' 'wayland' 'libxkbcommon' 'glibc'
         'hicolor-icon-theme' 'harfbuzz' 'freetype2')
makedepends=('git' 'meson' 'ninja' 'wayland-protocols' 'ncurses'
             'scdoc' 'tllist')
optdepends=('libutf8proc: grapheme clustering'
            'libutempter: utmp logging'
            'libnotify: notifications'
            'xdg-utils: URI launching'
            'bash-completion: bash completions')
provides=("${pkgname%-*}")
conflicts=("${pkgname%-*}" "${pkgname}")
replaces=()
backup=()
options=()
install=
source=("${pkgname%-*}::git+${url}")
noextract=()
sha256sums=('SKIP')

pkgver() {
  cd "$srcdir/${pkgname%-*}"
  git describe --long --abbrev=7 | sed 's/\([^-]*-g\)/r\1/; s/-/./g; s/^v//'
}

prepare() {
  mkdir -p "$srcdir/${pkgname%-*}/build"
  export CFLAGS="$CFLAGS -O3"
}

build() {
  cd "$srcdir/${pkgname%-*}/build"
  meson setup \
    --prefix=/usr --buildtype=release -Db_lto=true \
    -Dterminfo=disabled \
    ..
  ninja
}

check() {
  cd "$srcdir/${pkgname%-*}/build"
  ninja test
}

package() {
  cd "$srcdir/${pkgname%-*}/build"
  DESTDIR="$pkgdir/" ninja install
  install -Dm 644 \
    ../LICENSE "$pkgdir/usr/share/licenses/${pkgname%-*}/LICENSE"
}