summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 4b40ff8f92d62bdd05a5cf69d8b453214eca666f (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
# Maintainer: Peter Semiletov <peter.semiletov@gmail.com>

pkgname=tea-qt-git
pkgver=62.4.0.r0.g5468d11
pkgrel=1
pkgdesc="Rich-featured text editor for Linux, *BSD, Windows, OS/2, Mac and Haiku OS. Build from good git-commit with PDF and DJVU support."
arch=('x86_64')
url="https://tea.ourproject.org"
license=('GPL3')
depends=('qt6-base' 'qt6-5compat' 'gcc-libs' 'zlib' 'hunspell' 'desktop-file-utils')
optdepends=('poppler-qt6: open and search text in PDF files'
            'djvulibre: open and search in DJVU')

makedepends=('cmake' 'git')
provides=('tea-qt')
conflicts=('tea-qt')

source=("git+https://github.com/psemiletov/tea-qt.git")
md5sums=('SKIP')

pkgver() {
  cd "${srcdir}/tea-qt"
  git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
  mkdir -p "${srcdir}/tea-qt/b"
  cd "${srcdir}/tea-qt/b"
  cmake .. -DUSE_PDF=ON -DUSE_DJVU=ON -DCMAKE_INSTALL_PREFIX=/usr
  make
  cd "${srcdir}/tea-qt/"
  sed -i 's/tea %F/tea-qt %F/g' desktop/tea.desktop
}

package(){
  cd "${srcdir}/tea-qt/b"
  make DESTDIR="$pkgdir" install
  mv -v -f "$pkgdir/usr/bin/tea" "$pkgdir/usr/bin/tea-qt"
}