summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 83629e5782268c399464de0689b05f3269d78911 (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
# Maintainer: Tobias Frisch <thejackimonster@gmail.com>
# Contributor: Samuel Walladge <samuel at swalladge dot id dot au>
# Contributor: Alessandro Gario

pkgname=manuskript-git
_pkgname=manuskript
pkgver=0.16.1.r0.g5a109250
pkgrel=1
arch=('any')

pkgdesc="Manuskript is an open-source tool for writers (git version)."
url="https://www.theologeek.ch/manuskript"
license=('GPL3')

provides=('manuskript')
conflicts=('manuskript')

makedepends=('git' 'gendesk')
depends=('python-pyqt5' 'qt5-svg' 'python-lxml')
optdepends=(
	'python-languagetool: spell and grammar check support'
    'python-pyenchant: spell check support'
    'python-markdown: export as html'
    'pandoc: more export formats'
)

source=("${pkgname}::git+https://github.com/olivierkes/manuskript#branch=master")
sha256sums=('SKIP')

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


prepare() {
    # generate a desktop file
    gendesk -f -n --icon="/opt/${_pkgname}/icons/Manuskript/icon-512px.png" --pkgname ${_pkgname} --pkgdesc "${pkgdesc}" --exec="${_pkgname} %U"
}


package() {

    # copy all the files
    mkdir -p "${pkgdir}/opt/${_pkgname}/"
    cp -R ${srcdir}/${pkgname}/* "${pkgdir}/opt/${_pkgname}"

    # symlink the runner to $path
    mkdir -p "${pkgdir}/usr/bin/"
    ln -s "/opt/${_pkgname}/bin/${_pkgname}" "${pkgdir}/usr/bin/${_pkgname}"

    # install the desktop launcher
    install -Dm644 "${_pkgname}.desktop" "${pkgdir}/usr/share/applications/${_pkgname}.desktop"
}