summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 2f69e734624606a06ccd57967b88551a816b33b9 (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
# Maintainer: Mario Oenning <mo-son[at]mailbox[dot]org>
# Author: thgier <https://github.com/thgier>

_name=PotatoPresenter
pkgname=potatopresenter
pkgver=1.0.2
pkgrel=2
pkgdesc="Tool to create presentation slides that can be exported as PDF."
arch=('x86_64')
url="https://github.com/thgier/PotatoPresenter"
license=('LGPL2.1')
depends=('ktexteditor5' 'antlr4-runtime')
makedepends=('cmake' 'antlr4')
optdepends=('texlive-latexextra: for LaTeX formular support'
            'texlive-fontsextra: for LaTeX formular support'
            'texlive-science: for LaTeX formular support')
provides=('potatopresenter')
conflicts=('potatopresenter')
source=("$pkgname-$pkgver.tar.gz::$url/archive/v${pkgver}.tar.gz"
        "https://raw.githubusercontent.com/thgier/PotatoPresenter/master/potato_logo.svg"
        "potatopresenter.desktop"
        "ksyntaxhighlighting_build_fix.patch")
sha256sums=('65b954265ac4f364566ebbaf5e41e25509d57b5eb18153d33d1b5b122787308c'
            'd96b384a4e8ba5365785f9be8cd77e2f54d0ae767de7ae4c2f2f52c9de0e083b'
            '030597070eefe827d1895f3736cf2c70753e2ca13812350610122193976a2a7c'
            '4e0581a74afaa718894f68e6335f1715690c610ae5555960aed505542607053c')

prepare() {
  cd $_name-$pkgver/src/antlr/markdown/
  ./generate.sh
  cd ../potato/
  ./generate.sh

  cd "$srcdir/$_name-$pkgver"
  patch -p1 -i ../ksyntaxhighlighting_build_fix.patch
}

build() {  
  cmake -B build -S $_name-$pkgver
  cmake --build build
}

package() {
  # binary
  install -Dm755 "build/praes" "$pkgdir/usr/bin/$pkgname"

  # application file
  install -Dm644 "$pkgname.desktop" "$pkgdir/usr/share/applications/$pkgname.desktop"

  # icon
  install -Dm644 "potato_logo.svg" "$pkgdir/usr/share/${pkgname}/logo.svg"
}