summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 88de86adcab3477f3a0d020f23812c1b726d789b (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
# Maintainer: Samuel Walladge <samuel at swalladge dot id dot au>
# Contributer: Alessandro Gario

pkgname=manuskript-git
_pkgname=manuskript
pkgver=0.11.0.r0.g12defa8
pkgrel=2
arch=('any')

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

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

makedepends=('git' 'gendesk')
depends=('python-pyqt5' 'qt5-svg' 'python-lxml')
optdepends=(
    '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"
}